mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Add zfs_arc_memory_throttle_disable module option
The way in which virtual box ab(uses) memory can throw off the free memory calculation in arc_memory_throttle(). The result is the txg_sync thread will effectively spin waiting for memory to be released even though there's lots of memory on the system. To handle this case I'm adding a zfs_arc_memory_throttle_disable module option largely for virtual box users. Setting this option disables free memory checks which allows the txg_sync thread to make progress. By default this option is disabled to preserve the current behavior. However, because Linux supports direct memory reclaim it's doubtful throttling due to perceived memory pressure is ever a good idea. We should enable this option by default once we've done enough real world testing to convince ourselve there aren't any unexpected side effects. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #938
This commit is contained in:
parent
1f7c30df8f
commit
0c5493d470
@ -189,6 +189,7 @@ unsigned long zfs_arc_meta_limit = 0;
|
||||
int zfs_arc_grow_retry = 0;
|
||||
int zfs_arc_shrink_shift = 0;
|
||||
int zfs_arc_p_min_shift = 0;
|
||||
int zfs_arc_memory_throttle_disable = 0;
|
||||
int zfs_disable_dup_eviction = 0;
|
||||
int zfs_arc_meta_prune = 0;
|
||||
|
||||
@ -3633,6 +3634,9 @@ arc_memory_throttle(uint64_t reserve, uint64_t inflight_data, uint64_t txg)
|
||||
#ifdef _KERNEL
|
||||
uint64_t available_memory;
|
||||
|
||||
if (zfs_arc_memory_throttle_disable)
|
||||
return (0);
|
||||
|
||||
/* Easily reclaimable memory (free + inactive + arc-evictable) */
|
||||
available_memory = ptob(spl_kmem_availrmem()) + arc_evictable_memory();
|
||||
|
||||
@ -5045,6 +5049,9 @@ MODULE_PARM_DESC(zfs_arc_p_min_shift, "arc_c shift to calc min/max arc_p");
|
||||
module_param(zfs_disable_dup_eviction, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_disable_dup_eviction, "disable duplicate buffer eviction");
|
||||
|
||||
module_param(zfs_arc_memory_throttle_disable, int, 0644);
|
||||
MODULE_PARM_DESC(zfs_arc_memory_throttle_disable, "disable memory throttle");
|
||||
|
||||
module_param(l2arc_write_max, ulong, 0444);
|
||||
MODULE_PARM_DESC(l2arc_write_max, "Max write bytes per interval");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user