summary refs log tree commit diff
path: root/nixos/modules/services/monitoring
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2019-07-05 22:15:38 +0300
committerIzorkin <izorkin@elven.pw>2019-07-06 10:15:21 +0300
commitfb4d71a39fdf0ef2477870c4f720bab10bf90174 (patch)
tree6ba6fcac325ece2f522ea0564f05843dffa49213 /nixos/modules/services/monitoring
parent6e592faa92dc2b9fabbe413e9430da632c376cb3 (diff)
downloadnixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar.gz
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar.bz2
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar.lz
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar.xz
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.tar.zst
nixpkgs-fb4d71a39fdf0ef2477870c4f720bab10bf90174.zip
nixos/netdata: increase performance
Diffstat (limited to 'nixos/modules/services/monitoring')
-rw-r--r--nixos/modules/services/monitoring/netdata.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/monitoring/netdata.nix b/nixos/modules/services/monitoring/netdata.nix
index 978dbd28d85..f9b7550af23 100644
--- a/nixos/modules/services/monitoring/netdata.nix
+++ b/nixos/modules/services/monitoring/netdata.nix
@@ -151,6 +151,8 @@ in {
         # Runtime directory and mode
         RuntimeDirectory = "netdata";
         RuntimeDirectoryMode = "0755";
+        # Performance
+        LimitNOFILE = "30000";
       };
     };
 
@@ -170,6 +172,11 @@ in {
       permissions = "u+rx,g+rx,o-rwx";
     };
 
+    security.pam.loginLimits = [
+      { domain = "netdata"; type = "soft"; item = "nofile"; value = "10000"; }
+      { domain = "netdata"; type = "hard"; item = "nofile"; value = "30000"; }
+    ];
+
     users.users = optional (cfg.user == defaultUser) {
       name = defaultUser;
     };