VPS Optimization

QuantumNet

Well-Known Member
#1
Hello, we decided to evaluate your product with the free version for a month before we purchase your enterprise version.

We are using OpenVZ VPS with 2GB of RAM on a Quad Core Xeon.

Linux kernel 2.6.18-8.el5.028stab031.1

Redhat Enterprise Linux 5 64 bit for the Hardware node and Centos 5 32 bit for the VPS.

Directadmin is our control panel, when we first installed litespeed our load averages sky rcoketed way above what they normaly were with apache.

Mysql and lsphp appearing to be the culprits with lsphp using about 12%CPU and mysql suddonly spiking to around 98% CPU and averaging around 60% CPU

PHP 5.2.4 LSAPI


I have tried a number of things on here that was recommended lowering per client connection softlimit to 10 and max 20

I have tried both poll and epoll.

I have also turned off mysql persistent connections.

Before with apache server load was about .34 and now with litespeed it is as high as 2.45

What setting do you recommend for both litespeed and mysql for a VPS of this size?
 
Last edited:

mistwang

LiteSpeed Staff
#2
You can try a fresh install of LSWS, the problem probably is in your PHP setup, have you installed a PHP opcode cache like APC or eAccelerator?
 

QuantumNet

Well-Known Member
#3
You can try a fresh install of LSWS, the problem probably is in your PHP setup, have you installed a PHP opcode cache like APC or eAccelerator?

You know we are evaluting your product and its claim to fame as far as being more efficient than apache, so far I fail to see how you can claim what you do.

opcode cache is not an answer! Your webserver is supposed to outperform apache by what you state on your website.

I followed your tutorial for installing the web server with Directadmin control panel. And all I see is higher system load and mysql suddonly gobbling up CPU cycles. This was not the case with apache


I figure it is due to some configuration changes that need to be made to litespeed web server. Not to mask the problem by using opcode cache.

I simply asked what litespeed settings and mysql setting do you recommend to tune this so it is running smoothly can you answer the question or is your product not as good as it claims because right now apache wins as far as I am concerned. If you want my money on the 3 enterprise licenses I intended to purchase then tell me what I need to know in order to make your product run smoother than apache on the same setup.
 

mistwang

LiteSpeed Staff
#4
Which version of PHP are you using with Apache? My suggestion is to build same version of lsphp with exactly the same configuration used for mod_php (except those API specific parameters). You can get the configuration parmaters from a phpinfo() page.

You can also try our 3.3 release package, change the version from 3.2.4 to 3.3 in the download URL. Hosting control panel compatibilities has been improved in 3.3 release. It may helps.

LSWS configuration wise, the default configuration is pretty optimized, should not cause high load.

If you still have the high load problem, we can login your server and troubleshot for you if you prefer. Also, please check lsws/logs/error.log and stderr.log see if anything suspicious related to PHP. We will get you covered.
 

QuantumNet

Well-Known Member
#5
PHP 5.2.4 LSAPI

I had used the exact same configure script that was used to generate all the VPS PHP installations.

I disabled compression and that helped but the load is still nowhere near as low as it was.


LSAPI seems to almost double system load vs mod_php I dont know if I can live with that. Sure Litespeed has dropped RAM usage in half but it doesnt matter if the System load doubles.
 

QuantumNet

Well-Known Member
#7
After some testing, I think I have determined where the higher than usual system load levels are coming from, on both the free version and vps version of litespeed you have the web server locked to only being able to use a single core correct?

If that is true than here is the issue, with OpenVZ (not to sure about other vitualization technologies) for quality of service purposes you are able to restrict the amount of CPU one VPS can use at any given time.

In the case of OpenVZ lets say you have 4 cores and you limit CPU usage to 100% what this means is at any given time a VPS is only able to utilize 25% of each core so in turn the free version of litespeed and the vps version are only able to utlize 25% of a single core at any given time causing system load to register as really high even know the system is barely doing any work.

This case only gets worse with an 8 core system where only 12.5% of a single core would only be available to litespeed and even worse with a 16 core system where a mere 6.25% available.

I completely understand your need to charge per core it makes sense for the business model as many other companies have done, virtuozzo being a prime example.

What I would like to see happen though is instead of limiting the free and vps editions to a single core, instead limit them to a percentage based system. So 100% = 1 core and 800% = 8 cores.

obviously in different setups and configurations a person could be pulling different percentages from different cores so you could not evenly divide based on the 4 cores = 25% each basis.

So lets say I had a 4 core system and the vps was using 10% of one core 30% of the second 20% of the third and 40% of the fourth, then this would equal 100% (your one core restriction). Some basic math can be applied to achieve this no matter how many cores a system had.

This would greatly help reduce system loads as right now apache has lower system loads in the VPS enviroment on production websites.
 
Last edited:

QuantumNet

Well-Known Member
#8
I would really like to see your reply for my last post, as it will determin if I purchase my VPS licenses.

So far I like everything about litespeed and if you are willing to move fourth with a prcentage base system then I will purchase your product.
 

mistwang

LiteSpeed Staff
#9
The LSWS has no clue about the percentage of CPU time of one processor used. Only the kernel aware of it and can control it.

The VPS license is economy thus with its limitation. :)
We could issue multi-core VPS license with increased price, but it will not be very economical to end user, and it competes with our full multi-CPU license.

For real VPS hosting plan, usually only one CPU can be assigned to one VPS at most time due the number of VPSes hosted on one server. For server visualization, VPS license can be used but our normal license is still recommended to bring the best out.
 
Top