|
|

03-20-2008, 10:19 AM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
lsphp4 using high CPU
Code:
Tasks: 133 total, 1 running, 132 sleeping, 0 stopped, 0 zombie
Cpu(s): 23.2% us, 4.0% sy, 0.3% ni, 65.4% id, 7.1% wa, 0.0% hi, 0.0% si
Mem: 3114144k total, 3074580k used, 39564k free, 139360k buffers
Swap: 2096440k total, 304k used, 2096136k free, 2288692k cached
PID USER PR NI %CPU TIME+ %MEM VIRT RES SHR S COMMAND
20417 nobody 16 0 43 0:16.09 0.4 13184 10m 1588 S lsphp4
6769 mysql 21 6 4 234:25.70 8.2 725m 248m 2808 S /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --
19525 nobody 16 0 4 0:50.25 0.4 13412 11m 1744 S lsphp4
2322 root 15 0 0 23:37.58 0.0 0 0 0 S [kjournald]
21135 root 16 0 0 0:00.01 0.0 3520 1044 784 R top -c -d 2
1 root 16 0 0 0:08.49 0.0 3236 508 432 S init [3]
2 root RT 0 0 0:05.21 0.0 0 0 0 S [migration/0]
3 root 34 19 0 0:00.87 0.0 0 0 0 S [ksoftirqd/0]
4 root RT 0 0 0:06.90 0.0 0 0 0 S [migration/1]
5 root 34 19 0 0:00.72 0.0 0 0 0 S [ksoftirqd/1]
6 root 5 -10 0 0:02.76 0.0 0 0 0 S [events/0]
7 root 5 -10 0 0:09.05 0.0 0 0 0 S [events/1]
8 root 9 -10 0 0:00.00 0.0 0 0 0 S [khelper]
9 root 15 -10 0 0:00.00 0.0 0 0 0 S [kacpid]
37 root 5 -10 0 0:00.03 0.0 0 0 0 S [kblockd/0]
38 root 5 -10 0 0:00.11 0.0 0 0 0 S [kblockd/1]
39 root 15 0 0 0:00.05 0.0 0 0 0 S [khubd]
58 root 15 0 0 31:51.28 0.0 0 0 0 S [kswapd0]
59 root 12 -10 0 0:00.00 0.0 0 0 0 S [aio/0]
60 root 12 -10 0 0:00.00 0.0 0 0 0 S [aio/1]
204 root 25 0 0 0:00.00 0.0 0 0 0 S [kseriod]
441 root 5 -10 0 0:00.00 0.0 0 0 0 S [ata/0]
442 root 8 -10 0 0:00.00 0.0 0 0 0 S [ata/1]
443 root 8 -10 0 0:00.00 0.0 0 0 0 S [ata_aux]
447 root 15 0 0 0:00.00 0.0 0 0 0 S [scsi_eh_0]
448 root 15 0 0 0:00.00 0.0 0 0 0 S [scsi_eh_1]
473 root 15 0 0 1:45.97 0.0 0 0 0 S [kjournald]
1845 root 25 0 0 0:00.00 0.0 0 0 0 S [shpchpd_event]
2214 root 6 -10 0 0:00.00 0.0 0 0 0 S [kauditd]
2318 root 15 0 0 0:00.00 0.0 0 0 0 S [kjournald]
2319 root 15 0 0 11:02.79 0.0 0 0 0 S [kjournald]
2320 root 15 0 0 0:43.55 0.0 0 0 0 S [kjournald]
2321 root 15 0 0 13:30.63 0.0 0 0 0 S [kjournald]
2323 root 15 0 0 4:36.31 0.0 0 0 0 S [kjournald]
3230 root 16 0 0 1:00.09 0.0 3540 540 448 S syslogd -m 0
3234 root 16 0 0 0:00.86 0.0 3092 388 320 S klogd -x
3247 root 16 0 0 0:00.57 0.0 2556 296 216 S irqbalance
3256 root 15 0 0 0:00.00 0.0 2580 296 236 S /usr/sbin/courierlogger -pid=/var/spool/authdaemon/pid -facility=mail
3257 root 16 0 0 0:00.00 0.0 2408 608 492 S /usr/libexec/courier-authlib/authdaemond
3285 root 16 0 0 0:01.09 0.0 2408 380 252 S /usr/libexec/courier-authlib/authdaemond
3286 root 16 0 0 0:01.03 0.0 2408 380 252 S /usr/libexec/courier-authlib/authdaemond
3287 root 16 0 0 0:01.23 0.0 2408 376 252 S /usr/libexec/courier-authlib/authdaemond
3288 root 16 0 0 0:01.10 0.0 2408 380 252 S /usr/libexec/courier-authlib/authdaemond
3289 root 16 0 0 0:01.09 0.0 2408 380 252 S /usr/libexec/courier-authlib/authdaemond
3339 nobody 26 10 0 0:43.93 0.0 5800 1396 844 S proftpd: (accepting connections)
3351 root 15 0 0 0:02.51 0.0 2524 508 300 S /usr/sbin/smartd
3360 root 20 0 0 0:00.00 0.0 3424 448 372 S /usr/sbin/acpid
3426 root 16 0 0 0:00.00 0.0 2808 784 640 S xinetd -stayalive -pidfile /var/run/xinetd.pid
I don't know why it's using a lot of CPU and are there 2 instances running because the server is on a Dual Core Xeon 3060? Since installing Litespeed, the load has been higher than when Apache was used. 
Last edited by anewday; 03-20-2008 at 10:26 AM..
|

