Allow ZFS ARC min / max to be tuned at runtime
Details
- Reviewers
avg allanjude delphij - Commits
- rS302265: Allow ZFS ARC min / max to be tuned at runtime
- Decrease vfs.zfs.arc_max testing threshold values
- Increase vfs.zfs.arc_max testing threshold values
- Decrease vfs.zfs.arc_min testing threshold values
- Increase vfs.zfs.arc_min testing threshold values
In each of the cases confirm ARC values adjust and memory usage follows.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | ||
---|---|---|
938 ↗ | (On Diff #15069) | It might be worth calling arc_kmem_reap_now() or kmem_reap() if the user is lowing the arc_max (as they obviously want memory back) This cleans up and usually results in lowering the amount of 'wired' memory. I am going to quickly experiment with that and get back to you. |
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | ||
---|---|---|
938 ↗ | (On Diff #15069) | When I tested it cleaned up quickly without that, so not sure its actually needed. |
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c | ||
---|---|---|
938 ↗ | (On Diff #15069) | In my case it did not: Frequently read files in ARC: before: Mem: 90M Active, 25M Inact, 61G Wired, 64G Free So I lowered the arc_max: Mem: 90M Active, 25M Inact, 61G Wired, 64G Free So the ARC shrunk, but no additional memory was freed However if I run some sysctl's I added: Mem: 125M Active, 26M Inact, 38G Wired, 87G Free A great deal of the 'Wired' memory moves to free. This does even more: Mem: 90M Active, 25M Inact, 17G Wired, 107G Free It is not clear to me why in arc_kmem_reap_now() we only call kmem_reap() in the i386 case. So I think we should either make lowering the arc_max call this, or, make it a separate sysctl similar to the temporary one I created. It is not instantaneous like changing arc_max is, so maybe separate makes more sense. I just thought I'd mention this here, since usually the point of lowering arc_max is to free memory for another purpose. |
Tested on two of my machines. Works as expected.
Would love to see this in 11.0-RELEASE