1

I have 4 kinds of test cases with the same steps for each type. When I use 1 worker, the case duration looks better. When I tried to increase the worker number to 2, 4, and 6, the case duration became longer. Some case duration is doubled. Here is the average duration table. My question is why the perf become worse when worker count increased. It is not related to the CPU core. I run the case on a 10-core windows PC. Performance compare

Gavin Wang
  • 11
  • 2
  • Increasing the amount of workers means increasing the amount of browsers which run in parallel. Usually the CPU on your host is the limitation there, so increasing the workers does not work for everyone, depending on the machine specification. – Max Schmitt Aug 09 '22 at 11:20
  • When worker count = 6, CPU usage is only 50%. It should still have the ability to handle more browsers. – Gavin Wang Aug 10 '22 at 01:01

1 Answers1

0

It may be that beforeAll is running more often. See: https://github.com/microsoft/playwright/issues/13532#issuecomment-1099626840

moto
  • 946
  • 10
  • 27