!VRULIdgoKmKPzJZzjj:nixos.org

Nix Package Manager development

837 Members
For people hacking on Nix: https://github.com/NixOS/nix Nix maintainers can be reached here.180 Servers

Load older messages


SenderMessageTime
29 Jul 2025
@Ericson2314:matrix.orgJohn Ericson

OK optimized before

BM_ParseRealDerivationFile/hello         6814 ns         6791 ns       104081 bytes_per_second=247.735Mi/s
BM_ParseRealDerivationFile/firefox      31529 ns        31420 ns        22281 bytes_per_second=486.429Mi/s
21:18:01
@Ericson2314:matrix.orgJohn Ericson
BM_ParseRealDerivationFile/hello         6952 ns         6929 ns       102364 bytes_per_second=242.772Mi/s
BM_ParseRealDerivationFile/firefox      71569 ns        71292 ns         9695 bytes_per_second=214.381Mi
21:18:27
@Ericson2314:matrix.orgJohn Ericsonoptimized after21:18:29
@Ericson2314:matrix.orgJohn Ericson4x to 2x21:18:39
@Ericson2314:matrix.orgJohn Ericsonnot good enough21:18:42
@joerg:thalheim.ioMic92
In reply to @Ericson2314:matrix.org
I opened up https://github.com/NixOS/nix/issues/13573 regardless
Is it not all the store references we care about in those derivations, not just outpaths?
21:22:57
@Ericson2314:matrix.orgJohn Ericson Mic92: I think it is just looking to keep derivations pointing to live store paths? 21:23:25
@Ericson2314:matrix.orgJohn EricsonI could be wrong21:23:33
@joerg:thalheim.ioMic92https://github.com/NixOS/nix/blob/b062730665d120088ab6c3e154b4545f95d2fa4b/src/libstore/gc.cc#L76721:26:42
@joerg:thalheim.ioMic92Ah but wait this for keepOutputs21:31:24
@joerg:thalheim.ioMic92This is not the same as keep derivations, no?21:31:55
@Ericson2314:matrix.orgJohn Ericson Mic92: I am talking about the queryOutput stuff in there 21:35:18
@Ericson2314:matrix.orgJohn Ericson Mic92: oh wow, it's already done via the database in the local store case! 21:37:58
@Ericson2314:matrix.orgJohn Ericson see queryStaticPartialDerivationOutputMap 21:38:03
@Ericson2314:matrix.orgJohn Ericsonhttps://github.com/NixOS/nix/issues/13573#issuecomment-313415725721:40:17
@Ericson2314:matrix.orgJohn Ericsonso....why the hell is it so slow?21:40:23
@Ericson2314:matrix.orgJohn EricsonSQLite should be fast enough21:40:29
@Ericson2314:matrix.orgJohn Ericson (slow based on your said your sysadmining experience, Mic92) 21:40:42
@Ericson2314:matrix.orgJohn Ericson Eelco: you inadvertently trolled us quite well, because you in 2010 https://github.com/NixOS/nix/commit/c4d388add4942f6f99a8df12f4e49149005047e2 fixed the perf issue you brought up in my PR :) 21:47:11
@joerg:thalheim.ioMic92
In reply to @Ericson2314:matrix.org
(slow based on your said your sysadmining experience, Mic92)
It's parsing all the derivation files during GC by default. You have to turn of keep-derivations to disable it
21:52:45
@joerg:thalheim.ioMic92If it's turned off it's really just sqlite and fast21:54:10
@Ericson2314:matrix.orgJohn Ericson Mic92: hmm? because of what? 21:55:20
@joerg:thalheim.ioMic92
In reply to @Ericson2314:matrix.org
Mic92: hmm? because of what?
Can't point you to the concrete code but it's very obvious if you strace
21:56:48
@joerg:thalheim.ioMic92Something else we should consider is doing VACUUM after GC to restore sqlite size. But I have to experiment a bit with that. Can be tricky if the disk is almost full.21:57:48
@Ericson2314:matrix.orgJohn Ericsonhmmm OK21:58:06
@Ericson2314:matrix.orgJohn Ericsonsounds like a bug21:58:10
@joerg:thalheim.ioMic92Something else we should consider is doing VACUUM after GC to restore sqlite size. But I have to experiment a bit with that. Can be tricky if the disk is almost full.21:58:16
@Ericson2314:matrix.orgJohn Ericsondid you have ca-derivations around?21:58:27
@joerg:thalheim.ioMic92I might do actually 21:58:48
@Ericson2314:matrix.orgJohn Ericsonit looks like it regresses badly in that case21:58:48

Show newer messages


Back to Room ListRoom Version: 6