Skip to content

Commit

Permalink
swaps: disable vm.dirty_background_ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRTitor committed Jun 1, 2024
1 parent bf2f432 commit 8deab23
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions system/hardware/disk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
# Enable zram swap
zramSwap = {
enable = true;
# this means that maximum 300% worth of physical memory size
# this means that maximum 200% worth of physical memory size
# can be utilised in zram, by using compression
# this does not mean 300% of actual physical memory is used
# this does not mean 200% of actual physical memory is used
memoryPercent = 200;
};

Expand All @@ -40,7 +40,9 @@
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0;
# Improve write and read performance
"vm.dirty_background_ratio" = 12;
# by caching pages in RAM
# may cause OOM on large package builds
# "vm.dirty_background_ratio" = 12;
};

# fstrim for SSD
Expand Down

0 comments on commit 8deab23

Please sign in to comment.