0

My VPS is constantly on High Load from last 2 days , cant figure out what the problem is . here are more info about vps. VPS acts as HTTP(Apache), Mysql, Proftp Server, not much traffic., daily approx 300- 500 visits.

uname -a

Linux cforum 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

uptime

 07:07:15 up 5 days,  4:05,  1 user,  load average: 31.88, 44.97, 58.48

top -b -n 1

top - 07:08:00 up 5 days,  4:06,  1 user,  load average: 34.33, 43.79, 57.44
Tasks: 324 total,   1 running, 323 sleeping,   0 stopped,   0 zombie
Cpu(s):  2.4%us,  3.1%sy,  0.0%ni, 58.5%id, 35.8%wa,  0.0%hi,  0.0%si,  0.1%st
Mem:   1016280k total,  1006536k used,     9744k free,      536k buffers
Swap:  2097148k total,  1539640k used,   557508k free,   409436k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 5591 root      20   0 15156 1372  884 R  0.8  0.1   0:00.01 top
    1 root      20   0 19232  160   20 S  0.0  0.0   0:00.44 init
    2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd
    3 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    4 root      20   0     0    0    0 S  0.0  0.0   0:02.53 ksoftirqd/0
    5 root      RT   0     0    0    0 S  0.0  0.0   0:00.00 migration/0
    6 root      RT   0     0    0    0 S  0.0  0.0   0:57.89 watchdog/0
    7 root      20   0     0    0    0 S  0.0  0.0   0:33.08 events/0
    8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 cgroup
    9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper
   10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 netns
   11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 async/mgr
   12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 pm
   13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 xenwatch
   14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 xenbus
   15 root      20   0     0    0    0 S  0.0  0.0   0:02.15 sync_supers
   16 root      20   0     0    0    0 S  0.0  0.0   0:02.32 bdi-default
   17 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kintegrityd/0

full top output here

iostat

Linux 2.6.32-431.29.2.el6.x86_64 (cforum)         10/02/2014      _x86_64_        (1 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2.44    0.00    3.10   35.90    0.08   58.48

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
xvda            104.86      1182.53      4376.56  526606250 1948973680
xvdd              0.00         0.00         0.00        456          0

free -m

             total       used       free     shared    buffers     cached
Mem:           992        984          8          0          1        173
-/+ buffers/cache:        809        183
Swap:         2047       1431        616

df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       30G  7.1G   21G  26% /
tmpfs           497M     0  497M   0% /dev/shm

vmstat

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0 99 1467144   8076   2096 157136   32   32   594  2187   85   14  2  3 58 36  0

how can i find where the problem is ?

2 Answers 2

1

What immediately jumps out is that your system is swapping quite heavily - and this can very easily explain high loads - especially as cheap VPS's (and this looks to me like it probably is one based on the memory specs) - are very often bottlenecked with IO.

The first thing I would do [ with only the information you have provided ] - is to throw more ram at the problem. If thats not an option you may be able to play with VM.SWAPPINESS to make the problem "less bad" - but as your SWAP is bigger then your available memory I doubt you will get much out of that.

Maybe you can tune MySQL to use [much] less memory - I googled this for you.

4
  • i have already set swappiness to 10, i think its issue of io too, cause there is io wait . i have fine tuned mysql with mysqltuner,. but still server load goes high from time to time.,
    – user138870
    Oct 2, 2014 at 5:15
  • Yeah, that is very high wait I/O, compounded by the fact VPS hosting typically has poor I/O like @davidgo indicated. At this point there isn't much you you can do other than adding more memory to the instance, move MySQL off of it, or assign even less memory to MySQL.
    – Gene
    Oct 2, 2014 at 8:08
  • @Gene is it possible if i move the mysqld to another remote server?
    – user138870
    Oct 2, 2014 at 11:34
  • 1
    You can host MySQL on a different server. You just have to update your grants and make sure the connection between the servers is fast (low latency and enough bandwidth).
    – Gene
    Oct 2, 2014 at 15:37
0

This is quite typical on a VPS.

You could contact your VPS provider and request a move to another server. If they are somewhat decent they would do this without any issues. I've had success with this in the past :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy