diff options
author | Mel Gorman <mgorman@suse.de> | 2014-06-04 19:07:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:53:59 -0400 |
commit | 4f9b16a64753d0bb607454347036dc997fd03b82 (patch) | |
tree | 26169e829082644a3e6ee6bd4a9991b061425c50 /Documentation/sysctl | |
parent | 944d9fec8d7aee3f2e16573e9b6a16634b33f403 (diff) |
mm: disable zone_reclaim_mode by default
When it was introduced, zone_reclaim_mode made sense as NUMA distances
punished and workloads were generally partitioned to fit into a NUMA
node. NUMA machines are now common but few of the workloads are
NUMA-aware and it's routine to see major performance degradation due to
zone_reclaim_mode being enabled but relatively few can identify the
problem.
Those that require zone_reclaim_mode are likely to be able to detect
when it needs to be enabled and tune appropriately so lets have a
sensible default for the bulk of users.
This patch (of 2):
zone_reclaim_mode causes processes to prefer reclaiming memory from
local node instead of spilling over to other nodes. This made sense
initially when NUMA machines were almost exclusively HPC and the
workload was partitioned into nodes. The NUMA penalties were
sufficiently high to justify reclaiming the memory. On current machines
and workloads it is often the case that zone_reclaim_mode destroys
performance but not all users know how to detect this. Favour the
common case and disable it by default. Users that are sophisticated
enough to know they need zone_reclaim_mode will detect it.
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/sysctl')
-rw-r--r-- | Documentation/sysctl/vm.txt | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index dd9d0e33b443..5b6da0fb5fbf 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -772,16 +772,17 @@ This is value ORed together of | |||
772 | 2 = Zone reclaim writes dirty pages out | 772 | 2 = Zone reclaim writes dirty pages out |
773 | 4 = Zone reclaim swaps pages | 773 | 4 = Zone reclaim swaps pages |
774 | 774 | ||
775 | zone_reclaim_mode is set during bootup to 1 if it is determined that pages | 775 | zone_reclaim_mode is disabled by default. For file servers or workloads |
776 | from remote zones will cause a measurable performance reduction. The | 776 | that benefit from having their data cached, zone_reclaim_mode should be |
777 | page allocator will then reclaim easily reusable pages (those page | 777 | left disabled as the caching effect is likely to be more important than |
778 | cache pages that are currently not used) before allocating off node pages. | ||
779 | |||
780 | It may be beneficial to switch off zone reclaim if the system is | ||
781 | used for a file server and all of memory should be used for caching files | ||
782 | from disk. In that case the caching effect is more important than | ||
783 | data locality. | 778 | data locality. |
784 | 779 | ||
780 | zone_reclaim may be enabled if it's known that the workload is partitioned | ||
781 | such that each partition fits within a NUMA node and that accessing remote | ||
782 | memory would cause a measurable performance reduction. The page allocator | ||
783 | will then reclaim easily reusable pages (those page cache pages that are | ||
784 | currently not used) before allocating off node pages. | ||
785 | |||
785 | Allowing zone reclaim to write out pages stops processes that are | 786 | Allowing zone reclaim to write out pages stops processes that are |
786 | writing large amounts of data from dirtying pages on other nodes. Zone | 787 | writing large amounts of data from dirtying pages on other nodes. Zone |
787 | reclaim will write out dirty pages if a zone fills up and so effectively | 788 | reclaim will write out dirty pages if a zone fills up and so effectively |