!CcTBuBritXGywOEGWJ:matrix.org

NixOS Binary Cache Self-Hosting

158 Members
About how to host a very large-scale binary cache and more54 Servers

Load older messages


SenderMessageTime
24 Aug 2023
@flokli:matrix.orgflokliIt's a conscious decision to have it that granular in Tvix - the idea is that we're able to heavily cache both individual chunks as well as rendered NARs. And long term have the clients be a bit smarter on that front too.19:33:50
@brian:bmcgee.ie@brian:bmcgee.ieYou must have some stats now on the benefits/tradeoffs?19:34:53
@flokli:matrix.orgflokliIf the clients themselves use that protocol as their underlying data model, they can cache these files on their own and take care of nar assembly locally, if needed at all.19:34:56
@flokli:matrix.orgflokliI had some people do some benchmarks on nix-casync, which also chunked whole nar files in its native format, and the chunks were not chunking nicely at file boundaries, often resulting in too large chunks, and shifted / missed dedup possibilitied19:35:57
@zhaofeng:zhaofeng.liZhaofeng Li In the long run, I think this is the way to go if more flexibility is provided. The current Nix isn't very "smart" with regards to binary substitution 19:36:39
@flokli:matrix.orgflokliAgain, as written earlier today, I'm aiming for efficient storage and transport, and assume you can cache both individual chunks retrieval and assembled nars if needed.19:36:41
@zhaofeng:zhaofeng.liZhaofeng Li* In the long run, I think this is the way to go if more flexibility is provided. The current Nix client isn't very "smart" with regards to binary substitution19:36:46
@flokli:matrix.orgflokli Zhaofeng Li: I wanted to start with a http binary cache proxy that speaks tvix-store protocol over the wire and keeps a local cache of chunks and renders nar files just for a local Nix. 19:37:49
@flokli:matrix.orgflokliI'm not sure I want to even expose a NAR interface publicly to clients, they can just substitute through some local proxy.19:38:26
@flokli:matrix.orgflokliI don't need to provide cache.nixos.org, so I can be a bit more demanding on what clients need to have locally. And most of the time my crappy internet connection is the limiting factor, so having to download less over that is actually both good for my data usage as well as the server hosting the tvix-store, win win ;-)19:40:50
@raitobezarius:matrix.orgraitobezariusI want fast fast fast19:41:25
@raitobezarius:matrix.orgraitobezariusI have 5Gbps19:41:27
@raitobezarius:matrix.orgraitobezariusplease give me 5Gbps saturating cache19:41:33
@flokli:matrix.orgflokli raitobezarius: what about 100G 19:42:01
@zhaofeng:zhaofeng.liZhaofeng LiIf you have deep visibility/metadata into the store itself, the store itself can even be the chunk cache19:42:04
@raitobezarius:matrix.orgraitobezarius this I am planning too flokli but it will be when Raito Corp will be done and we will do 400Gbps distribution of the software universe 19:42:21
@raitobezarius:matrix.orgraitobezariusit's surprisingly hard to get OCP to give you a free 400Gbps switch19:42:34
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @raitobezarius:matrix.org
please give me 5Gbps saturating cache
Oh nice, I have an appointment to install 5G Google Fiber next month, but my roommate is thinking about bailing out because of the cost
19:42:38
@raitobezarius:matrix.orgraitobezarius
In reply to @zhaofeng:zhaofeng.li
Oh nice, I have an appointment to install 5G Google Fiber next month, but my roommate is thinking about bailing out because of the cost
well I pay it 30EUR/mo
19:42:51
@flokli:matrix.orgflokli
In reply to @zhaofeng:zhaofeng.li
If you have deep visibility/metadata into the store itself, the store itself can even be the chunk cache
This is already the case actually - I don't realize the actual files on disk currently, you can look at them through fuse
19:43:00
@raitobezarius:matrix.orgraitobezariusbut I support you towards 5G19:43:08
@flokli:matrix.orgflokliRust in kernel VFS when19:43:10
@raitobezarius:matrix.orgraitobezarius
In reply to @flokli:matrix.org
Rust in kernel VFS when
:DDDDDDDDDDDDDDDDDD
19:43:21
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @flokli:matrix.org
This is already the case actually - I don't realize the actual files on disk currently, you can look at them through fuse
Very cool, didn't know that!
19:44:00
@raitobezarius:matrix.orgraitobezariushttps://cs.tvl.fyi/depot/-/blob/tvix/store/src/fuse/mod.rs19:44:23
@raitobezarius:matrix.orgraitobezariusif I'm not wrong19:44:45
@flokli:matrix.orgflokliIt's all a bit wip, there's no seek support, because I want to do this in concert with verified streaming19:45:12
@flokli:matrix.orgflokliBut it should happen all in the next months19:45:30
@flokli:matrix.orgflokliBut it should already be good enough for builds19:46:51
@flokli:matrix.orgflokliI'll talk about it during nixcom19:47:24

Show newer messages


Back to Room ListRoom Version: 10