-
-
Notifications
You must be signed in to change notification settings - Fork 917
Description
Originally posted by @pmarreck in #1131 (comment)
I use
fd
in some test suites and I noticed a slowdown. I investigated and I found that simply runningfd
with no arguments in an empty directory on /tmp (which is in-memory!) was taking 0.2 seconds. This is ridiculously slow on my machine (Ryzen Threadripper 3990x with 64 cores/128 threads running on NVMe). Multiplied by the number of times I was callingfd
in my suite, this immediately explained why multiple seconds had been added at some point.When I add the
-j1
argument, as someone else indicated, the boot runtime of runningfd
alone drops to 0.01 seconds, which is 20x faster and far more reasonable an expectation.I'm on NixOS unstable running on ZFS root.
@matu3ba & @tavianator , this is NOT a filesystem problem (IMHO). This looks like a heuristics bug regarding non-specification of the number of concurrent jobs to run (per the mandocs, not specifying it "uses heuristics")
At least I now know a workaround that works!