I tested my site with Jmeter to find out how a hundred threads will affect site performance and tested it with apache and mod_php and nginx with fastcgi. I noticed that bottlebeck has always been a CPU in both apache and nginx. when I looked at using spu in nginx setup, I saw that php cgi processes process the whole processor.
What can I do to reduce php cpu usage?
The reason PHP takes up more resources than your web servers is because PHP does a lot more work and does it in a comprehensible language (Apache and Nginx are both compiled in the CPU instruction).
- - ( APC, PHP). "" , script.
- . ( , ) .