LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Server Load!

Reply
 
Thread Tools Display Modes
  #1  
Old 01-20-2009, 07:42 AM
masood_y masood_y is offline
Senior Member
 
Join Date: Sep 2008
Posts: 121
Default Server Load!

My server load is high in last 7 week.
Here is my server status:

System Load RAM Usage CPU Usage Requests/Sec
6.27 187.8MB 4.2% 217

How can see why cpu load is high?
Im using 2cpu license.
Reply With Quote
  #2  
Old 01-20-2009, 11:02 AM
PSS PSS is offline
Senior Member
 
Join Date: Jun 2007
Posts: 126
You CPU load is not high, it's only 4%. Load average (5min) is a bit high, but not abnormal.

try shell commands:

top

it shows realtime values. quit with q. Press s +2 to set 2 second sampling interval.

ps auwx

It'll show all processes and what is running them.

free -t -m

shows you memory usage in MB:s. Normally nearly all memory should be used in Linux, but swap only by a little amount (2-5% of swap size). If you're swapping a lot it will kill performance.

It's hard to say anything specific as we don't know what scripts, databases, traffic do you run, and how.

Last edited by PSS; 01-20-2009 at 11:06 AM..
Reply With Quote
  #3  
Old 01-21-2009, 06:58 AM
masood_y masood_y is offline
Senior Member
 
Join Date: Sep 2008
Posts: 121
I see most of cpu load is for mysql:

Pid Owner Priority Cpu % Mem % Command
13639 mysql 0 81.8 4.1 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/giga.hostjewelry.info.pid --skip-external-locking --socket=/var/lib/mysql/mysql.sock

How can resolve this issue?
Reply With Quote
  #4  
Old 01-21-2009, 07:41 AM
anewday anewday is offline
Senior Member
 
Join Date: Nov 2007
Location: New York
Posts: 723
Your mysql is not optimized.

Last edited by anewday; 01-21-2009 at 09:48 AM..
Reply With Quote
  #5  
Old 01-21-2009, 07:43 AM
Bono Bono is offline
Senior Member
 
Join Date: Jan 2009
Posts: 75
You should optimize your mysql settings.
Reply With Quote
  #6  
Old 01-24-2009, 07:39 AM
brrr brrr is offline
Senior Member
 
Join Date: Aug 2007
Posts: 94
MySQL is commonly the most memory and CPU consuming process on most servers. Optimizing it is always important and can pay big dividends. Google the issue and you will find plenty of good advice and resources to do that.
Reply With Quote
  #7  
Old 03-15-2009, 02:28 PM
mysitegroup mysitegroup is offline
Member
 
Join Date: Mar 2009
Posts: 17
I will be the IOWAIT guy.... ha ha..

What is your servers IOWAIT?

If high, mySQL will fall on it's face - with high load... and this will snowball, with excessive threads being created, and get worse and worse.

Check and fix your IOWAIT (in addition to optimizing mySQL my.cnf file).

Warm regards.
Reply With Quote
  #8  
Old 03-16-2009, 04:19 AM
masood_y masood_y is offline
Senior Member
 
Join Date: Sep 2008
Posts: 121
I dont know what is IOWAIT, here is my curren mysql configuration.
Can you please check it?

Code:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-locking
skip-networking
safe-show-database
query_cache_limit=1M
query_cache_size=256M
query_cache_type=1
max_user_connections=200
max_connections=500
interactive_timeout=10
wait_timeout=20
connect_timeout=20
thread_cache_size=128
key_buffer=256M
join_buffer=1M
max_connect_errors=20
max_allowed_packet=16M
table_cache=1024
record_buffer=1M
sort_buffer_size=4M
read_buffer_size=4M
read_rnd_buffer_size=4M
thread_concurrency=4
myisam_sort_buffer_size=64M
server-id=1
log_slow_queries=/var/log/mysql-slow-queries.log
long_query_time=2
collation-server=latin1_general_ci

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/lib/mysql/mysql.pid
open_files_limit=8192

[mysqldump]
quick
max_allowed_packet=16M

[mysql]
no-auto-rehash
#safe-updates

[isamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M

[myisamchk]
key_buffer=32M
sort_buffer=32M
read_buffer=16M
write_buffer=16M

[mysqlhotcopy]
interactive-timeout
Reply With Quote
  #9  
Old 03-16-2009, 09:52 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,585
Quote:
Originally Posted by mysitegroup View Post
I will be the IOWAIT guy.... ha ha..

What is your servers IOWAIT?

If high, mySQL will fall on it's face - with high load... and this will snowball, with excessive threads being created, and get worse and worse.

Check and fix your IOWAIT (in addition to optimizing mySQL my.cnf file).

Warm regards.
One tip to reduce IOWAIT is to turn off updating access time of file system, search for "noatime" file system mount option for /etc/fstab .
Reply With Quote
  #10  
Old 03-16-2009, 10:30 AM
masood_y masood_y is offline
Senior Member
 
Join Date: Sep 2008
Posts: 121
Can you provide more information?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:41 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.