Re: [BUG] active zones exceeded error with max_open_zones
Damien Le Moal <[email protected]>
| Newsgroups | org.kernel.vger.fio |
|---|---|
| Organization | Western Digital Research |
| Message-ID | <[email protected]> |
On 4/24/25 14:27, Sean Anderson wrote: > On 4/23/25 23:10, Damien Le Moal wrote: >> On 4/24/25 02:11, Sean Anderson wrote: >>> Hi, >>> >>> I'm getting an "active zones exceeded" error when running fio with >>> --rw=randwrite mode: >>> >>> # fio --bs=4k --rw=randwrite --norandommap --fsync=1 --number_ios=16384 --name=flushes --direct=1 --zonemode=zbd --max_open_zones=1978 --filename=/dev/my_zone_dev >> >> --max_open_zones=1978 is an extremely large value that likely exceeds the drive >> capabilities, which is what fio is telling you. >> What are your drive maximum open and active zones limits ? >> >> cat /sys/block/my_zone_dev/queue/max_open_zones >> cat /sys/block/my_zone_dev/queue/max_active_zones > > This is correct for the drive. I am sure it is. My point is that you cannot use --max_open_zone fio option with a value larger than what these sysfs attribute values are. >> fio will use the min_not_zero of these 2 values as the maximum number of zones >> that can be written simultaneously. Especially if your drive has an active zone >> limit, you *cannot* write to more zones than that limit at the same time. >> fio will default to max_open_zones=min_not_zero(drive max open, drive max >> active) and for a random write workload, it will: >> - pick zones randomly up to max_open_zones >> - direct write IOs to a randomly chosen zone in the current set of open zones >> and when an open zone becomes full, randomly pick another zone to replace it. > > Well the issue is that it appears to just pick random zones, not random open zones. The drive may be completely empty, all zones empty, so no open zones to chose from. So fio picks a random zone and adds it to the set of open zones it tracks. It will repeat that until the set of open zones reaches the limit, at which point, fio has no choice but to keep writting these open zones until they are full. If the drive already has open zone in the fio workload range, these zones will be added to the set of open zones on fio start. >> For your workload, if you want to measure the maximum "random" write performance >> of your disk, simply do NOT specify --max_open_zones=. fio will pick the best >> possible number for you. > > Same issue. Are you specifying an offset+size range ? If yes, how many zones are open in that range and outside of it ? What drive is it ? Looking at the blkzone report you sent, the zones look ridiculously small (32 sectors...)... Is this a null_blk device ? If that is the case, try creating the drive with larger zones. You may be hitting a bug with such tiny zones. Since such drive do not exist in the field, we never really tested such extreme configuration. -- Damien Le Moal Western Digital Research