P
P
prabhu2016-03-24 15:39:45
linux
prabhu, 2016-03-24 15:39:45

LAMP optimization, what measures to take?

There is a LAMP server. Users complain about the low speed of sites (long response time). What measures can be taken to diagnose and optimize? Usermane, write your experience on this issue.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
O
OnYourLips, 2016-03-24
@OnYourLips

Upgrade your project to PHP 7, set up PHP using the accelerator. There should not be any XDebug and similar modules on the server.
Remove Apache, install nginx.
Set up MySQL: https://habrahabr.ru/post/108418/. If possible, move it to a separate server.
Optimize the site code, pay attention to the most frequently executed queries. Use EXPLAIN.
All items except the last one will take a couple of hours.
Although if the code is very old, then there may be problems with the first one.

V
Vlad Zhivotnev, 2016-03-24
@inkvizitor68sl

On the SSD, go and check that the system has enough free memory for the buffers.

A
asd111, 2016-03-24
@asd111

Cache everything that can be cached - this gives the biggest performance boost.
If you are too lazy to do it at the code level, then you can use nginx caching.
The fact that instead of apache you need nginx and php-fpm is also a must. And you need to install php 7, although php 5 with opcache will also work.
Here is a simple article on the topic (although there is nginx + Yii):
ruhighload.com/post/%D0%9E%D0%BF%D1%82%D0%B8%D0%BC...
It would also be good to check the site for viruses : https://webmaster.yandex.ru/
Or you can just take a more powerful server))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question