aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dmu.c
diff options
context:
space:
mode:
authorAlexander Motin <[email protected]>2023-07-21 14:51:47 -0400
committerGitHub <[email protected]>2023-07-21 11:51:47 -0700
commit34b3d498a965451f2c21e9652a99952ed6e93c59 (patch)
tree47dfb2e7d6e3ddb436bf60d82a4a10c1b24fffbf /module/zfs/dmu.c
parent28430b51e3e2387e6f36d5b4ee5b30ef33095993 (diff)
Adjust prefetch parameters.
- Reduce maximum prefetch distance for 32bit platforms to 8MB as it was previously. Those systems didn't grow much probably, so better stay conservative there. - Retire array_rd_sz tunable, blocking prefetch for large requests. We should not penalize applications trying to be more efficient. The speculative prefetcher by itself has reasonable distance limits, and 1MB is not much at all these days. Reviewed-by: Allan Jude <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Sponsored by: iXsystems, Inc. Closes #15072
Diffstat (limited to 'module/zfs/dmu.c')
-rw-r--r--module/zfs/dmu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
index dda869287..3a4560cec 100644
--- a/module/zfs/dmu.c
+++ b/module/zfs/dmu.c
@@ -89,7 +89,11 @@ static int zfs_dmu_offset_next_sync = 1;
* helps to limit the amount of memory that can be used by prefetching.
* Larger objects should be prefetched a bit at a time.
*/
+#ifdef _ILP32
+uint_t dmu_prefetch_max = 8 * 1024 * 1024;
+#else
uint_t dmu_prefetch_max = 8 * SPA_MAXBLOCKSIZE;
+#endif
const dmu_object_type_info_t dmu_ot[DMU_OT_NUMTYPES] = {
{DMU_BSWAP_UINT8, TRUE, FALSE, FALSE, "unallocated" },
@@ -552,8 +556,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, uint64_t offset, uint64_t length,
zio = zio_root(dn->dn_objset->os_spa, NULL, NULL,
ZIO_FLAG_CANFAIL);
blkid = dbuf_whichblock(dn, 0, offset);
- if ((flags & DMU_READ_NO_PREFETCH) == 0 &&
- length <= zfetch_array_rd_sz) {
+ if ((flags & DMU_READ_NO_PREFETCH) == 0) {
/*
* Prepare the zfetch before initiating the demand reads, so
* that if multiple threads block on same indirect block, we