EasyApache 4 and the new recently released mod_lsapi module.

KH-JonathanKW

Super Moderator
Staff member
https://blog.cpanel.com/easyapache-4-and-mod_lsapi/

It should be worth noting that for those who simply can't afford Litespeed but want to achieve similar performance should be swapping and adapting to this new recently released module!

We're still working out the best configuration over here in regards to Apache Modules (mpm_prefork/worker/event) and mod_lsapi.

But for those utilizing suphp or dso/ruid2 -- we have seen an increase in performance on the mod_lsapi handler.

Figured I'd make a thread about it to help bring awareness that lsapi has come to cPanel's EasyApache.

Now; this is a lite version compared to the one released for CloudLinux on Dedicated/Cloud(KVM) Servers and Litespeed's direct implementation(lsapi was developed by Litespeed)

We do still recommend that if you can get Litespeed for your server to do get it.

:)
 
So only CloudVPS and Dedicated server can use this feature?

The two main features of lsapi that are disabled in the cPanel-distributed version of mod_lsapi are CRIU (which requires kernel changes to enable)

Requires a kernel change..
 
So only CloudVPS and Dedicated server can use this feature?

Not exactly. cPanel servers running EasyApache 4 have the ability to use mod_lsapi now, whether they are using CloudLinux or not. However, the one cPanel provides on the standard kernel lacks a few features CloudLinux offers, and those CloudLinux-specific features will show marginally better performance than the "lite" version of lsapi cPanel provides natively, which may be useful on servers with heavy traffic loads. Some of the differences between native cPanel and CloudLinux mod_lsapi packages are explained in more detail here:

https://cloudlinux.com/cloudlinux-os-blog/entry/explanation-of-mod-lsapi-update-on-cpanel

CloudLinux is supported on our Cloud KVM and Dedicated server packages, which allow kernel modifications:

https://www.knownhost.com/managed-cloud-kvm-vps.html
https://www.knownhost.com/dedicated-servers.html
 
I was reading it wrong, you are right and it's working on my MVPS-5 without any issue (PHP 5.6, 7.1 and 7.2) with mod_lsapi

:)
 
Hi @KH-JonathanKW @KH-DanielL

Have you guys performed a benchmark to test mod_lsapi vs other handlers' performances? I found this on the net: https://bigstep.com/blog/using-lsapi-in-whm that says "the current lsapi doesn’t seem to provide a performance boost for WHM servers. At the moment, PHP-FPM appears to be the fastest php processing option available in WHM, by a healthy margin".

Currently I'm using PHP 7.1 - DSO, OPCache and memcached on my CentOS VPS. What's your suggestion? Will it help boosting performance switching to mod_lsapi? I need OPCache and memcached with my Wordpress setup. Is memcached available for PHP 7.3 (or 7.2) for now?
 
I did not see a difference using mod_lsapi. It's another marketing trick from cPanel and it will probably open up new issues with Apache and PHP getting compromised again and again.

I don't like cPanel anymore at all.
 
mod_lsapi will provide a significant boost over inefficient handlers like CGI or SUPHP. We only really find PHP-FPM to be beneficial when it comes to websites with massive traffic load, and even in those cases, the max_children and other parameters for each FPM pool must be tuned for the website to work optimally, which is sort of a constant tuning process and not very straightforward to most users. Additionally, some settings for PHP-FPM pools traditionally have been configured with yaml files that were not accessible through cPanel/WHM, such as disabled functions. It's this complexity, as well as additional memory usage for customers that run several websites, why we don't recommend using it in most circumstances.

If you're after the best absolute speed, Litespeed web server is a much better "set it and forget it" solution that is capable of handling very large amounts of traffic with lower overall memory usage, and supports http/2 and QUIC protocols right out of the box. It also supports OPcache.

The main advantage of lsapi at this time is comparable performance with the DSO handler, while being able to be used on all PHP versions at once instead of just one.
 
https://blog.cpanel.com/easyapache-4-and-mod_lsapi/

It should be worth noting that for those who simply can't afford Litespeed but want to achieve similar performance should be swapping and adapting to this new recently released module!

We're still working out the best configuration over here in regards to Apache Modules (mpm_prefork/worker/event) and mod_lsapi.

But for those utilizing suphp or dso/ruid2 -- we have seen an increase in performance on the mod_lsapi handler.

Figured I'd make a thread about it to help bring awareness that lsapi has come to cPanel's EasyApache.

Now; this is a lite version compared to the one released for CloudLinux on Dedicated/Cloud(KVM) Servers and Litespeed's direct implementation(lsapi was developed by Litespeed)

We do still recommend that if you can get Litespeed for your server to do get it.

:)
Hi, Jonathan, I have LiteSpeed in two VPS over here. Currently I'm using suphp handler for both. Do recommend me to stay that way or to change handler to lsapi?
 
Hello Jonathan,

After enabling and installing mod_lsapi via EA4, i think the next step is changing the PHP handler to lsapi handler in MultiPHP Manager.
My question is, Do we have to adjust any setting in php.ini
 
Hello Jonathan,

After enabling and installing mod_lsapi via EA4, i think the next step is changing the PHP handler to lsapi handler in MultiPHP Manager.
My question is, Do we have to adjust any setting in php.ini

Nope no changes are needed in php.ini
 
I am one of the people who switched from PHP-FPM to mod-Isapi. We had a problem that had been difficult to trace for a long time (actually part of the reason we left the last host because they couldn't tell us what was wrong). Every so often a folder on the server would crash. The server itself would be doing fine in terms of CPU/memory, but it brought the whole business to a halt until we restarted the server. We would have customers calling, and our only recourse would be to keep restarting. I still don't fully understand what was wrong with PHP-FPM, except that it would crash the server, and now with mod-isapi everything is okay! :)
 
Hi @KH-Jonathan,

Does KH support openlitespeed now? Or can we use Litespeed trial license on our VPS? We'd like to try Litespeed and see how it compared to Apache, wether it's worthed or not.
 
Hi @KH-Jonathan,

Does KH support openlitespeed now? Or can we use Litespeed trial license on our VPS? We'd like to try Litespeed and see how it compared to Apache, wether it's worthed or not.

Openlitespeed is not supported at this time.

Support can assist with installing trial licenses for litespeed, however do note that it is only a 15 day trial.
 
Hi @KH-JonathanKW

If we decide not to use Litespeed after trial, will you help us revert to previous Apache configuration?

What's your suggestion, upgrading our VPS package or using Litespeed? We have some occassional traffics spike that makes CPU usage exhausted with our current package.
 
Yes, we can help assist swapping back to Apache.

You're best bet would be to submit a support ticket with that question. This would allow the technicians to review your server, analyze past spikes and then make a proper determination.

Both would help as Litespeed can reduce CPU usage on traffic requests, but a VPS upgrade would provide more CPU resources.

As such, it would not do you justice to answer this question without having more information to determine which one you would really need.
 
HI, first of all thanks a lot Jonathan for answering all the questions and giving us all this information :)

I wanted to know something. When using mod_lsapi as php handler, PHP-FPM gets automatically disabled? what happens If I enable php-fpm?

Thanks
 
Top