VMware Cloud Community
saschmidt
Contributor
Contributor

Problem understanding the memory usage report

Hi,

I'm currently confused with the reports of the memory usage of a virtual machine. The guest is a CentOS 5.2 Server with the VMware Tools running.

The virtual center tells me:

Memory: 1024 MB

Memory Overhead: 120,33 MB

Host memory usage: 632 MB

Guest memory usage: 236 MB

But inside the virtual machine I get the following informations

root@~# cat /proc/meminfo

MemTotal: 1027068 kB

MemFree: 12296 kB

Buffers: 15188 kB

Cached: 17248 kB

SwapCached: 357124 kB

Active: 420632 kB

Inactive: 25524 kB

HighTotal: 0 kB

HighFree: 0 kB

LowTotal: 1027068 kB

LowFree: 12296 kB

SwapTotal: 2097144 kB

SwapFree: 1568592 kB

Dirty: 172 kB

Writeback: 0 kB

AnonPages: 411528 kB

Mapped: 10140 kB

Slab: 101112 kB

PageTables: 9364 kB

NFS_Unstable: 0 kB

Bounce: 0 kB

CommitLimit: 2610676 kB

Committed_AS: 747448 kB

VmallocTotal: 34359738367 kB

VmallocUsed: 1772 kB

VmallocChunk: 34359736183 kB

HugePages_Total: 0

HugePages_Free: 0

HugePages_Rsvd: 0

Hugepagesize: 2048 kB

If I compare these facts I don't understand why the virtual machine has "swap" space in use. Looking at "top" it tells me the following:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

4760 bss-tool 25 0 1163m 397m 3800 S 0.0 39.6 6:32.37 java

1902 ntp 15 0 19188 4884 3780 S 0.0 0.5 0:00.51 ntpd

27507 root 17 0 86004 2888 2180 S 0.0 0.3 0:00.04 sshd

24627 apache 16 0 248m 2248 1316 S 0.0 0.2 0:00.02 httpd

24630 apache 15 0 248m 2244 1308 S 0.0 0.2 0:00.02 httpd

24628 apache 15 0 248m 2240 1312 S 0.0 0.2 0:00.02 httpd

24626 apache 16 0 248m 2236 1320 S 0.0 0.2 0:00.01 httpd

24624 apache 15 0 248m 2112 1232 S 0.0 0.2 0:00.02 httpd

24629 apache 15 0 248m 1952 1128 S 0.0 0.2 0:00.01 httpd

24631 apache 15 0 248m 1936 1088 S 0.0 0.2 0:00.01 httpd

24625 apache 15 0 248m 1888 1100 S 0.0 0.2 0:00.03 httpd

27531 root 16 0 66196 1624 1188 S 0.0 0.2 0:00.13 bash

4477 root 18 0 248m 1596 1448 S 0.0 0.2 0:00.94 httpd

27509 sch 15 0 86004 1576 864 R 0.0 0.2 0:00.04 sshd

27510 sch 15 0 66064 1496 1160 S 0.0 0.1 0:00.03 bash

20677 root 17 0 86004 1480 1476 S 0.0 0.1 0:00.02 sshd

2180 root 16 0 86004 1468 1464 S 0.0 0.1 0:00.08 sshd

24089 root 15 0 66068 1460 1044 S 0.0 0.1 0:00.07 bash

27530 root 16 0 98.7m 1404 1044 S 0.0 0.1 0:00.01 su

2182 jse 15 0 86140 1228 1076 S 0.0 0.1 0:01.29 sshd

2183 jse 16 0 66068 1228 1064 S 0.0 0.1 0:00.52 bash

24088 root 16 0 98.7m 1136 776 S 0.0 0.1 0:00.00 su

1969 haldaemo 15 0 30484 1120 780 S 0.0 0.1 0:02.08 hald

28246 root 15 0 12604 1056 812 R 0.0 0.1 0:00.01 top

1760 root 15 0 10668 804 668 S 0.0 0.1 0:52.43 vmware-guestd

20680 tku 15 0 66068 768 700 S 0.0 0.1 0:00.03 bash

20679 tku 15 0 86148 756 752 S 0.0 0.1 0:00.05 sshd

1921 root 15 0 66928 672 512 S 0.0 0.1 0:00.21 sendmail

1889 root 15 0 21640 652 560 S 0.0 0.1 0:00.34 xinetd

1548 root 11 -4 27352 620 488 S 0.0 0.1 0:00.76 auditd

1929 smmsp 15 0 57684 620 492 S 0.0 0.1 0:00.06 sendmail

1550 root 7 -8 81804 588 512 S 0.0 0.1 0:00.30 audispd

1940 root 15 0 74820 564 492 S 0.0 0.1 0:00.71 crond

1998 haldaemo 16 0 12320 512 508 S 0.0 0.0 0:00.01 hald-addon-acpi

Can someone explain me the problem I'm facing? I think I've got problems understanding and analysing the data from the 3 different tools...

Thanks in advance

Sascha

Tags (5)
0 Kudos
3 Replies
FredPeterson
Expert
Expert

The data that ESX tells you is more accurate then inside the guest itself.

Essentially ESX is telling you it only sees 236MB of active memory, regardless of the fact you have 1GB assigned, its only needing to work with 236MB of it.

Host memory usage is the amount of physical RAM that the guest is actively using as its own that no other VM can share. In this case since the number is less then the assigned that implies page sharing and other memory saving features are handing back 400MB to the host to use elsewhere. Since the active guest memory is less then half of the host memory usage which in itself is also less then the assigned RAM, you've assigned more RAM to this server then it really needs (at least, at this point in time) and you could probably drop it to 512MB RAM (or maybe even 384) and be just fine.

Your OS is paging because it sees inactive memory (part of the difference between guest usage, host usage and assigned) as well. Like Windows, its paging when it really doesn't need to.

0 Kudos
francisco1844
Contributor
Contributor

What is that number in the "Host memory usage"? Is that how much memory ESX is using to manage that VM? I guess it is memory used by VM+overhead to manage it.

Thanks.

0 Kudos
FredPeterson
Expert
Expert

You are correct, its the total amount of memory including the overhead. Since overhead increases as assigned RAM increases, it makes for an even better case that you can drop the assigned RAM for real savings that aren't the magic myst that ESX does Smiley Happy

0 Kudos