CPU usage consumption

anewday

Well-Known Member
#1
Hi,

When I switched to lsphp5 for nearly 2 days, the CPU usage is mostly consumed by nice. On the other hand, when server is running on lsphp4..the CPU usage is mostly consumed by user.

Can you explain this behavior? I'm not sure if it's a good or bad thing. :confused: Thanks for your help.

 
Last edited:

anewday

Well-Known Member
#3
I just checked external app, lsphp4 priority is set to 0 whereas lsphp5 is "not set". The CPU usage is counted as user, contrary to what you've said.

What is a good value to set for priority of lsphp4 and lsphp5 ?
 
Last edited:

Lauren

LiteSpeed Staff
Staff member
#4
when priority is 0, it will be counted as user, default value for external process is the server process priority + 1, so if lsphp5 is not set, it may default to 1. If it is not 0, it will be counted as nice in the "top" output.
priority 0 or 1 does not make much difference.
 

vivek

Well-Known Member
#5
Hello

I am having problem with litespeed nowadays. The high server load problem

The server configuration is as follows
Intel Xeon Dual Core
4GB RAM
100mbps uplink
cPanel/WHM

The server load is always like 5-10
It will go down to less than 1 sometimes,

The sites are loading fine ,but dont know why the server load is staying high



I checked top and found many times, EXIM is also causing the server load other than lsphp4. I contacted cPanel for checking this and here is the reply

Vivek,
I am not seeing this, however I am seeing that litespeed httpd's implementation of php is causing your load issues. Exim does not appear to be using any significant load at all.
--
Thank You,
Matt Dees
Technical Analyst 2
cPanel, Inc.


So, is there any performance tuning for litespeed?

Thanks in advance
Vivek
 
Last edited:

anewday

Well-Known Member
#7
Your config is identical, mine is a core2duo xeon 3060.

What is your iowait when the load is high? I noticed the load jumps up to almost 2 when iowait hits 20% and higher for a period of a 2 seconds or more and the load only drops when iowait is returns to normal. Sometimes, it reaches almost 3. Most of the time, load is under 1 though. But, I wonder why it spikes like that, Apache does't behave this way.

I think the lsphp process is causing the high loads too, it's always listed in the max cpu usage on WHM. There is over 2.5G of free ram according to free -m no bottlenecks on my system.

PS what prog did you use to make this pic: http://status.suntexhosting.com/images/dynamic/small.php
 
Last edited:

mistwang

LiteSpeed Staff
#8
Does it have anything to do with that cPanel restart lshttpd frequently? Do you have php opcode cache installed?
Please try the latest 3.3.10 release package.
I may be able to check your server when I get a chance.
 

anewday

Well-Known Member
#9


every time when iowait is high, I see lsphp4 at the top of the process list according to the top command.

user % is not that high now but when load hits 2-3, the user % is at least 12%
 
Last edited:

anewday

Well-Known Member
#10
Happening again:

Code:
top - 11:54:33 up 237 days, 15:01,  1 user,  load average: 6.06, 2.80, 1.65
Tasks: 133 total,   2 running, 131 sleeping,   0 stopped,   0 zombie
Cpu(s): 13.0% us,  4.9% sy,  0.0% ni, 24.3% id, 57.8% wa,  0.0% hi,  0.0% si
Mem:   3114144k total,  3096468k used,    17676k free,    30220k buffers
Swap:  2096440k total,    32348k used,  2064092k free,  2515412k cached

  PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND                                                                
 8610 nobody    16   0   28   1:37.73  0.7 78908  20m  16m S lsphp4                                                                 
10520 nobody    16   0    3   0:01.97  0.4 78788  10m 6884 S lsphp4                                                                 
26474 nobody    15   0    2  15:04.07  0.4 14196  11m 3216 S lshttpd                                                                
28275 mysql     22   6    1 131:28.83  7.4  733m 224m 2700 S /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pi
Is it caused by mysql or lsphp4? :confused:



Look at the big spike, most of the CPU usage is caused by lsphp4 running as user (priority 0) lsphp4 is likely the culprit.
 
Last edited:

vivek

Well-Known Member
#12
anewday , Do you have xcache installed ? I am going to remove it. I have xcache installed and is with 2GB cache.

Let me try it. Will post the result after checking the load .
 

vivek

Well-Known Member
#15
Also, did you check your EA cache folder size ?

Xcache is better than EA. At least xcache will not store any cache file on your hard disk like EA, and thus saves space.
 

anewday

Well-Known Member
#16
I don't think it's EA because I get high loads with APC as well.

I set EA to use shared memory instead of cahing files on the hard disk:

eaccelerator.keys="shm"
eaccelerator.sessions="shm"
eaccelerator.content="shm"
 

vivek

Well-Known Member
#17
ok, I dont have much information about EA.

I just removed the litespeed installation and installed it again.
compiled php and added zend and ioncube. I didnt add Xcache or APC or EA.

Looks like everything is working fine. I can see the load is now less than 1 which is a good one.

I am going to watch the load today.

Here is the live status.

 
Top