PHP Docker Performance

Yegor Shytikov
1 min readOct 12, 2020

--

I made test PHP 7.3 running natively vs PHP 7.3 running inside of the docker.

R6g.2xlarge Docker PHP 7.3.23

The code took 0.26026797294617seconds to complete.
The code took 0.25932002067566seconds to complete.
The code took 0.25819611549377seconds to complete.
The code took 0.2633011341095seconds to complete.
The code took 0.26049113273621seconds to complete.
The code took 0.26223301887512seconds to complete.
The code took 0.26067495346069seconds to complete.

R6g.2xlarge PHP 7.3.21 without docker

The code took 0.17407298088074seconds to complete.
The code took 0.17468810081482seconds to complete.
The code took 0.17412209510803seconds to complete.
The code took 0.17383003234863seconds to complete.
The code took 0.17217707633972seconds to complete.
The code took 0.17328691482544seconds to complete.
The code took 0.17339897155762seconds to complete.
The code took 0.1735680103302seconds to complete.

As we can see performance with docker is slower than regular old school PHP. That's why I’m not using Docker for performance reasons. Check your docker performance after fetching the image.

--

--

Yegor Shytikov
Yegor Shytikov

Written by Yegor Shytikov

True Stories about Magento 2. Melting down metal server infrastructure into cloud solutions.

No responses yet