Skip to content
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

Add separate idle timeout for last daemon #17890

Open
matejdro opened this issue Jul 30, 2021 · 3 comments
Open

Add separate idle timeout for last daemon #17890

matejdro opened this issue Jul 30, 2021 · 3 comments
Labels
a:feature A new functionality in:daemon

Comments

@matejdro
Copy link

matejdro commented Jul 30, 2021

Current Behavior

org.gradle.daemon.idletimeout is the same if there is 1 daemon running or if there are 10 daemons running

Expected Behavior

Provide two timeout options:

  • When daemon is the only daemon running on the machine (last daemon)
  • When there are other daemons still running

Context

I'm currently working on a project that creates very memory intensive gradle daemons - three "full" daemons running simultaneously would completely starve my 32GB system of all memory.

Most of the time this is not an issue - I'm only running one daemon that handles all the builds (my "main" daemon). But occasionally, I will start multiple gradle tasks simultaneously, which will create extra daemons. After this, there will be multiple daemons sitting in the background, hogging lots of memory, even though I only need one most of the time.

I workaround this issue by setting aggressively low org.gradle.daemon.idletimeout. This ensures extra daemons are terminated quickly and do not hog memory. But the problem is that this also means my main daemon will terminate quickly and thus making my main builds slower.

Solution I envision is to have separate timeout for my "main" daemon and for the extra daemons. So I could set aggressive timeout for the extra daemons, but still have my "main" daemon running for longer amounts of time.

Somewhat related to the #14741

@ljacomet
Copy link
Member

It could be nice indeed to have shorter timeouts for daemons when there are compatible ones running.

@stale
Copy link

stale bot commented Jul 31, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Jul 31, 2022
@matejdro
Copy link
Author

matejdro commented Aug 1, 2022

This would still be nice to have.

@github-actions github-actions bot removed the stale label Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature A new functionality in:daemon
Projects
None yet
Development

No branches or pull requests

3 participants