Hello!

There is a site that has an average attendance of 25k-30k per day. Recently we changed the server, the new memory only doubled more - there is enough RAM (64GB). The situation is such that during peak hours, the processor does not withstand the load, and begins to issue 500 or 502 errors, the load is mainly on the processor. And errors happen one by one.

On the old server, the number of Apache processes was severely limited by the size of the RAM; as the number of processes increased, they began to fall due to a lack of memory, but at the same time there were enough processor and disk resources to maintain Apache processes, as well as mysql. Replacing the server, we increased the number of Apache processes, they can now fit in more memory, but at the same time these processes began to generate requests to mysql in greater numbers than before replacing the server, in proportion to the number of processes themselves.

Previously, the server was weaker than the Intel® Core ™ i7-4770 Quadcore Haswell 2 x 2048 GB HDD SATA-III 32 GB DDR3, switched to more powerful

Intel® Core ™ i7-6700 Skylake Quadcore HARD DRIVE 2 x 2048 GB HDD SATA-III RAM 64 GB DDR4

Who decides how to reduce the load on the processor? I would be grateful for any suggestions how to reduce the load.

  • You can reduce the number of Apache processes to such an amount that the processor can withstand the load. This is if there is no time, desire and time to optimize the code and requests. If there is, then do optimization, first of all reducing the number of queries to the database and optimizing the queries themselves. - Regent
  • Reducing the number of requests, competent placement of indexes, caching - andreymal

0