-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce mutex contention #2826
Reduce mutex contention #2826
Conversation
Due to evidence of contention both the buf_hash_table and the dbuf_hash_table sizes have been increased from 256 to 8192. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#1291
6d58fc8
to
febdd7a
Compare
this might be too much for smaller servers and/or boxes running in mirror mode and having mounted an additional zpool: e.g.
this is with running on Btrfs as an system volume, and the following zpools:
if I hadn't upgraded this box to 32 GiB & running with swap it probably (anyway) would be swapping a lot since BUF_LOCKS isn't used with #2672 but MIN_BUF_LOCKS the relevant code snippet in module/zfs/arc.c is:
|
output of slabtop:
|
test with 3 pools in total:
maximum slab usage during rsync backup while all 3 zpools are imported:
not sure if the same behavior would have been shown without #2672 but in my opinion it's better to be pro-active about this issue for the (near ?) future rather than running into problems later hope this posted information is useful somehow ... |
@kernelOfTruth Thanks for pointing out #2672. Since I haven't looked carefully at those changes yet I wasn't aware they made a similar tuning. Doing it dynamically as was done in #2672 is clearly a better solution. It's a shame that change wasn't split from the other persistent L2ARC changes, it would have made it easier to review and merge. As for the memory foot print of this smaller change it's not huge but definitely something to be aware of. This resizes the hash table so it's a fixed cost of about an additional 0.5 MB. The goal from the original issue was to reduce contention of these locks which should help performance for some workloads. However, until we actually have some hard data showing an actually reduction in lock contention I'm in no rush to merge this. I mainly filed it so we wouldn't loose track of it. |
Merged as: b31d8ea Reduce buf/dbuf mutex contention |
Due to evidence of contention both the buf_hash_table and the
dbuf_hash_table sizes have been increased from 256 to 8192.
Signed-off-by: Brian Behlendorf behlendorf1@llnl.gov
Issue #1291