LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   General (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=25)
-   -   Server Load! (http://www.litespeedtech.com/support/forum/showthread.php?t=2638)

masood_y 01-20-2009 07:42 AM

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.

PSS 01-20-2009 11:02 AM

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.

masood_y 01-21-2009 06:58 AM

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?

anewday 01-21-2009 07:41 AM

Your mysql is not optimized.

Bono 01-21-2009 07:43 AM

You should optimize your mysql settings.

brrr 01-24-2009 07:39 AM

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.

mysitegroup 03-15-2009 02:28 PM

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.

masood_y 03-16-2009 04:19 AM

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


mistwang 03-16-2009 09:52 AM

Quote:

Originally Posted by mysitegroup (Post 14028)
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 .

masood_y 03-16-2009 10:30 AM

Can you provide more information?


All times are GMT -7. The time now is 03:45 PM.