[feature request]: Add ability to throttle RAM usage #1754
Replies: 2 comments 3 replies
-
Thanks for the request! Definitely agree that this is suboptimal. Backing off under memory (or I/O) pressure is definitely one of the things we've considered to do in nextest, but hasn't been implemented yet. There's a related idea to use a small DSL to turn
This can be done via heavy tests or test groups. |
Beta Was this translation helpful? Give feedback.
-
So, essentially extend the The reason it needs extension is that while it could be used to reduce the number of tests that run concurrently, this does not stop the RAM for other tests from being allocated, if e.g. one person on a team has 16 logical CPUs and marks a test as requiring 16, and another person with the same amount of ram, but 32 logical CPUs runs that test. Test groups seem much more amenable to what I'm trying to accomplish, and is an appropriate workaround. Regardless, an automatic solution would probably also be useful. Would you be open to me implementing this? |
Beta Was this translation helpful? Give feedback.
-
Feature summary
Add the ability to reduce the number of running tests when one test is likely to take over the entirety of the available RAM.
Essentially
cargo nextest run -j 1
except smart.Motivation
I'm dealing with large Rust projects. It used to be that
32GiB
was enough, but these days, a single test run on a 16-core machine can easily gobble all of the resident RAM. In most cases this is preventable by reducing the number of concurrent tests being run, which in case ofnextest
is still often justified, because that still lets me collect flakyness and other statistics. But it kinda slows a big project to a crawl.Given that
nextest
can control how many tests it can spawn, and sometimes kill them too, I was wondering if it were possible to do one (or all) of the following:systemd-oomd
.nextest
is killed byoomd
, and instead show the user that the tests are too RAM intensive.Beta Was this translation helpful? Give feedback.
All reactions