29 Jul 2025 |
Mic92 | Ah but wait this for keepOutputs | 21:31:24 |
Mic92 | This is not the same as keep derivations, no? | 21:31:55 |
John Ericson | Mic92: I am talking about the queryOutput stuff in there | 21:35:18 |
John Ericson | Mic92: oh wow, it's already done via the database in the local store case! | 21:37:58 |
John Ericson | see queryStaticPartialDerivationOutputMap | 21:38:03 |
John Ericson | https://github.com/NixOS/nix/issues/13573#issuecomment-3134157257 | 21:40:17 |
John Ericson | so....why the hell is it so slow? | 21:40:23 |
John Ericson | SQLite should be fast enough | 21:40:29 |
John Ericson | (slow based on your said your sysadmining experience, Mic92) | 21:40:42 |
John 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 |
Mic92 | 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 |
Mic92 | If it's turned off it's really just sqlite and fast | 21:54:10 |
John Ericson | Mic92: hmm? because of what? | 21:55:20 |
Mic92 | 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 |
Mic92 | Something 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 |
John Ericson | hmmm OK | 21:58:06 |
John Ericson | sounds like a bug | 21:58:10 |
Mic92 | Something 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 |
John Ericson | did you have ca-derivations around? | 21:58:27 |
Mic92 | I might do actually | 21:58:48 |
John Ericson | it looks like it regresses badly in that case | 21:58:48 |
John Ericson | for silly reasons | 21:58:55 |
Mic92 | Great 😃 | 21:59:16 |
Mic92 | It did turn it on for nix-eval-jobs when I was testing | 21:59:56 |
John Ericson | ah gotcha | 22:00:07 |
John Ericson | once we stop using the silly drv hashes in realisation keys | 22:00:29 |
John Ericson | you just look up other table with drv path | 22:00:36 |
John Ericson | there is no reason to read in derivation to compute "static output paths" or anything like that | 22:01:14 |
Mic92 | https://github.com/nix-community/srvos/blob/cc76247e77c04cf2ad0bf04be10a5d47bc3da594/nixos/mixins/nix-experimental.nix#L29 | 22:03:03 |
John Ericson | ah, OK | 22:12:25 |