Answer the question
In order to leave comments, you need to log in
nginx + php-fpm + mysql performance?
Hello!
There was a performance problem, it was not possible to solve it on my own.
I'm using Amazon EC2 micro instance (Ubuntu 12.04). For testing, I use a Yandex tank with a static load of only 5 RPS. In less than a minute, the server starts responding to each request for 10 seconds, with 504 errors (the tank says 110 errors). I searched the logs - I did not find any records (maybe I looked in the wrong place).
Screenshot: habrastorage.org/storage3/632/67b/1ae/63267b1ae1f6...
Accordingly, the following questions arise:
- this is not normal - 5 RPS is very small for this machine, or am I mistaken?
- how to understand where the bottleneck is?
- how to improve performance? Recommend specific articles please.
Answer the question
In order to leave comments, you need to log in
The whole problem is in micro instance, it can give out very little CPU. Try it out on DigitalOcean
Microinstances have one unpleasant feature. If the instance starts to eat too much CPU, then the system takes away this CPU from it. But at the start everything is very good. Try a small instance. His processor may be worse, but the guaranteed core is yours.
However, the option with memory is also not excluded. 613MB is not that much.
It is very similar to the fact that the script rests on memory. How much storage is on Amazon?
You need to enable error reporting or writing errors to a file in the php settings (check that php has write permissions to this file).
On a micro instance, 2 ECUs are issued for 5 minutes, if you completely consumed them, you will be reduced by 10 times.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question