PHPUnit freezes for 60 seconds / CPU spikes at the start of each run

I recently moved my development environment to CentOS VM, and since it moved phpunit has been hanging for about 60 seconds at the start of each run. This happens whether a single test or the entire test suite is running. As soon as the tests finally begin, they will take only a few seconds, so I doubt that this is a problem with the server resources, since the VM has a lot of memory. I also checked the logs and no errors seem to be happening, so I'm a little confused about what the test package holds.

When phpunit is called, CPU usage is greatly increased:

   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND        
  6198 vagrant   20   0  900m  29m 9452 R 61.5  6.0   0:04.98 php

I have a pretty standard configuration, and so far it has worked fine with the same setup (not VM based). Adding 60 seconds to the start of each run becomes pretty destructive, so I wonder if anyone else had this problem before?

PS. I should also mention that my phpunit installation is done using the global composer command, not using a pear or phar. Perhaps this is the source of the problem.

+3
source share