I've been running Litespeed enterprise (2CPU) for a while now and recently moved my MySQL database to another server in the hope it would speed things up a bit. Unfortunately, it doesn't seem to have made a great deal of difference and I'm left wondering whether there's something in my LS configuration that could be slowing things down. What are the main settings I should be looking at in order to optimise for my site, which receives over 750,000 pageviews and 90,000 file downloads (avg. size 500KB) per day? I'm hosting Litespeed on a dedicated 2 X Dual Core Woodcrest 5130; 4GB RAM; 2 x 320GB SATA (RAID 1). Although not relevant to LS, the database is on a 2 x Clovertown 5335 Quad Core; 4GB RAM; 2 x 147GB SCSI 10K (RAID 1).
User concurrency wise.. peak times will see 1600 users online (15 min timeout) and 800 during quiter times. Although there is a small speed increase during quieter periods, it's nothing significant. Page execution occassionally (but far too often) takes up to 15 seconds and other times it will be an ok 0.8.
Current LS settings:
Max connections: 2000
Connection timeout: 60
Max Keep-alive requests: 2000
Smart Keep-Alive: Yes
Smart K-A Timeout: 10
lsphp5:
Max Connections: 100
PHP_LSAPI_MAX_REQUESTS=500
PHP_LSAPI_CHILDREN=100
I'm desperately struggling to find a solution to my problems, so if you could be so kind as to assist, I would really appreciate it. If these settings are already ok, is it worth upgrading to a 2 x Clovertown 5335 Quad core or do you believe something else might be the bottleneck?
Here's an excerpt from my top stats during a busy period (it constantly hovers around 6-8):
Here's some stats from one the quietest periods, during a spike:
Top stats a few mins later:
Many thanks
User concurrency wise.. peak times will see 1600 users online (15 min timeout) and 800 during quiter times. Although there is a small speed increase during quieter periods, it's nothing significant. Page execution occassionally (but far too often) takes up to 15 seconds and other times it will be an ok 0.8.
Current LS settings:
Max connections: 2000
Connection timeout: 60
Max Keep-alive requests: 2000
Smart Keep-Alive: Yes
Smart K-A Timeout: 10
lsphp5:
Max Connections: 100
PHP_LSAPI_MAX_REQUESTS=500
PHP_LSAPI_CHILDREN=100
I'm desperately struggling to find a solution to my problems, so if you could be so kind as to assist, I would really appreciate it. If these settings are already ok, is it worth upgrading to a 2 x Clovertown 5335 Quad core or do you believe something else might be the bottleneck?
Here's an excerpt from my top stats during a busy period (it constantly hovers around 6-8):
top - 17:03:54 up 13 days, 22:03, 1 user, load average: 8.45, 6.06, 5.13
Tasks: 176 total, 2 running, 174 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.2% us, 2.9% sy, 24.1% ni, 67.1% id, 3.5% wa, 0.1% hi, 1.2% si
Mem: 4137244k total, 3442740k used, 694504k free, 251116k buffers
Swap: 4096532k total, 144k used, 4096388k free, 2642100k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28287 nobody 16 1 13412 5020 2988 S 22 0.1 0:02.34 lsphp5
29192 nobody 16 1 13420 5476 3452 S 18 0.1 0:01.83 lsphp5
26441 nobody 16 1 16352 8424 3300 R 15 0.2 0:09.41 lsphp5
29484 nobody 16 1 13388 4924 2916 S 14 0.1 0:00.67 lsphp5
27610 nobody 16 1 13412 5244 3212 S 13 0.1 0:02.42 lsphp5
29204 nobody 16 1 13536 5424 3284 S 11 0.1 0:01.81 lsphp5
29135 nobody 17 1 13468 5032 2944 S 5 0.1 0:01.52 lsphp5
29549 nobody 15 0 93464 87m 36m S 5 2.2 83:18.49 lshttpd
29245 nobody 16 1 13408 5004 2976 S 3 0.1 0:01.38 lsphp5
29543 nobody 16 1 18020 9260 2736 S 2 0.2 0:00.07 lsphp5
29524 mailnull 15 0 8372 3860 2648 S 1 0.1 0:00.02 exim
29526 mailnull 15 0 8372 3864 2652 S 1 0.1 0:00.02 exim
29542 ic2it 15 0 1824 916 488 S 0 0.0 0:00.01 pop3d
29547 root 15 0 5796 2808 1120 S 0 0.1 0:30.37 lshttpd
1 root 15 0 1700 548 468 S 0 0.0 0:22.77 init
Tasks: 176 total, 2 running, 174 sleeping, 0 stopped, 0 zombie
Cpu(s): 1.2% us, 2.9% sy, 24.1% ni, 67.1% id, 3.5% wa, 0.1% hi, 1.2% si
Mem: 4137244k total, 3442740k used, 694504k free, 251116k buffers
Swap: 4096532k total, 144k used, 4096388k free, 2642100k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
28287 nobody 16 1 13412 5020 2988 S 22 0.1 0:02.34 lsphp5
29192 nobody 16 1 13420 5476 3452 S 18 0.1 0:01.83 lsphp5
26441 nobody 16 1 16352 8424 3300 R 15 0.2 0:09.41 lsphp5
29484 nobody 16 1 13388 4924 2916 S 14 0.1 0:00.67 lsphp5
27610 nobody 16 1 13412 5244 3212 S 13 0.1 0:02.42 lsphp5
29204 nobody 16 1 13536 5424 3284 S 11 0.1 0:01.81 lsphp5
29135 nobody 17 1 13468 5032 2944 S 5 0.1 0:01.52 lsphp5
29549 nobody 15 0 93464 87m 36m S 5 2.2 83:18.49 lshttpd
29245 nobody 16 1 13408 5004 2976 S 3 0.1 0:01.38 lsphp5
29543 nobody 16 1 18020 9260 2736 S 2 0.2 0:00.07 lsphp5
29524 mailnull 15 0 8372 3860 2648 S 1 0.1 0:00.02 exim
29526 mailnull 15 0 8372 3864 2652 S 1 0.1 0:00.02 exim
29542 ic2it 15 0 1824 916 488 S 0 0.0 0:00.01 pop3d
29547 root 15 0 5796 2808 1120 S 0 0.1 0:30.37 lshttpd
1 root 15 0 1700 548 468 S 0 0.0 0:22.77 init
top - 23:18:13 up 15 days, 4:17, 1 user, load average: 11.74, 7.30, 4.61
Tasks: 199 total, 7 running, 190 sleeping, 2 stopped, 0 zombie
Cpu0 : 1.6% us, 3.1% sy, 18.9% ni, 67.9% id, 5.9% wa, 0.2% hi, 2.3% si
Cpu1 : 1.1% us, 1.9% sy, 15.6% ni, 78.1% id, 2.7% wa, 0.0% hi, 0.5% si
Cpu2 : 0.4% us, 3.1% sy, 34.2% ni, 58.8% id, 1.7% wa, 0.1% hi, 1.7% si
Cpu3 : 1.2% us, 2.7% sy, 22.8% ni, 64.5% id, 8.0% wa, 0.0% hi, 0.6% si
Mem: 4137244k total, 2562148k used, 1575096k free, 678184k buffers
Swap: 4096532k total, 144k used, 4096388k free, 1230884k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1754 nobody 17 1 13804 6272 3860 S 8 0.2 0:05.22 lsphp5
2141 root 18 0 29356 24m 648 R 8 0.6 0:31.19 lfd
2505 nobody 16 1 13444 5304 3252 S 8 0.1 0:04.35 lsphp5
32413 nobody 16 1 13820 6104 3676 S 8 0.1 0:05.60 lsphp5
2543 nobody 16 1 18728 10m 3884 S 7 0.3 0:06.27 lsphp5
3536 nobody 16 1 16496 7892 2836 R 6 0.2 0:00.13 lsphp5
3540 nobody 16 1 13384 4848 2852 S 6 0.1 0:00.30 lsphp5
3546 nobody 16 1 18040 8768 2760 R 6 0.2 0:00.14 lsphp5
3560 nobody 16 1 18068 9848 3088 S 6 0.2 0:00.15 lsphp5
3542 nobody 16 1 13392 4852 2844 S 5 0.1 0:00.24 lsphp5
31115 nobody 16 1 13840 6392 3944 S 5 0.2 0:21.44 lsphp5
803 nobody 16 1 13504 5384 3272 S 4 0.1 0:07.13 lsphp5
3545 nobody 16 1 18024 9288 2764 S 3 0.2 0:00.09 lsphp5
3548 nobody 16 1 13424 5204 3184 S 3 0.1 0:00.23 lsphp5
29712 nobody 16 1 13828 6324 3888 S 3 0.2 0:15.92 lsphp5
801 nobody 16 1 18476 10m 3896 S 3 0.3 0:14.62 lsphp5
2516 nobody 16 1 18080 10m 3508 S 3 0.2 0:05.39 lsphp5
2534 nobody 16 1 17640 9300 3256 S 3 0.2 0:06.45 lsphp5
3541 nobody 16 1 13384 4856 2860 S 3 0.1 0:00.27 lsphp5
2284 root 0 -20 0 0 0 S 2 0.0 36:39.36 loop0
3535 nobody 16 1 17044 8432 2828 S 2 0.2 0:00.16 lsphp5
3547 nobody 20 1 17156 9424 3468 R 2 0.2 0:00.20 lsphp5
3550 nobody 16 1 13432 4908 2860 S 2 0.1 0:00.31 lsphp5
21354 nobody 16 0 78036 73m 24m D 2 1.8 9:50.61 lshttpd
Tasks: 199 total, 7 running, 190 sleeping, 2 stopped, 0 zombie
Cpu0 : 1.6% us, 3.1% sy, 18.9% ni, 67.9% id, 5.9% wa, 0.2% hi, 2.3% si
Cpu1 : 1.1% us, 1.9% sy, 15.6% ni, 78.1% id, 2.7% wa, 0.0% hi, 0.5% si
Cpu2 : 0.4% us, 3.1% sy, 34.2% ni, 58.8% id, 1.7% wa, 0.1% hi, 1.7% si
Cpu3 : 1.2% us, 2.7% sy, 22.8% ni, 64.5% id, 8.0% wa, 0.0% hi, 0.6% si
Mem: 4137244k total, 2562148k used, 1575096k free, 678184k buffers
Swap: 4096532k total, 144k used, 4096388k free, 1230884k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1754 nobody 17 1 13804 6272 3860 S 8 0.2 0:05.22 lsphp5
2141 root 18 0 29356 24m 648 R 8 0.6 0:31.19 lfd
2505 nobody 16 1 13444 5304 3252 S 8 0.1 0:04.35 lsphp5
32413 nobody 16 1 13820 6104 3676 S 8 0.1 0:05.60 lsphp5
2543 nobody 16 1 18728 10m 3884 S 7 0.3 0:06.27 lsphp5
3536 nobody 16 1 16496 7892 2836 R 6 0.2 0:00.13 lsphp5
3540 nobody 16 1 13384 4848 2852 S 6 0.1 0:00.30 lsphp5
3546 nobody 16 1 18040 8768 2760 R 6 0.2 0:00.14 lsphp5
3560 nobody 16 1 18068 9848 3088 S 6 0.2 0:00.15 lsphp5
3542 nobody 16 1 13392 4852 2844 S 5 0.1 0:00.24 lsphp5
31115 nobody 16 1 13840 6392 3944 S 5 0.2 0:21.44 lsphp5
803 nobody 16 1 13504 5384 3272 S 4 0.1 0:07.13 lsphp5
3545 nobody 16 1 18024 9288 2764 S 3 0.2 0:00.09 lsphp5
3548 nobody 16 1 13424 5204 3184 S 3 0.1 0:00.23 lsphp5
29712 nobody 16 1 13828 6324 3888 S 3 0.2 0:15.92 lsphp5
801 nobody 16 1 18476 10m 3896 S 3 0.3 0:14.62 lsphp5
2516 nobody 16 1 18080 10m 3508 S 3 0.2 0:05.39 lsphp5
2534 nobody 16 1 17640 9300 3256 S 3 0.2 0:06.45 lsphp5
3541 nobody 16 1 13384 4856 2860 S 3 0.1 0:00.27 lsphp5
2284 root 0 -20 0 0 0 S 2 0.0 36:39.36 loop0
3535 nobody 16 1 17044 8432 2828 S 2 0.2 0:00.16 lsphp5
3547 nobody 20 1 17156 9424 3468 R 2 0.2 0:00.20 lsphp5
3550 nobody 16 1 13432 4908 2860 S 2 0.1 0:00.31 lsphp5
21354 nobody 16 0 78036 73m 24m D 2 1.8 9:50.61 lshttpd
top - 23:27:04 up 15 days, 4:26, 1 user, load average: 3.46, 3.40, 3.75
Tasks: 178 total, 4 running, 165 sleeping, 9 stopped, 0 zombie
Cpu(s): 0.6% us, 2.5% sy, 17.3% ni, 75.5% id, 3.2% wa, 0.0% hi, 0.8% si
Mem: 4137244k total, 2854040k used, 1283204k free, 682852k buffers
Swap: 4096532k total, 144k used, 4096388k free, 1599360k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6063 nobody 16 1 16260 7764 2932 S 15 0.2 0:02.15 lsphp5
5989 nobody 16 1 17080 8604 2908 S 12 0.2 0:00.85 lsphp5
2412 nobody 16 1 16656 9172 3872 S 10 0.2 0:05.82 lsphp5
3972 nobody 16 1 16568 9012 3648 S 7 0.2 0:09.05 lsphp5
5983 nobody 17 1 16536 7964 2840 S 6 0.2 0:00.24 lsphp5
6042 nobody 16 1 16536 8500 3208 S 5 0.2 0:01.58 lsphp5
6171 nobody 16 1 15716 7004 2812 R 4 0.2 0:00.13 lsphp5
3801 nobody 16 1 16656 9244 3928 S 3 0.2 0:14.33 lsphp5
21354 nobody 15 0 78592 73m 24m S 2 1.8 10:04.34 lshttpd
4229 nobody 16 1 16652 9156 3856 S 2 0.2 0:07.52 lsphp5
5920 nobody 16 1 16288 8168 3236 S 2 0.2 0:01.70 lsphp5
6169 nobody 16 1 16248 7712 2908 S 2 0.2 0:00.06 lsphp5
5917 nobody 16 1 16628 8820 3592 S 2 0.2 0:00.62 lsphp5
6127 nobody 16 1 16232 7644 2764 S 2 0.2 0:00.17 lsphp5
5918 nobody 16 1 16256 7808 2880 S 1 0.2 0:00.83 lsphp5
6170 nobody 18 1 16216 7252 2448 S 1 0.2 0:00.04 lsphp5
6172 nobody 16 1 14800 5340 2436 R 1 0.1 0:00.04 lsphp5
Tasks: 178 total, 4 running, 165 sleeping, 9 stopped, 0 zombie
Cpu(s): 0.6% us, 2.5% sy, 17.3% ni, 75.5% id, 3.2% wa, 0.0% hi, 0.8% si
Mem: 4137244k total, 2854040k used, 1283204k free, 682852k buffers
Swap: 4096532k total, 144k used, 4096388k free, 1599360k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6063 nobody 16 1 16260 7764 2932 S 15 0.2 0:02.15 lsphp5
5989 nobody 16 1 17080 8604 2908 S 12 0.2 0:00.85 lsphp5
2412 nobody 16 1 16656 9172 3872 S 10 0.2 0:05.82 lsphp5
3972 nobody 16 1 16568 9012 3648 S 7 0.2 0:09.05 lsphp5
5983 nobody 17 1 16536 7964 2840 S 6 0.2 0:00.24 lsphp5
6042 nobody 16 1 16536 8500 3208 S 5 0.2 0:01.58 lsphp5
6171 nobody 16 1 15716 7004 2812 R 4 0.2 0:00.13 lsphp5
3801 nobody 16 1 16656 9244 3928 S 3 0.2 0:14.33 lsphp5
21354 nobody 15 0 78592 73m 24m S 2 1.8 10:04.34 lshttpd
4229 nobody 16 1 16652 9156 3856 S 2 0.2 0:07.52 lsphp5
5920 nobody 16 1 16288 8168 3236 S 2 0.2 0:01.70 lsphp5
6169 nobody 16 1 16248 7712 2908 S 2 0.2 0:00.06 lsphp5
5917 nobody 16 1 16628 8820 3592 S 2 0.2 0:00.62 lsphp5
6127 nobody 16 1 16232 7644 2764 S 2 0.2 0:00.17 lsphp5
5918 nobody 16 1 16256 7808 2880 S 1 0.2 0:00.83 lsphp5
6170 nobody 18 1 16216 7252 2448 S 1 0.2 0:00.04 lsphp5
6172 nobody 16 1 14800 5340 2436 R 1 0.1 0:00.04 lsphp5