Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Lustre 2.9.0
-
None
-
Lustre 2.9.0
ZFS based OSTs
-
3
-
9223372036854775807
Description
At a customer we've hit LU-5718 and were trying to set max_pages_per_rpc to a value lower than 256. This didn't work. Reading the source showed:
lustre/obdclass/lprocfs_status.c: osc_obd_max_pages_per_rpc_seq_write()
chunk_mask = ~((1 << (cli->cl_chunkbits - PAGE_CACHE_SHIFT)) - 1); /* max_pages_per_rpc must be chunk aligned */ val = (val + ~chunk_mask) & chunk_mask; if (val == 0 || (ocd->ocd_brw_size != 0 && val > ocd->ocd_brw_size >> PAGE_CACHE_SHIFT)) { LPROCFS_CLIMP_EXIT(dev); return -ERANGE; }
chunkbits is 20. It is set in lustre/osc/osc_request.c:osc_init_grant() to
cli->cl_chunkbits = max_t(int, PAGE_SHIFT, ocd->ocd_grant_blkbits);
and ocd_grant_blkbits is set to 20. It's comment line says: /* log2 of the backend filesystem blocksize */
Once I've reduced the ZFS recordsize from 1MB to 512kB and remounted the OST, I
was able to reduce the max_pages_per_rpc.
I believe that the value set in ocd_grant_blkbits is wrong, and actually should be the ZFS ashif value (i.e. the block size) and not the recordsize.