-
Notifications
You must be signed in to change notification settings - Fork 1.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Incredibly high CPU load during test running #2600
Comments
To try and get more info about what's going on, I just tried a few different levels of concurrency:
This suggests first that ava might be spawning too many processes: perhaps the number of logical rather than physical cores, while the workload does not spread well over SMT cores. However, even that wouldn't fully explain such high load figures: the jump from 1 at ava is by far my favourite testing library and I'd love to carry on using & recommending it! For now I have disabled concurrency on this test suite. |
We use |
Thanks @novemberborn. Thanks again, I'll see if I can get some figures on |
No, that looks pretty bad. For I/O heavy tests, using all (hyper-threaded) cores can work well. But if the tests are extremely CPU heavy that might backfire. I suspect that's relatively rare though. (I'm closing this issue for housekeeping purposes, but let's keep the conversation going.) |
I'm also hitting what I think is the same issue, I noticed it on xojs/xo#606 (comment). Basically whatever value of concurrency bigger than 1 spawns too many processes making the system unresponsive... I'm using a VM with 4 threads, but even if I use |
That's very curious. Re my original issue, I do often see CPU load of around 100; though I see this with a lot of node/npm related tasks, such as parcel builds, |
No, this is clearly due to ava. I only ran ava when I took the screenshot. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hi, I'm encountering some strange behaviour. I'm using an (I think) fairly standard ava + enzyme + babel setup.
I initially noticed my machine was running poorly — almost totally locked up — while ava tests were running. Investigating, I was astonished to find that CPU load was continuously over 100 during test running. The machine is so intensely locked up that Activity Monitor won't refresh any of its CPU or memory info until ava has finished running the tests. That 100 figure isn't a percentage, that's the actual CPU load figure, as a % it would be 10,000% CPU load. I thought I must be dreaming it, but it really is true.
My first thought was to try without concurrency (
-c 1
), and that results in CPU load around 1 (100%) as expected. Test running takes ~40s with-c 1
and CPU load of about 1, compare with ~30s without-c
and CPU load of about 100, system all but unusable.Thinking about this, and 3 things seem possible explanations:
Or it could be something else. As I've never seen anything quite like this before, I'd really appreciate anyone's thoughts if they have further ideas.
Code: link to repo
npm run t
is simplyava src/test/*
The machine is a MacBook Air, 1.3GHz, 2 real cores and SMT.
The text was updated successfully, but these errors were encountered: