zhaofengli / attic

Multi-tenant Nix Binary Cache
https://docs.attic.rs
Other
1.04k stars 79 forks source link

Lower CPU usage settings? #128

Closed alicebob closed 6 months ago

alicebob commented 6 months ago

Hi,

attic runs well here, helps a lot with keeping CI times sane here.

I'm running it on a very crappy virtual host, and it's using a lot of CPU when pushing new versions. It's running on postgres, but local storage. Anyone any idea what the best settings are for minimizing CPU? Disable compression?

I use the default chunking:

      chunking = {
        nar-size-threshold = 64 * 1024; # 64 KiB
        min-size = 16 * 1024; # 16 KiB
        avg-size = 64 * 1024; # 64 KiB
        max-size = 256 * 1024; # 256 KiB
      };

Attic version 0.1.0 (the one in nixos unstable)

alicebob commented 6 months ago

Setting compression.type = "none"; helps a lot.

alicebob commented 6 months ago

It's fine with no compression. If anyone ever figures out better settings I'm still interested, but until then I'll close this.