This message was deleted.
# performance
s
This message was deleted.
n
does reducing
maxParallelForks
on the test task solve this for you?
g
I don’t increase maxParallelForks. The default is 1, right? I understand that works for reducing executors per test task, but I’d like to reduce executors overall, across test tasks executed in parallel
n
If your maxParallelForks is 1 then only one test executor will be used per test task at once. Can you clarify what you are trying to reduce?
g
I'm trying to reduce memory usage in our CI machines. Since our current maxParallelForks is already 1, I wanted to know if I can reduce how many 'Test tasks' can be executed in parallel, without reducing parallelism for the rest of the build (i.e. other tasks which don't spawn a separate JVM with its own heap)
n
You can reduce the number of test tasks running in parallel but adding a
mustRunAfter
relationship to each test task.
👌🏻 1
thank you 1
g
We have a situation in CI where if memory is requested beyond this 56GB limit (k8s limit), the instance is killed. I'm struggling to predict how much memory can be requested by test executor JVMs. Do you know how a VM with
-Xmx512m -Xms512m
could use 1GB memory? A JFR shows committed size of heap + metaspace is no more than 600MB
c
heap size + non heap size, where non heap is largely metaspace + code cache. Plus any memory allocated by native code that may be called.
thread count factors in there as well - default stack size is 1MB * number of threads.
thank you 1
c
BTW I wouldn't use
mustRunAfter
, is quite inflexible and it may require ordering tasks between different projects... I use a Build Service, make the tests task to use it, and limit the amount of consumers of that service.
That way you can decide it to be any number (1 for example for tests running docker Compose), and it doesn't matter which combination of tasks you execute or in which order