03-20-2008, 10:36 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
Have you installed a PHP opcode cache?
LiteSpeed's gzip compression may contribute to the higher load, your Apache installation may not have it, so turn it off under server->tuning tab if it concerns you.
|

03-20-2008, 10:38 AM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
I'm not using any opcode cache. Gzip is already disabled.
I'll recompile PHP 5.
this just happened:
19525 nobody 16 0 42 2:09.60 0.4 13412 11m 1744 S lsphp4
20417 nobody 16 0 27 1:06.83 0.4 13188 10m 1596 S lsphp4
20233 nobody 17 0 12 1:39.54 0.4 14680 12m 1596 R lsphp4

|

03-20-2008, 11:04 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
Which PHP version is used with Apache? PHP4 or PHP5, you should compile and use the same version of lsphp.
Install a opcode cache like eAccelerator will help a lot.
|

03-20-2008, 11:09 AM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
|
Apache is using PHP4. I thought you said it doesn't matter the version that cPanel/Apache uses since Litespeed is installing to a different location.
I just compiled LSAPI PHP5 via the GUI, according to phpinfo, it says the php.ini file is in /usr/local/lsws/lsphp5/lib
but I do not see the file there. Need to add the eaccelerator lines.
Last edited by anewday; 03-20-2008 at 11:12 AM..
|

03-20-2008, 11:12 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
Yeah, it is fine.
But, if you want to compare performance, you need to use similar setup for both. PHP5 is slower than PHP4.
|

03-20-2008, 11:14 AM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
|
Ok, I edited my post above.
|

03-20-2008, 11:21 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,603
|
|
|
You need to create the php.ini file for PHP5 and added the eaccelerator line manually.
|

03-20-2008, 11:44 AM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
I copied php.ini file from /usr/local/lsws/php/php.ini to /usr/local/lsws/lsphp4/lib/ then added the following to the end of the file:
Code:
extension="/usr/local/lsws/lsphp4/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/tmp/lswseaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
BTW, I decided to use PHP4 for now. Restarted LiteSpeed, it still doesn't show eaccelerator being used.
Last edited by anewday; 03-20-2008 at 11:50 AM..
|

03-20-2008, 02:32 PM
|
|
Senior Member
|
|
Join Date: Nov 2007
Location: New York
Posts: 729
|
|
this shows up in stderr.log
PHP Warning: Unknown(): Unable to load dynamic library './/usr/local/lsws/lsphp4/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so' - .//usr/local/lsws/lsphp4/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so: cannot open shared object file: No such file or directory in Unknown on line 0
Any help would be appreciated, if I can get this resolved..I'll seriously considering buying the license. 
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:32 PM.
|
|