From 19ceda95a806b289d0ea045e22aca7a05878792f Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sat, 3 Aug 2024 12:46:41 -0400 Subject: [PATCH] phone: Limit dirty_ratio / dirty_background_ratio Been running this for a few days now and it seems to make the phone significantly slower under load but reduces the probability of hanging and crashing by quite a bit. Plan to try this later with maximum CPU frequency to see if high CPU frequency still crashes the PinePhone. --- hosts/phone/configuration.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/phone/configuration.nix b/hosts/phone/configuration.nix index 8d806c4c..268d4294 100644 --- a/hosts/phone/configuration.nix +++ b/hosts/phone/configuration.nix @@ -193,6 +193,11 @@ in binfmt.emulatedSystems = mkForce [ ]; loader.systemd-boot.enable = mkIf (pkgs.system == "aarch64-linux") (mkForce false); + + kernel.sysctl = { + "vm.dirty_background_ratio" = 5; + "vm.dirty_ratio" = 10; + }; }; documentation.man.generateCaches = false;