diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2014-06-04 19:11:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:13 -0400 |
commit | 4a0da71b96b9d4080c0820e9e7d02470ebe62dc6 (patch) | |
tree | d5fd8eb6b6f5d8877a5f84ddffa7f3e6a33e8284 /Documentation/sysctl | |
parent | 3ba08129e38437561df44c36b7ea9081185d5333 (diff) |
Documentation/sysctl/vm.txt: clarify vfs_cache_pressure description
Existing description is worded in a way which almost encourages setting of
vfs_cache_pressure above 100, possibly way above it.
Users are left in a dark what this numeric value is - an int? a
percentage? what the scale is?
As a result, we are getting reports about noticeable performance
degradation from users who have set vfs_cache_pressure to ridiculously
high values - because they thought there is no downside to it.
Via code inspection it's obvious that this value is treated as a
percentage. This patch changes text to reflect this fact, and adds a
cautionary paragraph advising against setting vfs_cache_pressure sky high.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
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 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 5b6da0fb5fbf..bd4b34c03738 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -746,8 +746,8 @@ Changing this takes effect whenever an application requests memory. | |||
746 | vfs_cache_pressure | 746 | vfs_cache_pressure |
747 | ------------------ | 747 | ------------------ |
748 | 748 | ||
749 | Controls the tendency of the kernel to reclaim the memory which is used for | 749 | This percentage value controls the tendency of the kernel to reclaim |
750 | caching of directory and inode objects. | 750 | the memory which is used for caching of directory and inode objects. |
751 | 751 | ||
752 | At the default value of vfs_cache_pressure=100 the kernel will attempt to | 752 | At the default value of vfs_cache_pressure=100 the kernel will attempt to |
753 | reclaim dentries and inodes at a "fair" rate with respect to pagecache and | 753 | reclaim dentries and inodes at a "fair" rate with respect to pagecache and |
@@ -757,6 +757,11 @@ never reclaim dentries and inodes due to memory pressure and this can easily | |||
757 | lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 | 757 | lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 |
758 | causes the kernel to prefer to reclaim dentries and inodes. | 758 | causes the kernel to prefer to reclaim dentries and inodes. |
759 | 759 | ||
760 | Increasing vfs_cache_pressure significantly beyond 100 may have negative | ||
761 | performance impact. Reclaim code needs to take various locks to find freeable | ||
762 | directory and inode objects. With vfs_cache_pressure=1000, it will look for | ||
763 | ten times more freeable objects than there are. | ||
764 | |||
760 | ============================================================== | 765 | ============================================================== |
761 | 766 | ||
762 | zone_reclaim_mode: | 767 | zone_reclaim_mode: |