diff options
author | Florian Klink <flokli@flokli.de> | 2024-12-27T11·46+0100 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-12-27T11·58+0000 |
commit | b2a2225b8baae7d9736c68aef49131f9f1ed9428 (patch) | |
tree | d7cfff913c1639889cb54dba412b8130111a9d42 | |
parent | 22023fdc8d3e5ade6306fdab4dba5503dd40dc27 (diff) |
feat(users/flokli/nixos-tvix-cache): put metadata on SSD r/9029
Move the Directory and PathInfo storage to the SSD, and only bind-mount the blob storage from the HDD. This should improve IO for random access. Change-Id: Icf9408a879dec8a52541953682ffac25b31e73d3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12921 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
-rw-r--r-- | users/flokli/nixos/nixos-tvix-cache/nar-bridge.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/users/flokli/nixos/nixos-tvix-cache/nar-bridge.nix b/users/flokli/nixos/nixos-tvix-cache/nar-bridge.nix index 27164108fc4b..9ae631182eed 100644 --- a/users/flokli/nixos/nixos-tvix-cache/nar-bridge.nix +++ b/users/flokli/nixos/nixos-tvix-cache/nar-bridge.nix @@ -107,22 +107,22 @@ }; systemd.tmpfiles.rules = [ - # Put the data in the big disk + # Put the blobs on the big disk "d /tank/nar-bridge 0755 nar-bridge nar-bridge -" + "d /tank/nar-bridge/blobs.object_store 0755 nar-bridge nar-bridge -" # Cache responses on NVME "d /var/cache/nginx 0755 ${config.services.nginx.user} ${config.services.nginx.group} -" ]; - fileSystems."/var/lib/nar-bridge" = { - device = "/tank/nar-bridge"; - options = [ - "bind" - "nofail" - ]; - }; - systemd.services.nar-bridge = { - unitConfig.RequiresMountsFor = "/var/lib/nar-bridge"; + unitConfig = { + # Keep most data on the SSD which is at /var/lib/nar-bridge, but bind-mount the blobs in + RequiresMountsFor = "/tank"; + BindPaths = [ + "/tank/nar-bridge/blobs.object_store:/var/lib/nar-bridge/blobs.object_store" + ]; + }; + # twice the normal allowed limit, same as nix-daemon serviceConfig.LimitNOFILE = "1048576"; }; |