Terrible performance w/ circleci and docker

Hi, could someone explain why circleci’s docker performance is so bad, and how to mitigate this?

Our tests on circleci frequently crash due to memory errors or end up hanging until they time out. We’re running these tests in the large resource class with 8gb of ram. We run the exact same code, also in docker containers, on aws t4g.small instances with 2gb ram, and the tests run quickly and complete within a few seconds.

This code has no sidecar containers, no network connectivity, and no external dependencies of any other sort - it’s just basic unit tests using jest. Why isn’t circleci able to handle this even with 4x the resources? Is there some special configuration required to handle docker containers, or is this just an innate limitation of circleci?

Hello

There can be a number of factors in regard to the time that it takes the jest testing to complete. Would it be possible to tell us more about the tests that you are running? Also when comparing are you using the same OS and the same tests or if there any differences in the testing?

Our team is happy to help look for anything which could be causing issues and we are more than happy to raise an investigation into issues regards performance.

Kind Regards
Owen Oliver