High resource usage - PHP

#1
Hello!

There is a client of mine who is spending considerable PHP resources. I see this through Litespeed's "lsphp" process. I'd like some way to see in detail which files are the most spending resources or even the websites.

How can I do this in-depth analysis?
 

lucasrolff

Member
Staff member
#2
Hi @Émerson Felinto,

There's not really a way to get such details within LiteSpeed Web Server (or any other web server for that matter), it's not the "job" of the server to be able to profile applications or gather information about files consuming resources.

What you'd want to look for, to get information is this, is software tools within the Application performance monitoring (APM) category.

You'll find both open source and commercial solutions, some are meant more for development, and others are meant for production use.

I've personally used New Relic (for production) and xhprof (for development), which for me has been helpful for debugging performance and resource usage.

xhprof is an open source PHP profiling system, that was originally released by Facebook, it does a very in-depth analysis of your code, down to a function level and tells you where the CPU time and memory is used, however it's rather complicated to set up, and shouldn't be used on a production site because it slows down things a whole lot.
 
Top