R
R
Ruslan Absalyamov2020-05-02 09:44:33
Docker
Ruslan Absalyamov, 2020-05-02 09:44:33

Why does a docker site slow down and heat up the system?

I seem to have gotten used to docker and launched it, only problem 1 sites open much less than on LAN. With fast moving and ajax requests, local processes do not consume resources as much and the system does not heat up as it does in docker. What could be the problem. Technology stack using php-fpm 7.3 - nginx - mysql 5.7.
It started to open a little faster when I installed this https://docs.docker.com/machine/drivers/vm-fusion/.
But with the load of the system, this is some kind of trouble, my computer will work and overheat at high speeds.
If we compare the opening of one page, then the locale shows the opening of the site 137 ms and uses memory when loading the page 7.755 MB. docker has 1,477 ms and uses 9.301 MB of memory
That is, many times more than local. How can I remove this and not let the system load

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Bay, 2020-05-02
@rusline18

This is not with the system load, but with file access problems.
Briefly - :cache can partially help to cache files. But you have to accept that everything will be slow.
https://www.docker.com/blog/user-guided-caching-in...

D
Dim Boy, 2020-05-02
@twix007

In general, nothing is clear what kind of locale, what kind of system, where the server is, what is on the server

D
Dimonchik, 2020-05-02
@dimonchik2013

docker and localhost on the same server?

B
bottleneko, 2020-05-03
@bottleneko

the local machine is macOS.

But at the same time everything works much slower in docker

And not surprisingly, docker uses cgroups, which is only available on Linux. On MacOS, docker is installed inside the virtual machine https://developer.apple.com/documentation/hypervisor and all the brakes are due to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question