How to improve PHP performance?

I created a PHP application for Facebook. It uses MySQL, Memcached and runs on Lighttpd on Centos 2.6 Ghz and 2 GB RAM.

this is basically one PHP file that is cached after the first run, and each time it is served in 0.8 ms directly from Memcached.

What else can I do to reduce this time?

+3
source share
4 answers

Once you get to 0.8 ms, I'm not sure if you can go lower.

( memcached). , , .

+11

XDebug profiler. , - , .

, . kcachegrind ..

, , .

+3

HTTP- . HTTP- , .

, , HTTP, . , .

+2

Do you have a php script that receives data from memcached and displays it, or does the web server itself receive data directly from memcached?

I don't know if lighthttpd can display the page directly from memcached, but I know that nginx can do this for google for ngx_http_memcached_module

+1
source

Source: https://habr.com/ru/post/1718884/


All Articles