From a22868f0496dbd9633b9ed72256110ef2afde9f3 Mon Sep 17 00:00:00 2001 From: cy Date: Mon, 17 Mar 2025 00:14:49 -0400 Subject: [PATCH] attempts to make garage and attic faster --- hosts/chunk/garage.nix | 2 +- hosts/chunk/rclone.nix | 24 ++++++++++++++++++------ modules/attic.nix | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/hosts/chunk/garage.nix b/hosts/chunk/garage.nix index 1620a67..81b4af3 100644 --- a/hosts/chunk/garage.nix +++ b/hosts/chunk/garage.nix @@ -16,7 +16,7 @@ db_engine = "lmdb"; disable_scrub = true; block_size = "10M"; - compression_level = 3; + compression_level = "none"; }; environmentFile = config.sops.secrets."garage/env".path; }; diff --git a/hosts/chunk/rclone.nix b/hosts/chunk/rclone.nix index a3faaa2..60d4e0e 100644 --- a/hosts/chunk/rclone.nix +++ b/hosts/chunk/rclone.nix @@ -15,9 +15,16 @@ serviceConfig = { Type = "notify"; ExecStartPre = "/usr/bin/env mkdir -p /mnt/photos"; - ExecStart = "${lib.getExe pkgs.rclone} mount --config ${ - config.sops.secrets."rclone/config".path - } --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --dir-cache-time 72h --vfs-cache-mode writes --vfs-cache-max-size 2G photos: /mnt/photos "; + ExecStart = '' + ${lib.getExe pkgs.rclone} mount \ + --config ${config.sops.secrets."rclone/config".path} \ + --cache-dir /var/cache/rclone \ + --transfers=32 \ + --dir-cache-time 30d \ + --vfs-cache-mode writes \ + --vfs-cache-max-size 2G \ + photos: /mnt/photos + ''; ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/photos"; }; }; @@ -37,10 +44,15 @@ --config ${config.sops.secrets."rclone/config".path} \ --allow-other \ --cache-dir /var/cache/rclone \ - --transfers=32 --checkers=32 \ - --vfs-cache-mode writes \ - --vfs-cache-max-size 5G \ + --transfers=32 \ + --vfs-cache-mode full \ + --vfs-cache-min-free-space 5G \ --dir-cache-time 30d \ + --no-checksum \ + --no-modtime \ + --vfs-fast-fingerprint \ + --vfs-read-chunk-size 10M \ + --vfs-read-chunk-streams 32 \ rsyncnet:garage /mnt/garage ''; ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage"; diff --git a/modules/attic.nix b/modules/attic.nix index b24820b..5aa54c6 100644 --- a/modules/attic.nix +++ b/modules/attic.nix @@ -21,7 +21,7 @@ in allowed-hosts = [ "cache.cy7.sh" ]; require-proof-of-possession = false; compression = { - type = "zstd"; + type = "none"; level = 3; }; database.url = "postgresql:///atticd?host=/run/postgresql";