!9IQChSjwSHXPPWTa:lix.systems

Lix

1101 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms293 Servers

Load older messages


SenderMessageTime
6 Dec 2025
@aloisw:julia0815.dealoisw raitobezarius could you test https://gerrit.lix.systems/c/lix/+/4712 in your real-world setting? Be advised that if you use the daemon, the change will also be needed there, and for whatever reason there may happen a weird deadlock during the generation switch (I need to debug that). 12:37:02
@raitobezarius:matrix.orgraitobezariuswill do!12:58:29
@dont.wanna.tell:matrix.orgMartin HäckerI think they are, are you missing anyhting?13:57:18
@dont.wanna.tell:matrix.orgMartin Häcker * 13:57:43
@raitobezarius:matrix.orgraitobezarius
In reply to @dont.wanna.tell:matrix.org
I think they are, am I missing anything?
https://github.com/NixOS/nixpkgs/pull/441897#discussion_r2343911652 ?
14:08:11
@dont.wanna.tell:matrix.orgMartin Häckerah; I should have marked that as resolved, he did agree that minimal churn (especially in high stakes code like this) is an equally valuable goal.14:16:49
@jassu:kumma.juttu.asiaJassuko
In reply to @raitobezarius:matrix.org
It's the metadata layer of the Nix store, the actual source of truth

How is this handled currently? And how big of a deal is rebuilding said metadata if everything goes wrong?

I’m trying to figure out what are the a actual requirements for the consistency of this DB. In some cases it might make sense to provide fast ”happy path” usage in expense of having to do considerably more costly repair operation in case of total failure.

14:34:15
@aloisw:julia0815.dealoisw This database is extremely important, if things go wrong you can of course still access the store paths that were already there as files so the system is not immediately broken, but from the Lix perspective the entire store might as well be trash. 14:35:23
@jassu:kumma.juttu.asiaJassuko
In reply to @aloisw:julia0815.de
I expect rollback journal to be disastrously slow with the Lix store database, as it does at least one fsync per commit. You can try out yourself with the use-sqlite-wal setting if you want.
How many write operations are needed per a build or other store operations? Or do you need a write per some file in derivation? Or what exactly?
14:35:48
@aloisw:julia0815.dealoisw From what I gathered during my investigations it is roughly 1 write transaction per derivation. 14:36:21
@jassu:kumma.juttu.asiaJassukoBut that is practically nothing..?14:36:43
@aloisw:julia0815.dealoisw Uh what? To the contrary it is quite a lot of transactions. The huge volume of tiny transactions is also why there is so much amplification, I think. 14:37:31
@jassu:kumma.juttu.asiaJassukoLike… you are already writing a bunch of files for each derivation… having to do a SQLite write should be rather trivial in that scope?14:37:34
@jassu:kumma.juttu.asiaJassuko Or does it have some weird schema or indexes that are absurdly slow to update..? 14:38:34
@raitobezarius:matrix.orgraitobezariusFS writes doesn't have the same performance penalty as a SQLite writes14:38:52
@aloisw:julia0815.dealoisw It is not just one write, it is one write transaction where it adds the derivation and its references to the database, plus probably some index updates. And it does not appear "absurdly slow" in general, the problem is the extreme write amplification. 14:39:58
@jassu:kumma.juttu.asiaJassuko
In reply to @raitobezarius:matrix.org
FS writes doesn't have the same performance penalty as a SQLite writes
On the contrary… properly used the SQLite can exceed the performance of writing same amount of small files to the plain FS…
14:40:30
@aloisw:julia0815.dealoisw Key word is "can" here, it all depends on the actual use case. 14:41:18
@jassu:kumma.juttu.asiaJassukoYes. So I guess we should figure out how to make it fast. :p14:41:51
@522_:catgirl.cloud522 it/its ⛯ΘΔhttps://sqlite.org/fasterthanfs.html#write_performance_measurements goes into it14:43:27
@522_:catgirl.cloud522 it/its ⛯ΘΔwrite perf for sqlite writes in a single transaction vs the filesystem (with no fsync) is pretty much identical on linux14:43:59
@aloisw:julia0815.dealoisw Well yes, https://gerrit.lix.systems/c/lix/+/4711 and https://gerrit.lix.systems/c/lix/+/4712 are attempts to tweak SQLite settings to make it go a lot faster 14:45:02
@jassu:kumma.juttu.asiaJassuko 100s to 1000s of writes per second is where SQLite should start to get painful in general on many use cases. Anything below that, it should just work, or be easily fixable to perform. 14:45:09
@aloisw:julia0815.dealoisw With the default page size it spent like 40% of the time checkpointing. 14:45:48
@522_:catgirl.cloud522 it/its ⛯ΘΔ also yeah, the benchmark linked doesn't include checkpointing 14:46:14
@aloisw:julia0815.dealoisw "No checkpoint" and "huge blob" are about the opposite of what Lix is doing. 14:47:33
@kuruczgy:matrix.orgkuruczgy Do any of the nix hash commands have a way to ignore certain files/dirs?
In particular I have to do this to hash a git repo:
mkdir /tmp/wt && git worktree add /tmp/wt HEAD && rm /tmp/wt/.git && nix hash path /tmp/wt
Is there some way to hash a git tree without having to copy it? (Possibly something that doesn't even look at the worktree, just the git objects.)
14:48:57
@k900:0upti.meK900nix-prefetch-git?14:49:35
@aloisw:julia0815.dealoisw That copies, right? 14:49:52
@kuruczgy:matrix.orgkuruczgyDoes that not copy the repo into some temporary worktree too?14:49:54

Show newer messages


Back to Room ListRoom Version: 10