From 4fe3b8b22b43d4f2be8e60ac8561ec13707dfdb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Wed, 25 Aug 2021 19:45:15 +0100 Subject: [PATCH] minecraft: Fix ridiculous CPU usage Tapes over https://bugs.mojang.com/browse/MC-183518, which schedules things completely stupidly on Linux starting with 1.14. --- configuration/default.nix | 2 ++ configuration/services/minecraft.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/configuration/default.nix b/configuration/default.nix index a12aceb..683b144 100644 --- a/configuration/default.nix +++ b/configuration/default.nix @@ -20,6 +20,8 @@ trustedUsers = [ "@wheel" ]; }; + boot.kernelParams = [ "highres=off" "nohz=off" ]; + networking = { hostName = "tlaternet"; diff --git a/configuration/services/minecraft.nix b/configuration/services/minecraft.nix index 9b77c09..826ecd9 100644 --- a/configuration/services/minecraft.nix +++ b/configuration/services/minecraft.nix @@ -90,6 +90,7 @@ in { }; }; + extraOptions = [ "--cpu-quota=90000" ]; autoStart = false; ports = [ "25565:25565" ]; volumes = [