From 8bca5989b1a0cab2150cf28ba46b14881471fac9 Mon Sep 17 00:00:00 2001 From: "Rory&::Emma" Date: Fri, 27 Sep 2024 22:23:44 +0000 Subject: Server update --- flake.lock | 78 ++++++++++++++-------------- host/Rory-nginx/configuration.nix | 1 + host/Rory-nginx/services/matrix/draupnir.nix | 2 +- host/Rory-nginx/services/postgres.nix | 22 ++++---- modules/monitoring/synapse.nix | 4 +- 5 files changed, 54 insertions(+), 53 deletions(-) diff --git a/flake.lock b/flake.lock index af9fae2..c18bbfc 100644 --- a/flake.lock +++ b/flake.lock @@ -78,11 +78,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1724842781, - "narHash": "sha256-HRF4BHnVBlosE6ksyfPPgK3OIATD6LV79CK0rpX9MMU=", + "lastModified": 1727265185, + "narHash": "sha256-h8Pq1tOyN3y/fvEQTN4zglNg6tSflb8qX9MHyh3l4SY=", "owner": "famedly", "repo": "conduit", - "rev": "2bab8869d08765a7824b9d9dd937050dddbae4f1", + "rev": "bca8d1f70f88d78cd9c68dade2d94a9e668bddd3", "type": "gitlab" }, "original": { @@ -183,11 +183,11 @@ "draupnirSrc": { "flake": false, "locked": { - "lastModified": 1726318586, - "narHash": "sha256-B0xc0MVxghs0s3A+3Fv7AnmbIT8hNxLH/DLIvtQzxkQ=", + "lastModified": 1726859688, + "narHash": "sha256-zBC6TOHfaVLXopLyihNxjz9T4qij1xkr30c9OIY4oNY=", "owner": "the-draupnir-project", "repo": "Draupnir", - "rev": "86b7a51992b0ffbeae74500bcdcbb65706fe636d", + "rev": "56cdc480f1a66c56076099041eb6729fe1020775", "type": "github" }, "original": { @@ -361,11 +361,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -413,11 +413,11 @@ "systems": "systems_4" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -439,11 +439,11 @@ }, "locked": { "host": "gitlab.computer.surgery", - "lastModified": 1725829712, - "narHash": "sha256-W2PKJuOVPex+5bF+xlFfJARnf9T/sXOtPkSL5EanoqQ=", + "lastModified": 1727402475, + "narHash": "sha256-2VjV5WhKxqFU1UXRg76/F7V5g2OUzB4xDqXtBzyjUo4=", "owner": "matrix", "repo": "grapevine-fork", - "rev": "9e6a5e6604966f1b64a26371e8d20f8976489bbc", + "rev": "6ab87f97dd30b1146d18443b8ea66844567399e5", "type": "gitlab" }, "original": { @@ -458,11 +458,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1726036828, - "narHash": "sha256-ZQHbpyti0jcAKnwQY1lwmooecLmSG6wX1JakQ/eZNeM=", + "lastModified": 1727383923, + "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=", "owner": "nix-community", "repo": "home-manager", - "rev": "8a1671642826633586d12ac3158e463c7a50a112", + "rev": "ffe2d07e771580a005e675108212597e5b367d2d", "type": "github" }, "original": { @@ -492,11 +492,11 @@ "nhekoSrc": { "flake": false, "locked": { - "lastModified": 1725917417, - "narHash": "sha256-pCCbREJLSpDYUszseOvXb2b+hLNtrxPDd25b0RdruPI=", + "lastModified": 1727259061, + "narHash": "sha256-oF8gOHvTOrjAPtjm4AWh8t2H5swY3gPNsyWbZaQWQ4I=", "owner": "Nheko-reborn", "repo": "nheko", - "rev": "25e552c6fa674a9c1b581a85a46cfe4d9f0ffa83", + "rev": "048af42780af7177bc57cc1d83cf48ef09ca1e1e", "type": "github" }, "original": { @@ -544,11 +544,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1725882169, - "narHash": "sha256-v5L+Dh6KdyycIgcdIc6SQ1fRNNvFJmYz02+fyeptA2o=", + "lastModified": 1727382972, + "narHash": "sha256-p7D01ngjyK4AWlXc4iAYQbd/XGQerkSuGpHvFfn2X38=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "34b95b3962f5b3436d4bae5091d1b2ff7c1eb180", + "rev": "13e2ab916367789447fda4c612257736000d92d5", "type": "github" }, "original": { @@ -607,11 +607,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1726091564, - "narHash": "sha256-FiT4R5r4oq43jvUPQMUDwfiYaoLyOhxF36pKYduaNtY=", + "lastModified": 1727452998, + "narHash": "sha256-yTgoBM9nKPITaAsydbUD0m6l1gRWcsrNws5lt7wpd7c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ed0fe13cc637546cad8c3ee903a23459b59f5080", + "rev": "1c0f09449569952da1ff0d83ba2967fce72084e9", "type": "github" }, "original": { @@ -719,11 +719,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "lastModified": 1726937504, + "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "9357f4f23713673f310988025d9dc261c20e70c6", "type": "github" }, "original": { @@ -735,11 +735,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1725693463, - "narHash": "sha256-ZPzhebbWBOr0zRWW10FfqfbJlan3G96/h3uqhiFqmwg=", + "lastModified": 1726838390, + "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "68e7dce0a6532e876980764167ad158174402c6f", + "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101", "type": "github" }, "original": { @@ -751,11 +751,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1725983898, - "narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", + "lastModified": 1727122398, + "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", + "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093", "type": "github" }, "original": { @@ -851,11 +851,11 @@ "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1725922448, - "narHash": "sha256-ruvh8tlEflRPifs5tlpa0gkttzq4UtgXkJQS7FusgFE=", + "lastModified": 1727423009, + "narHash": "sha256-+4B/dQm2EnORIk0k2wV3aHGaE0WXTBjColXjj7qWh10=", "owner": "Mic92", "repo": "sops-nix", - "rev": "cede1a08039178ac12957733e97ab1006c6b6892", + "rev": "127a96f49ddc377be6ba76964411bab11ae27803", "type": "github" }, "original": { diff --git a/host/Rory-nginx/configuration.nix b/host/Rory-nginx/configuration.nix index 3f0bcc4..7a94254 100755 --- a/host/Rory-nginx/configuration.nix +++ b/host/Rory-nginx/configuration.nix @@ -100,4 +100,5 @@ system.stateVersion = "22.11"; # DO NOT EDIT! environment.systemPackages = with pkgs; [ waypipe ]; + nix.nrBuildUsers = 128; } diff --git a/host/Rory-nginx/services/matrix/draupnir.nix b/host/Rory-nginx/services/matrix/draupnir.nix index 1fd4b08..8be10bc 100755 --- a/host/Rory-nginx/services/matrix/draupnir.nix +++ b/host/Rory-nginx/services/matrix/draupnir.nix @@ -27,7 +27,7 @@ autojoinOnlyIfManager = true; # Let's not open ourselves up to DoS attacks automaticallyRedactForReasons = [ "*" ]; # I always want autoredact fasterMembershipChecks = true; - roomStateBackingStore.enabled = true; # broken under nix. + #roomStateBackingStore.enabled = true; # broken under nix. backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit pollReports = false; # this is a single person homeserver... let's save ourself the work diff --git a/host/Rory-nginx/services/postgres.nix b/host/Rory-nginx/services/postgres.nix index c728151..d24b0b9 100755 --- a/host/Rory-nginx/services/postgres.nix +++ b/host/Rory-nginx/services/postgres.nix @@ -5,7 +5,7 @@ services.postgresql = { enable = true; - package = pkgs.postgresql_16; + package = pkgs.postgresql_16_jit; enableTCPIP = true; authentication = pkgs.lib.mkOverride 10 '' # TYPE, DATABASE, USER, ADDRESS, METHOD @@ -27,8 +27,8 @@ max_connections = 2500; superuser_reserved_connections = 3; - shared_buffers = "32GB"; - work_mem = "16GB"; + shared_buffers = "64GB"; + work_mem = "32GB"; maintenance_work_mem = "8GB"; huge_pages = "try"; effective_cache_size = "64GB"; # was 22 @@ -44,17 +44,17 @@ wal_level = "replica"; max_wal_senders = 0; - synchronous_commit = "off"; # was ond3 + synchronous_commit = "on"; # was ond3 checkpoint_timeout = "15min"; checkpoint_completion_target = "0.9"; max_wal_size = "2GB"; min_wal_size = "1GB"; - wal_compression = "on"; + wal_compression = "off"; wal_buffers = "-1"; - wal_writer_delay = "200ms"; - wal_writer_flush_after = "1MB"; + wal_writer_delay = "500ms"; #was 100 + wal_writer_flush_after = "32MB"; # was 1 #checkpoint_segments = "64"; # additional default_statistics_target = "250"; # additional @@ -63,10 +63,10 @@ bgwriter_lru_multiplier = "2.0"; bgwriter_flush_after = "0"; - max_worker_processes = "32"; # was 14 - max_parallel_workers_per_gather = "16"; # was 7 - max_parallel_maintenance_workers = "16"; # was 7 - max_parallel_workers = "32"; # was 14 + max_worker_processes = "64"; # was 14 + max_parallel_workers_per_gather = "32"; # was 7 + max_parallel_maintenance_workers = "32"; # was 7 + max_parallel_workers = "64"; # was 14 parallel_leader_participation = "on"; enable_partitionwise_join = "on"; diff --git a/modules/monitoring/synapse.nix b/modules/monitoring/synapse.nix index a000698..55d123e 100644 --- a/modules/monitoring/synapse.nix +++ b/modules/monitoring/synapse.nix @@ -42,7 +42,7 @@ in [ { job_name = "synapse-main"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:9200" ]; @@ -55,7 +55,7 @@ in ++ lib.flatten ( lib.imap (index: workerName: { job_name = "synapse-${workerName}"; - scrape_interval = "${toString cfg.prometheusScrapeInterval}s"; + scrape_interval = "5s"; static_configs = [ { targets = [ "localhost:${toString (9200 + index + 1)}" ]; -- cgit 1.4.1