salmon-barista-63163
12/18/2020, 4:28 PMcircleci
8 CPU
16 RAM
I am trying to run tests via pytest or behave. In this environment we start up our servers and run the tests. we have about 8 webservers running (with pants) and we kick off the tests. I am getting out of memory errors and process killed issues when running. If you have been following what i have been posting about i am having all sorts of performance issues. I am running pants 2.0.1rc4 (with a twist from a release that was cut for me yesterday). There is no way the performance of v2 can be this much worse than v1 as a whole. At this point im thinking im missing or overlooking something. Any suggestions?hundreds-father-404
12/18/2020, 5:33 PM--no-dynamic-ui
may be instructive, as it will output the start time and end time for thingswitty-crayon-22786
12/18/2020, 5:38 PM./pants run
“clients”, which are hitting M ./pants run
“servers” on the same boxsalmon-barista-63163
12/18/2020, 5:43 PMwitty-crayon-22786
12/18/2020, 5:45 PM./pants run
where the process is spawned, pants
itself should be using effectively no CPU at all, but it is definitely using memory. this was why john and i were curious about the OOM killerHere are the things that are for sure slower with pants v2 than v1.when
pantsd
is off, it is not surprising that the first item is slower: pantsd
is intended to cut off the startup time.pytest
runs, because there is some extra overhead there that we know about.salmon-barista-63163
12/18/2020, 5:49 PMwitty-crayon-22786
12/18/2020, 5:52 PMpytest
? or some other code?salmon-barista-63163
12/18/2020, 5:53 PMwitty-crayon-22786
12/18/2020, 5:54 PMsalmon-barista-63163
12/18/2020, 5:54 PM"Error reading file File { path: \".coverage\", is_executable: false }: Os { code: 2, kind: NotFound, message: \"No such file or directory\" }"
which typically happens when there is no memory left to finish writing the coverage reportwitty-crayon-22786
12/18/2020, 5:57 PM./pants test $multiple_targets
with parallelism enabled is what would be ideal, as that would use dramatically less memory.salmon-barista-63163
12/18/2020, 5:58 PM./pants test
execituonwitty-crayon-22786
12/18/2020, 5:59 PM./pants run
clients have completed? or concurrently?salmon-barista-63163
12/18/2020, 6:00 PMwitty-crayon-22786
12/18/2020, 6:01 PMsalmon-barista-63163
12/18/2020, 6:01 PMwitty-crayon-22786
12/18/2020, 6:01 PMsalmon-barista-63163
12/18/2020, 6:02 PMwitty-crayon-22786
12/18/2020, 6:02 PMpantsd
hundreds-father-404
12/18/2020, 6:04 PM./pants package
, followed by dist/app.pex
- rather than ./pants run
. Iirc, you stopped that approach because it was still too much contention when building the PEXes.
Now that you have the building of PEXes part fixed, might it be worth trying that approach again? Then, you have ~20 Pex processes running and only 1 Pants process for Pytestwitty-crayon-22786
12/18/2020, 6:04 PM./pants package && dist/app.pex
2) wait for https://github.com/pantsbuild/pants/issues/7654, and we could try to prioritize it.salmon-barista-63163
12/18/2020, 6:05 PM./pants package && dist/app.pex
for the one webserver that would spin up tasks (pants processes) on demand. We pre-package ~30 pexs and then execute by just running the pex. This is the rest of our stack that is causing issues now. Its just too many things running in pants i guesshundreds-father-404
12/18/2020, 6:07 PM--process-execution-local-parallelism
. Note that you can use it as a CLI option, not only a config file value. So, you can set it to a higher value when building PEXes, then lower it dramatically when running tests
In v1, it was effectively set to 1. Tests ran sequentially../pants test --debug ::
emulates the v1 behavior. It runs each test sequentially in the foregroundwitty-crayon-22786
12/18/2020, 6:08 PMsalmon-barista-63163
12/18/2020, 6:12 PMwitty-crayon-22786
12/18/2020, 6:13 PMsalmon-barista-63163
12/18/2020, 6:13 PMwitty-crayon-22786
12/18/2020, 6:15 PMsalmon-barista-63163
12/18/2020, 6:19 PMKilled: <pid> Out of memory
thats what i am fighting in some test jobs here and others just all the sudden it exits with exit code 1witty-crayon-22786
12/18/2020, 6:20 PMsalmon-barista-63163
12/18/2020, 6:21 PMwitty-crayon-22786
12/18/2020, 6:21 PMsalmon-barista-63163
12/18/2020, 6:21 PMwitty-crayon-22786
12/18/2020, 6:22 PM./pants binary/package && dist/app.pex
change should work in either v1 or v2… are you sure that that isn’t an option?salmon-barista-63163
12/18/2020, 6:22 PMwitty-crayon-22786
12/18/2020, 6:23 PMsalmon-barista-63163
12/18/2020, 6:24 PMwitty-crayon-22786
12/18/2020, 6:24 PMsalmon-barista-63163
12/18/2020, 6:30 PMwitty-crayon-22786
12/18/2020, 8:14 PMsalmon-barista-63163
12/18/2020, 8:22 PMwitty-crayon-22786
12/18/2020, 8:22 PMsalmon-barista-63163
12/18/2020, 8:22 PMwitty-crayon-22786
12/18/2020, 8:25 PMhappy-kitchen-89482
12/22/2020, 7:29 AM./pants run <tgt>
and cannot switch to ./pants package <tgt> && ./dist/<tgt>.pex
?salmon-barista-63163
01/04/2021, 10:47 PMhundreds-father-404
01/05/2021, 9:48 PMThe issue here is that we can spin up ~30 of tasks which gives us ~30 pants package processes running in parallel.@salmon-barista-63163 to clarify, it sounds like it is not possible to invoke those all in a single run? Like
./pants package tgt1 tgt2 tgt3
salmon-barista-63163
01/05/2021, 9:53 PMwitty-crayon-22786
01/05/2021, 9:53 PMhundreds-father-404
01/05/2021, 9:54 PMSubsystem.global_instance()
? We can’t backport that because the deprecation policy