-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udev/zram: Rewrite comment about swappiness
Signed-off-by: Vasiliy Stelmachenok <[email protected]>
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
TEST!="/dev/zram0", GOTO="zram_end" | ||
|
||
# Since ZRAM stores all pages in compressed form in RAM, we should prefer | ||
# preempting anonymous pages more than a page (file) cache. Preempting file | ||
# pages may not be desirable because a process may want to access a file at any | ||
# time, whereas if it is preempted, it will cause an additional read cycle from | ||
# the disk. | ||
# When used with ZRAM, it is better to prefer page out only anonymous pages, | ||
# because it ensures that they do not go out of memory, but will be just | ||
# compressed. If we do frequent flushing of file pages, that increases the | ||
# percentage of page cache misses, which in the long term gives additional | ||
# cycles to re-read the same data from disk that was previously in page cache. | ||
# This is the reason why it is recommended to use high values from 100 to keep | ||
# the page cache as hermetic as possible, because otherwise it is "expensive" | ||
# to read data from disk again. At the same time, uncompressing pages from ZRAM | ||
# is not as expensive and is usually very fast on modern CPUs. | ||
SYSCTL{vm.swappiness}="150" | ||
|
||
LABEL="zram_end" |