| 16 Dec 2022 |
infinisil | Wait there's two growpotkins?? | 20:22:47 |
Growpotkin | yeah I'm a dingus and logged in to some devices with google and others with a user/password and I have no idea how to merge the two matrix accounts it created | 20:23:25 |
Growpotkin | This is the account that my personal computer has. The other one is my work computer and phone. | 20:23:55 |
Growpotkin | https://github.com/NixOS/nix/pull/7447/files Robert Hensing (roberth) look upon my works ye mighty and despair | 20:24:32 |
Growpotkin | * https://github.com/NixOS/nix/pull/7447/files Robert Hensing (roberth) look upon my works ye mighty and despair ( let me know if you have more notes lol ) | 20:24:44 |
Robert Hensing (roberth) | ah mkString doesn't copy, so no need for symbols | 20:28:10 |
Growpotkin | If the function name is a real problem for ( someday ) merging lazy trees let me know and I can rename it. Personally I like that the name indicates that a filesystem read will occur, and that it can't be confused with "constructing a pathType primitive"; but it's not a deal breaker for me. | 20:29:55 |
raitobezarius | Hey there, is https://github.com/NixOS/nixpkgs/issues/206467 in the scope for the architecture team? | 23:25:07 |
| 19 Dec 2022 |
Robert Hensing (roberth) | raitobezarius: we focus mostly on the pkgs side of things, but maybe someone is interested? | 14:49:55 |
Robert Hensing (roberth) | (I have too much on my plate rn, but I would recommend to inventorize the current implementations, the problems they have, what it takes to solve them and how NixOS can support the stateful operations by taking care of the state part) | 14:51:56 |
Robert Hensing (roberth) | (because, just like terraform needs it, NixOS will need to manage its own state to keep track of what it manages and what it doesn't) | 14:52:33 |
John Ericson | Sorry I'm travelling cannot make it today | 15:07:19 |
infinisil | @room: The next meeting will take place in about 6 minutes, we'll continue discussing https://github.com/nixpkgs-architecture/simple-package-paths - meeting link - live stream - meeting notes | 15:24:24 |
infinisil | Robert Hensing (roberth): Are you joining? | 15:34:38 |
Robert Hensing (roberth) | yes | 15:34:47 |
growpotkin1 | I cooked up a playground project for shard benchmarking in case that's of interest to anyone. https://github.com/aakropotkin/shard-test
Right now it just generates a unit/XXXX/* directory structure for every Nixpkgs' derivation. There's just a dummy.nix file in each dir now that I'm going to use test against.
This is likely useful for testing git performance as well.
| 17:11:45 |
growpotkin1 | The differences I'm seeing are basically noise level on Darwin with a pretty naive timer. I wouldn't put too much weight into that but it's a good smell test. With the readFileType patch after averaging a things out I'm ~5% faster ( 16,000+ packages, 100+ runs, no caches ); but the variance it too high to really interpret anything there.
I will put it through perf in a bit
| 19:24:41 |
growpotkin1 | this is just timing with bash -c time' so again - "naive" | 19:25:18 |
infinisil | growpotkin ( Alex Ameen ): Sounds like you need a bigger test case. Could you try it with n=1000, 10000, 100000, 1000000 files? Then we should be able to see whether there's a big-O improvement | 19:28:05 |
infinisil | growpotkin ( Alex Ameen ): Oh and I can recommend hyperfine to benchmark, that measures the variance, https://github.com/sharkdp/hyperfine or nix-shell -p hyperfine | 19:31:10 |
infinisil | Btw I'm gonna chill in https://meet.jit.si/nixpkgs-architecture, working on https://github.com/nixpkgs-architecture/simple-package-paths/pull/20 a bit based on what we discussed today, if anybody wants to join and help out | 19:43:48 |
growpotkin1 | This is starting to make me think that the difference I saw between Darwin and Linux may have just been encryption of the Nix store honestly. Copying the repo to the store takes an extra 30 seconds in the test repo. Reading directories takes under a second. The checksum only takes ~2.5 seconds.
The repo I was griping about had 5x as many files. Which would just about explain why it was taking me 1-5 minutes to do any evaluations. | 19:43:51 |
growpotkin1 | I can run on my VMs with their weird filesystems and stuff to see if anything jumps out there; but this smells like something else was the culprit to me. | 19:46:13 |
infinisil | growpotkin ( Alex Ameen ): Since you're testing already, can you just make sure that Darwin isn't slow even for like a million files? | 19:48:10 |
growpotkin1 | Yup | 19:48:35 |
infinisil | If it's really always fast then that's great news :D | 19:49:04 |
growpotkin1 | not that this is actually useful or anything; but I changed the shard-test repo to just redirect unit/foob/foobar/default.nix -> ( builtins.getFlake "nixpkgs" ).legacyPackages.<SYSTEM>.foobar so you can actually use nix build, nix show-derivation, etc on them 🙃 | 20:12:44 |
growpotkin1 | { system ? builtins.currentSystem }: let
nixpkgs = builtins.getFlake "nixpkgs/95aeaf83c247b8f5aa561684317ecd860476fcd6";
pkgsFor = nixpkgs.legacyPackages.${system};
in pkgsFor."_0verkill"
| 20:15:44 |
growpotkin1 | I bumped it from 16,000 -> 80,000 and it took significantly longer on Darwin - but it was all time spent moving files to the Nix store. On the runs that just read directly from the FS without copying it took the same amount of time as 16,000 files.
Seriously though - copying 80,000 dummy files to the Nix store on Darwin takes over 5 minutes. | 21:07:51 |
growpotkin1 | I'll test higher than this but not from the Nix Store; my box will just be spinning for hours. | 21:09:35 |