dragos03

Member
Jun 7, 2018
16
3
3
Bucuresti
cPanel Access Level
DataCenter Provider
I did a quick test of the new lsapi module vs php-fpm and wrote a short article about it:
- Removed -
Php-fpm seems to be a lot faster at the moment, did anyone else test the lsapi handler?
 
Last edited by a moderator:

sparek-3

Well-Known Member
Aug 10, 2002
2,087
243
368
cPanel Access Level
Root Administrator
This is pretty much what I found when I switched to php-fpm a few years ago. Everybody kept singing the praises of mod_lsapi, but when I actually took the time to test things, mod_lsapi responded horribly compared to php-fpm.

Now, perhaps I had something misconfigured with my mod_lsapi - I won't directly dispute that (this was the mod_lsapi that shipped with CloudLinux). But a straight-forward php-fpm configuration seemed to offer huge performance gains (I don't have the exact numbers, but I would say they compare greatly to what you provided).

This kind of started my (mostly silent) crusade within the hosting industry. Everybody seems to accept "truths" because it's what everybody else says. They don't actually take the time to test things and come to their own conclusions.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,273
1,282
313
Houston
Your input is appreciated! Thank you for starting this discussion. I know they both have their benefits though I haven't done a comparison, while we offer a lite version of mod_lsapi we are primarily focused on php-fpm within WHM/cPanel right now.
 

Web Guy

Registered
Oct 2, 2018
1
0
1
New Zealand
cPanel Access Level
Root Administrator
Hi there,

I'm also trying to decide between LSAPI and PHP-FPM.

I use a VPS, with CloudLinux 7, WHM/Cpanel and have just moved to use LiteSpeed.

While the LiteSpeed server page cache is great, I'm finding the performance quite bad for non-cached pages (I.E. where PHP has to serve the page).

My hosting company has told me I'm currently using suphp which is apparently quite slow.

Now since I'm using LiteSpeed, I assumed the best option was to change to use LSAPI instead of suphp but since reading this post (and a few others), I'm thinking maybe PHP-FPM is the better choice.

Does anyone have advice please regarding the best choice? I need something fast and secure. I won't be setting it up (my server knowledge is rather average), my hosting company will do this.

EDIT: If it makes a difference, my VPS has 2vCPUs and 8GB ram. I'm mentioning in case one of the handlers needs loads of resources to work.

Thanks!
 
Last edited:

RealAct

Registered
Apr 12, 2020
1
1
3
Miami, FL
cPanel Access Level
Root Administrator
I'm no expert however after switching from php-fpm to lsapi on my dedicated server with CPanel and CloudLinux I have experienced a massive improvement in performance specially on busy WordPress sites. Mind you I also upgraded the latest version of PHP.
The combination of both has been excellent in my personal experience.
 
  • Like
Reactions: cPanelLauren

bejbi

Well-Known Member
PartnerNOC
Jan 20, 2006
159
30
178
Poland
cPanel Access Level
DataCenter Provider
We are using lsapi on all our servers. Even on servers without CloudLinux, while lsapi is available from native cPanel.

In my opinion it is very stable solution (we had some issue about hang up php-fpm daemon - it was not very often, but it was). When we made test of speed of the websites, lsapi is little more faster than php-fpm. It is not very big difference.
 
  • Like
Reactions: cPanelLauren