-5

Why would my swap space be 100% full if I have over 2gb of free ram? I am concerned about the high load averages for having 2 virtual cpus (1 core each).

Here are the server specs, it is a virtual machine on xenserver:

Centos 5.8 x86
2 CPU
4Gb Ram
1Gb Swap

Top:

top - 10:49:26 up 10:12,  1 user,  load average: 1.53, 1.79, 2.34
Tasks: 113 total,   1 running, 112 sleeping,   0 stopped,   0 zombie
Cpu(s):  6.5%us,  6.0%sy,  0.0%ni, 83.2%id,  1.0%wa,  0.0%hi,  1.3%si,  2.0%st
Mem:   4194488k total,  1831136k used,  2363352k free,   157024k buffers
Swap:        0k total,        0k used,        0k free,  1264688k cached

free -m

             total       used       free     shared    buffers     cached
Mem:          4096       1795       2301          0        153       1241
-/+ buffers/cache:        400       3695
Soviero
  • 4,306
  • 7
  • 34
  • 59
ipengineer
  • 215
  • 2
  • 3
  • 9
  • Your "Swap" is displaying 0k total. What is the output to `swapon -s`? – Nathan C May 23 '13 at 15:58
  • Nothing is returned. I guess I was looking at the cached option and then in my monitoring software I am seeing swap at 100%. – ipengineer May 23 '13 at 16:02
  • If I do not have any swap space, and I have a large chunk of free memory why would my load average be as high as it is? – ipengineer May 23 '13 at 16:05
  • Who knows? You've told us nothing about what might be using CPU on that server. Try `top -s `` for a few seconds and see what's burning the CPU. – MadHatter May 23 '13 at 16:09
  • @ipengineer You have lots of free and cached memory, and a five-minute load average of 2.34 is really not something to be concerned about, unless your applications are under-performing. See http://www.linuxatemyram.com/ – pauska May 23 '13 at 16:12
  • @ipengineer also see http://en.wikipedia.org/wiki/Load_(computing) for a good explanation of the load average values. My best bet is that you are on shared VPS hosting, which 99% of the times are oversubscribed - especially when it comes to disk I/O. – pauska May 23 '13 at 16:14
  • Asterisk is using at max 40% of CPU usage, everything else is hardly touching the CPU. Here is a link to my perf graphs if this helps. What is weird is that cpu seems to be low, memory usage is low so I dont understand why the load averages would be that high. http://postimg.org/image/y5ydrp83h/ – ipengineer May 23 '13 at 16:17
  • And it looks like your memory usage monitor is broken. – Michael Hampton May 23 '13 at 16:52

1 Answers1

6

You don't have any swap space.

From your output from top:

Swap: 0k total
pauska
  • 19,532
  • 4
  • 55
  • 75