2025.04.30-20:50
This commit is contained in:
18
nixos_24.11_wlin001/system/tweaks/ssd-tweaks.nix
Normal file
18
nixos_24.11_wlin001/system/tweaks/ssd-tweaks.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
#---------------------------------------------------------------------
|
||||
# SSD tweaks: Adjust settings for an SSD to optimize performance.
|
||||
#---------------------------------------------------------------------
|
||||
"vm.dirty_background_ratio" = "40"; # Set the ratio of dirty memory at which background writeback starts (5%). Adjusted for SSD.
|
||||
"vm.dirty_expire_centisecs" = "3000"; # Set the time at which dirty data is old enough to be eligible for writeout (6000 centiseconds). Adjusted for SSD.
|
||||
"vm.dirty_ratio" = "80"; # Set the ratio of dirty memory at which a process is forced to write out dirty data (10%). Adjusted for SSD.
|
||||
"vm.dirty_time" = "0"; # Disable dirty time accounting.
|
||||
"vm.dirty_writeback_centisecs" = "300"; # Set the interval between two consecutive background writeback passes (500 centiseconds)
|
||||
};
|
||||
|
||||
services.fstrim.enable = true;
|
||||
|
||||
}
|
Reference in New Issue
Block a user