Hi All, We have been doing container based executions for our Robot tests. We are also able to launch tests in parallel using Pabot. We learned that number of processes that can be run in parallel depends on number of cores in the given machine. Our container configuration is something like cpu: 500m, Memory: 2000 Mi. In this case, How do we know the maximum processes that can be launched in parallel at a time? If we go by definition, We cannot launch parallel threads since cpu: 500m is equivalent to 0.5 core. It would be great if someone can clarify this since we are not sure how it works? Thanks in advance
Hi Bhushan,
the number of test you can run in parallel really depends on your tests themselves as there are so many influencing factors no one can give you that answer.
The best approach is to run robot and monitor the machine running the test while the test is running.
As yourself these sorts of questions:
- what was the average CPU usage over the entire test run, was it less than 50% of the container’s CPU?
- what was the peak CPU usage over the entire test run, was it less than 50% of the container’s CPU? if it was greater than 50% for how long? what would happen if 2 robot were running in the same container and both tried to use that much CPU at the same time?
- would it just make your test step run slow? is this acceptable?
- would it cause your test case to time out?
- would it cause the application your testing to crash?
- what was the peak RAM usage over the entire test run, was it less than 50% of the container’s RAM? if it was greater than 50% for how long? what would happen if 2 robot were running in the same container and both tried to use that much RAM at the same time?
These question should give you a feeling of whether the container is able to support multiple robots in parallel.
The general rule is ~2 robots per CPU core, but as you have ~0.5 of a core that would be 1 robot, having said that 1 CPU core for a 2nd gen i7 is about 50% of 1 CPU core on a 6th gen i7 and about 25% of a 13th gen i7, so without knowing which CPU you have 50% of a core of it’s hard to know what it would be capable of?
Here’s a screenshot from cpubench, pay attention to the single thread (1 core) scores:
So if you have a 50% of a very recent CPU you may be able to still run 4 robots.
If your CPU and RAM usage is below 60% when you ran a single robot, then it would be worth trying pabot with 2 threads and monitoring, see what the impact is to your test, and also what the virtual machine’s CPU, RAM, DiskIO, etc looks like, based on that you should know if you can get more robots from your container or if you’ve already reached / exceeded the limit of the container.
Sorry it’s a long rambling answer, but there’s no clear cut answer, hopefully this gives you the understanding to find your answer,
Dave.
Hi Dave, It makes sense. Thanks for your quick response on this