-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Start Gradle as lower priority process #1606
Comments
Given parallel workers and the general push towards parallel by default, this can only get worse. My MacBook is regularly a stuttering mess when I'm running builds, and I either have to limit the maximum workers or |
This issue is super important to me! I really hate having my system stutter just because I am running a gradle build. And an important thing to mention is that on Mac OS |
If we want to change the default, 5.0 would be a good point to do that. We should do some measurements to see the impact on default performance vs default usability. |
For 5.0, I'm going to add an option that you can configure in your user home. Once we have some positive experience with this, we can add auto-detection, e.g. based on whether Gradle is attached to a console. |
Question: does --parallel make things worse? What about --daemon? I'm on Gradle 4.8.1 (not my choice). My machine is unusable when I run gradle and I am trying to narrow down what's causing it. |
For anyone finding this, see docs: |
There should an option to start gradle and it's daemon as a lower priority process to increase system responsiveness when running parallel tasks/threads.
I would argue that this should be the default.
Expected Behavior
Gradle should not hog all system resources at normal priority as a default. If the daemon is set to start with lower priority, very little performance is lost and system responsitivity increases a lot.
Current Behavior
Currently the wrapper starts gradle at normal priority, with or without the daemon. I would argue that the should be a choice, maybe in the wrapper setting to select default priority level for the gradle process that is started.
I would argue that the default for this should be low prio, but that is not as important as given the user the choice.
Context
My user environment and local VMs grid to a halt when I do heavy parallel compiles using gradle.
Running a parallel gradle build on my 8 thread/24GB/i7 developer machine makes Cinnamon (Linux Mint Window Manager) slow and my local guest virtual machine pretty much stand still.
Instead running:
nice -n 15 ./gradlew --no-daemon --parallel build
makes the user environment completely usable during the whole build and the performance loss is less than 10%.Your Environment
Linux Mint, Ubuntu, Debian (all same results)
The text was updated successfully, but these errors were encountered: