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

Set --solver-max-memory to 80/90% of the system's memory by default #468

Open
montyly opened this issue Mar 1, 2025 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@montyly
Copy link

montyly commented Mar 1, 2025

Is your feature request related to a problem? Please describe.
Right now, if --solver-max-memory is not set, halmos might end up using all the system's memory and freezing the system.

Most of normal users don't want to have to set --solver-max-memory on every run.

Describe the solution you'd like
By default,--solver-max-memory could be auto set to 80-90% of the system memory.

@montyly montyly added the enhancement New feature or request label Mar 1, 2025
@0xkarmacoma
Copy link
Collaborator

there are a couple complications with this:

  • there can be multiple solver instances running at the same time
  • tools like jsi spawn subprocesses that can each run into memory limits
  • not sure there is a great cross-platform way to do this

maybe the most reliable thing we can do is that halmos can itself periodically monitor the memory usage of the process hierarchy in its process pool and kill things that go over the limit

@montyly
Copy link
Author

montyly commented Mar 3, 2025

Ah I see.

Does it mean that --solver-max-memory doesn't really work if the solver runs through multiple instances?

@0xkarmacoma
Copy link
Collaborator

if we treat it as a per-solver instance limit (which is the case atm), then it doesn't really work. We could change the meaning to say "I want all the running solvers to collectively use up to --solver-max-memory"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants