High CPU Usage
I seem to be having quite high spikes in cpu usage (according to the graphs). I have little experience of linode or servers, infact im a newbie.
Where do I start with trouble shooting the problem ?
13 Replies
Sounds like a job for Longview
Is it just a LAMP/LEMP stack?How many visitors?
What's the output of free -mm and ps aux?
> Is it just a LAMP/LEMP stack?How many visitors?
What's the output of free -mm and ps aux?
er… what does that mean ??
I paid someone to set it up for me. Its litespeed and mysql
or
Linux Nginx MySQL PHP
Nginx = EngineX, the E
The other 2 things are commands you should run on your terminal through ssh:
1. free -mm
2. ps aux
Linux, Lightspeed, mysql php
Ill post the other data soon.
Do you think Im worrying needlessly ? is it normal to get spikes over 100% ?
total used free shared buffers cached
Mem: 2013 1927 86 0 120 1368
-/+ buffers/cache: 438 1575
Swap: 255 12 243
[root@whitbyweb ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2916 1052 ? Ss Apr12 0:01 /sbin/init
root 2 0.0 0.0 0 0 ? S Apr12 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/0]
root 4 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/0:0]
root 5 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/u:0]
root 7 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/u:0H]
root 8 0.0 0.0 0 0 ? S Apr12 0:00 [migration/0]
root 9 0.0 0.0 0 0 ? S Apr12 0:00 [rcu_bh]
root 10 0.1 0.0 0 0 ? S Apr12 6:29 [rcu_sched]
root 11 0.0 0.0 0 0 ? S Apr12 0:01 [ksoftirqd/1]
root 12 0.0 0.0 0 0 ? S Apr12 0:00 [migration/1]
root 13 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/1:0]
root 14 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/1:0H]
root 15 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/2]
root 16 0.0 0.0 0 0 ? S Apr12 0:00 [migration/2]
root 17 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/2:0]
root 18 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/2:0H]
root 19 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/3]
root 20 0.0 0.0 0 0 ? S Apr12 0:00 [migration/3]
root 21 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/3:0]
root 22 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/3:0H]
root 23 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/4]
root 24 0.0 0.0 0 0 ? S Apr12 0:00 [migration/4]
root 26 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/4:0H]
root 27 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/5]
root 28 0.0 0.0 0 0 ? S Apr12 0:00 [migration/5]
root 29 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/5:0]
root 30 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/5:0H]
root 31 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/6]
root 32 0.0 0.0 0 0 ? S Apr12 0:00 [migration/6]
root 33 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/6:0]
root 34 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/6:0H]
root 35 0.0 0.0 0 0 ? S Apr12 0:00 [ksoftirqd/7]
root 36 0.0 0.0 0 0 ? S Apr12 0:00 [migration/7]
root 37 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/7:0]
root 38 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/7:0H]
root 39 0.0 0.0 0 0 ? S< Apr12 0:00 [cpuset]
root 40 0.0 0.0 0 0 ? S< Apr12 0:00 [khelper]
root 41 0.0 0.0 0 0 ? S Apr12 0:00 [kdevtmpfs]
root 42 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/u:1]
root 44 0.0 0.0 0 0 ? S Apr12 0:00 [xenwatch]
root 45 0.0 0.0 0 0 ? S Apr12 0:00 [xenbus]
root 210 0.0 0.0 0 0 ? S Apr12 0:00 [bdi-default]
root 212 0.0 0.0 0 0 ? S< Apr12 0:00 [kblockd]
root 221 0.0 0.0 0 0 ? S Apr12 0:06 [kworker/4:1]
root 224 0.0 0.0 0 0 ? S< Apr12 0:00 [md]
root 308 0.0 0.0 0 0 ? S< Apr12 0:00 [rpciod]
root 310 0.0 0.0 0 0 ? S Apr12 0:08 [kworker/1:1]
root 332 0.0 0.0 0 0 ? S Apr12 0:05 [kswapd0]
root 333 0.0 0.0 0 0 ? SN Apr12 0:00 [ksmd]
root 334 0.0 0.0 0 0 ? S Apr12 0:00 [fsnotify_mark]
root 338 0.0 0.0 0 0 ? S Apr12 0:00 [ecryptfs-kthrea]
root 340 0.0 0.0 0 0 ? S< Apr12 0:00 [nfsiod]
root 341 0.0 0.0 0 0 ? S< Apr12 0:00 [cifsiod]
root 344 0.0 0.0 0 0 ? S Apr12 0:00 [jfsIO]
root 345 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 346 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 347 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 348 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 349 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 350 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 351 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 352 0.0 0.0 0 0 ? S Apr12 0:00 [jfsCommit]
root 353 0.0 0.0 0 0 ? S Apr12 0:00 [jfsSync]
root 354 0.0 0.0 0 0 ? S< Apr12 0:00 [xfsalloc]
root 355 0.0 0.0 0 0 ? S< Apr12 0:00 [xfsmrucache]
root 356 0.0 0.0 0 0 ? S< Apr12 0:00 [xfslogd]
root 357 0.0 0.0 0 0 ? S< Apr12 0:00 [glock_workqueue]
root 358 0.0 0.0 0 0 ? S< Apr12 0:00 [delete_workqueu]
root 359 0.0 0.0 0 0 ? S< Apr12 0:00 [gfs_recovery]
root 360 0.0 0.0 0 0 ? S< Apr12 0:00 [crypto]
root 924 0.0 0.0 0 0 ? S Apr12 0:00 [khvcd]
root 1016 0.0 0.0 0 0 ? S< Apr12 0:00 [drbd-reissue]
root 1037 0.0 0.0 0 0 ? S< Apr12 0:00 [aoe_tx]
root 1038 0.0 0.0 0 0 ? S< Apr12 0:00 [aoe_ktio]
root 1046 0.0 0.0 0 0 ? S< Apr12 0:00 [kpsmoused]
root 1047 0.0 0.0 0 0 ? S Apr12 0:07 [kworker/2:1]
root 1085 0.0 0.0 0 0 ? S< Apr12 0:00 [deferwq]
root 1088 0.0 0.0 0 0 ? S< Apr12 0:14 [kworker/0:1H]
root 1089 0.0 0.0 0 0 ? S Apr12 0:39 [kjournald]
root 1090 0.0 0.0 0 0 ? S Apr12 0:06 [kworker/0:1]
root 1091 0.0 0.0 0 0 ? S Apr12 0:05 [kworker/6:1]
root 1092 0.0 0.0 0 0 ? S Apr12 0:05 [kworker/7:1]
root 1095 0.0 0.0 0 0 ? S Apr12 0:06 [kworker/3:1]
root 1110 0.0 0.0 0 0 ? S Apr12 0:06 [kworker/5:1]
root 1120 0.0 0.0 0 0 ? S Apr12 0:00 [kauditd]
root 1167 0.0 0.0 2516 352 ? S ~~root 1391 0.0 0.0 2512 272 ? S< Apr12 0:00 /sbin/udevd -d
root 1597 0.0 0.0 0 0 ? S Apr12 0:25 [flush-202:0]
root 1626 0.0 0.0 2860 584 ? Ss Apr12 0:00 /sbin/dhclient -1 -q -cf /etc/dhcp/dhclient-eth0.conf -lf /v
root 1669 0.0 0.0 10912 352 ? S
dbus 1718 0.0 0.0 3020 164 ? Ss Apr12 0:00 dbus-daemon –system
root 1750 0.0 0.0 8552 528 ? Ss Apr12 0:00 /usr/sbin/sshd
root 1760 0.0 0.0 5144 1172 ? S Apr12 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/db/mysql
mysql 2276 6.0 12.5 569284 258216 ? Sl Apr12 225:33 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --dat
root 2316 0.0 0.1 12364 2128 ? Ss Apr12 0:07 sendmail: accepting connections
smmsp 2324 0.0 0.0 12116 1728 ? Ss Apr12 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 2345 0.0 0.0 5180 620 ? Ss Apr12 0:00 /usr/sbin/abrtd
root 2352 0.0 0.0 5120 620 ? Ss Apr12 0:00 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
root 2370 0.0 0.1 7932 2272 ? S< Apr12 0:47 litespeed (lshttpd)
root 2373 0.0 0.0 2068 240 ? S< Apr12 0:10 httpd (lscgid)
nobody 2374 0.5 0.4 14252 9004 ? S< Apr12 19:42 litespeed (lshttpd)
root 2404 0.0 0.0 2944 352 ? Ss Apr12 0:00 /usr/sbin/atd
root 2435 0.0 0.0 2032 484 tty1 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty1
root 2437 0.0 0.0 2032 480 tty2 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty2
root 2439 0.0 0.0 2032 476 tty3 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty3
root 2441 0.0 0.0 2512 288 ? S< Apr12 0:00 /sbin/udevd -d
root 2442 0.0 0.0 2032 476 tty4 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty4
root 2444 0.0 0.0 2032 480 tty5 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty5
root 2446 0.0 0.0 2044 532 hvc0 Ss+ Apr12 0:00 /sbin/agetty /dev/hvc0 38400 vt100-nav
root 2447 0.0 0.0 2032 476 tty6 Ss+ Apr12 0:00 /sbin/mingetty /dev/tty6
root 2458 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/6:1H]
root 2469 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/5:1H]
root 2471 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/4:1H]
root 6367 0.0 0.0 0 0 ? S< Apr12 0:00 [kworker/2:1H]
root 6928 0.0 0.0 0 0 ? S Apr12 0:00 [kworker/4:2]
502 12218 0.0 0.2 59640 5492 ? S whitby 12222 0.0 0.2 59640 5492 ? S holder 12240 0.0 0.2 59640 5496 ? S wcsa 12260 0.0 0.2 59640 5492 ? S phpma 12594 0.0 0.2 59640 5460 ? S ~~whitby 14480 7.8 2.1 76532 43892 ? R< 14:06 2:01 lsphp5:/home/whitby/public_html/index.php
502 14514 2.6 1.7 66696 35312 ? S< 14:09 0:36 lsphp5
holder 14621 1.2 1.5 67196 32468 ? S< 14:14 0:13 lsphp5
whitby 14624 7.0 1.6 68492 34424 ? S< 14:16 1:07 lsphp5
502 14627 1.3 1.6 66528 33288 ? S< 14:17 0:11 lsphp5
502 14720 2.5 1.4 65752 29744 ? R< 14:25 0:10 lsphp5:/home/realwhitby/public_html/index.php
whitby 14721 2.7 2.0 76636 41968 ? R< 14:25 0:10 lsphp5:/home/whitby/public_html/index.php
wcsa 14730 0.3 0.9 62768 19956 ? S< 14:26 0:01 lsphp5
root 14803 0.1 0.1 11628 3616 ? Ss 14:31 0:00 sshd: glenn [priv]
glenn 14805 0.0 0.0 11628 1504 ? R 14:31 0:00 sshd: glenn@pts/0
glenn 14806 0.0 0.0 5148 1636 pts/0 Ss 14:31 0:00 -bash
root 14825 0.0 0.0 8064 1756 pts/0 S 14:31 0:00 sudo su -
root 14826 0.0 0.0 5464 1404 pts/0 S 14:31 0:00 su -
root 14827 0.0 0.0 5280 1692 pts/0 S 14:31 0:00 -bash
root 14846 0.0 0.0 4908 1056 pts/0 R+ 14:32 0:00 ps aux~~~~
I'm guessing your site is
BTW I used to mail order kippers from Whitby. Best in the world.
Plus you have that whole Dracula thing going on.
EDIT: I see from your forums that your site is really very busy yet it seems fast and responsive. Really don't worry about the CPU usage.
seems everyone in the world knows Whitby. Thanks for your support, you have certainly put my miknd at rest.
Ive been reading some articles on the net which highlight a brute force attack on wordpress sites over the past couple of weeks. Do you think this could account for the high cpu usage around week 14. I just find it very odd that the cpu usage jumped quite significantyly for no apparent reason :
As well as this cpu increase im seeing one of my sites running very slow at times, namely :
There are 3 domains on the linode and the others seem to run fine, but for some reason this once can run slow, or at least it seams to on my machine here at home.
Im not sure if this is wordpress software problem as I have totally cleaned out the install of wordpress and replaced with new files.
Im wondering if there is a problem somewhere on my set up.