Table of Contents

How to Use More Cores With Licenses with at Least 2 Worker Processes on cPanel

NOTE: As of LiteSpeed Web Server v5.4, the Reuse Port Listener feature allows LSWS to use multiple cores automatically without any extra configuration, unless the feature is disabled.

The following documentation pertains only to versions prior to v5.4, which are not equipped with the Reuse Port Listener feature.

Setup to use multicores

You can boost your website's benchmark performance by selecting a higher-CPU license. If you have a license with 2 worker processes or more on cPanel, you can check how many LiteSpeed processes are running in “top”. Sometimes you may only see one core being used by LiteSpeed processes. Why?

Websites configured via Apache configuration, such as in a cPanel environment, are served by one CPU by default. You can add a listener for a site's <IP : Port> in LiteSpeed's native configuration. Bind it to two processes to fully utilize the 2 worker process license (or more) in your benchmark test.

The following shows how to enable two processes for your website for port 80. Select the IP that is used by your benchmark-testing domain associated with the virtual host.

If you have multi IPs, you can use “ANY” in “IP Address” field. Please keep in mind that if you need to switch between <Individual IP> and ANY, you will need to have a full LSWS stop and start.

It is normal that manually created listener(s) will not show in running in such control panel environment.

Troubleshooting

Full Stop/Start

If you see failed to create new listener,

2019-03-07 11:17:32.583428    ERROR    HttpListener::start(): Can’t listen at address https: Address already in use!
2019-03-07 11:17:32.583462    ERROR    HttpServer::addListener(https) failed to create new listener
2019-03-07 11:17:32.583471    ERROR    [config:server:listener:https] failed to start listener on address *:443!

most likely you ran a graceful restart. You should bring the server to a full stop, and run a full restart to make the setting effective. Like so:

service lsws stop
service lsws start

Failed to Create SSL Context for Listener

Even if you run a full stop then a full start, you may see the following warning message:

LEVEL: WARN [config:server:listener:https] failed to create SSL context for listener 208.75.148.57:443, turn SSL off.

Verify that you can browse to the domain successfully. Use the top command to check that LiteSpeed processes are sharing CPU equally without any issue.

The error message simply means the SSL is not configured through WebAdmin (which is actually true, since LSWS will use Apache's SSL configuration) and that the Apache configuration will fill in the SSL certificate. The error message can be safely ignored as long as SSL is working fine.