Updated:
================================================================ I finally found the reason with oprofile. It was because the routing cache of Symfony. We have lots of pages with different urls and symfony caches them in one file (serialized data). So the cache file grows large and it needs more CPU to serialize and unserialize data.
Everything went well after I disabled the routing cache
================================================================
Recently I updated my PHP program on my web server (Centos 5.3 + PHP 5.2.6), but it puts a heavy load on my server. So I decided to use oprofile to find what makes my server slow.
I've successfully installed oprofile but what's next? Does anyone have practical experience tuning an apache server?
Thanks~
You already know what makes it slow: PHP. I think you'd be better off with a PHP profiler, if such a thing exists.
Basic usage of oprofile is in the manual. opconfig --start ; wait a while ; opreport ; opconfig --stop. That will list the symbol names of the functions taking the most time. How you map that into improvements is a big open question which would need more detail.