Recordsize must always be a power of 2, so this doesn’t come up. It’s the other way around: you size your vdevs so that they’ll be evenly divisible by recordsize, which in practice means the number of drives minus the parity level should itself be a power of 2.
For example, consider a ten-wide RAIDz2 vdev: each stripe is data across eight drives and parity across two.
Every possible recordsize will divide evenly by eight (although some may wind up requiring so few sectors that they get an undersized stripe). If we assume ashift=12 and therefore 4KiB sectors:
Recordsize=4K: saved in three-wide stripe (one data, two parity)
Recordsize=8K: saved in four-wide stripe (two data, two parity)
Recordsize=16K: saved in six-wide stripe (four data, two parity)
Recordsize=32K: saved in ten-wide stripe (eight data, two parity)
So far, we’re literally only writing a single sector per drive for each of these very small block sizes on this relatively wide Z2 vdev. So our performance is going to suck pretty bad on this kind of workload.
Things begin to get better from here, although ten-wide Z2 is never going to be a high performance choice of vdev:
Recordsize=64K: saved in two-sector chunks on ten-wide stripe
Recordsize=128K: saved in four-sector chunks on ten-wide stripe
Recordsize=256K: saved in eight-sector chunks on ten-wide stripe
Recordsize=512K: saved in sixteen-sector chunks on ten-wide stripe
Recordsize=1M: saved in thirty-two-sector chunks on ten-wide stripe
So, for that last setting, recordsize=1MiB, we’re splitting 1,024KiB into eight pieces–each one 128KiB (thirty-two 4KiB sectors) wide. And we have parity-one and parity-two calculated in two more 128KiB pieces which go onto the remaining two drives of the vdev, in that full stripe.
With very wide vdevs–and yes, ten-wide Z2 definitely counts–you may want to consider going even higher than recordsize=1M, now that it’s possible to do so without messing around with kernel tunables. Essentially, the closer you can get your individual drives to doing 1MiB I/O operations, the better your throughput can get.
The only downside is, you’d better be certain you’re not putting any database-style storage on these wide vdevs and wide recordsizes! You don’t have to worry about small files–that 4KiB file is going to get stored in a single 4KiB data sector with however much parity or redundancy, regardless of any setting you choose–but if you wind up with something like SQLite flat-file “databases” or even real database engines like MySQL or PostgreSQL and very large recordsizes and/or wide vdevs, you will have a very bad time indeed.