-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default thread heuristic no longer a good choice in Mac OSX Sequoia #2925
Comments
Can you provide a benchmark I can run please? |
2s -> 10s feels like a mammoth change. Feels like something else is going on here personally. I doubt the default heuristic is going to change any time soon, so you'll definitely want to make a ripgrep config file or something with your preferred default. |
Not sure what you mean by a benchmark -- unfortunately, I don't have a framework or anything, just a few reports amongst coworkers. Here's a process sample (16 threads) Currently working around it with a config file to get the previous performance with the config file, but wanted to document this in case anyone else hits it |
This is your benchmark:
But I can't run this. Can you share a benchmark that I can run please? For example, consider trying on an open source repository that we can both access. Like maybe the Linux kernel or Chromium. The first step in diagnosing performance problems is having a shared reality. Sometimes that's not possible. But if the problem here is truly as general as "more threads is dramatically slower," then it should ideally reproduce on another repo. |
And yes, thank you for reporting this! I appreciate it. |
Following the instructions here for a fresh checkout of Chromium on Mac: https://chromium.googlesource.com/chromium/src/+/main/docs/mac_build_instructions.md#Install Results are quite different:
Don't have much time until the weekend to do more samples than n=1, and also investigate the differences in file size/# files that might account for it (the chromium repo is much bigger than the one I was testing on). It is quite interesting that there's appears there's an optimum in terms of both wall-time that's different than the optimum for CPU usage (for the repo I was testing on they were the same). Performance starts going down significantly after the optimum. Unfortunately, I no longer can test on 14.7 to compare. |
Until we get to the bottom of BurntSushi/ripgrep#2925.
Please tick this box to confirm you have reviewed the above.
What version of ripgrep are you using?
x86_64 ripgrep 14.1.1
How did you install ripgrep?
Homebrew
What operating system are you using ripgrep on?
macOS 15.1
Describe your bug.
I upgraded from macOS 14.7 to 15.1 last night. Since then, I noticed ripgrep on my repo regressed from ~2s a search to ~10s
From empirically testing, it appears that
--threads 3
provides the ideal behavior (my CPU has 14 cores)It looks like the current default is 12. Not sure what changed in 15.1 but two other people reproed this as well upon upgrading, one with a laptop with most system extensions uninstalled, so I don't think it's a bad interaction with a piece of third-party software on 15.1.
What are the steps to reproduce the behavior?
Run any ripgrep search without specifying the number of threads on 15.1
What is the actual behavior?
Slow query, 10s in a relatively large repository I tested
What is the expected behavior?
~1-2 seconds on OSX. For reference, ripgrepping this repo on Ubuntu is ~600ms
The text was updated successfully, but these errors were encountered: