VMware Cloud Community
thunderbird83
Contributor
Contributor

Linux VMs slow / RAM problem?

Hello!

We are experiencing strange performance problems with Linux (Debian 4.0) Guests on our ESX servers.

From time to time they are incredibly slow, loading a webpage takes more than 20 seconds. Then they are fast again for some hours...

The ESX is not overloaded, and Windows VMs on the same server run fine. In the Linux guests there is nothing shown running. No CPU load, nothing.

I found out that the Linux guests allways use all available RAM (for file cache and buffers). Could it be that ESX pages out some RAM to the disk after some time? And then the guest is slow?

How do you handle that? I think it's unfavorable that Linux uses up all the RAM and I can't "overbook" the servers like it's possible with Windows guests.

Do I need to configure a special setting for Linux guests to run fine?

Thank you!

Reply
0 Kudos
9 Replies
_David
Enthusiast
Enthusiast

You need to install vmware tools in the linux guests.

http://www.virtualistic.nl/archives/64

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points
Reply
0 Kudos
thunderbird83
Contributor
Contributor

Ok, thank you! I installed the tools and they run fine. I saw that a memory control module was loaded.

But in Virtual Center the RAM usage is at the limit, although i flushed all caches.

In virtual center there are 3.79GB shown as used by the guest, but "free -m" shows only 276MB used and no buffers.

Reply
0 Kudos
kooltechies
Expert
Expert

Hi,

Please confirm if you are checking the ESX host memory usage or the VM memory usage.

Thanks,

Samir

Blog : http://thinkingloudoncloud.com || Twitter : @kooltechies || P.S : If you think that the answer is correct/helpful please consider rewarding points.
Reply
0 Kudos
thunderbird83
Contributor
Contributor

memory usage on host: 3.79GB

memory usage on guest: 3.72GB

"free -m" says 1.63GB used (incl. buffers and cache)

Reply
0 Kudos
kooltechies
Expert
Expert

Looks like there is a discrepancy here. I would advise you to restart the mgmt-vmware service on esx or reboot the VM to see if it's reflecting the correct usage.

Thanks,

Samir

Blog : http://thinkingloudoncloud.com || Twitter : @kooltechies || P.S : If you think that the answer is correct/helpful please consider rewarding points.
Reply
0 Kudos
suprauche
Enthusiast
Enthusiast

Hi,

It is the style of linux servers to use all of the RAM allocated to it. It is a normal case. ESX could page out some of the pages of the linux guest if those pages are not referred for a period of time. This occurs if there is an overall memory leakage in the ESX system. You should monitor your ESX server's memory usage, paging rates and see if it is related with that.

But i think your problem is related with the applications running on your linux guest. They may be waiting for a db lock or something else.

Best Regards,

Reply
0 Kudos
RParker
Immortal
Immortal

I found out that the Linux guests allways use all available RAM (for file cache and buffers). Could it be that ESX pages out some RAM to the disk after some time? And then the guest is slow?

Odd we recently started having problems with some Linux (redhat) as well. It seems that after a period the Linux guests seem to slow down over time. I have to login via the console to "massage" the Linux OS and then it's fine for a few more days. I think it has something to do with the tools.

The memory is usually consumed, I noticed that as well. If you assign 8G to a Linux VM, the host shows ALL the memory consumed, even if Linux shows 7G free, so there is something amiss with the tools I believe, but I can't pinpoint it, since it's not ALL the Linux. Then to alleviate the problem I turn off screen saver, make sure the screen doesn't turn off after some time (power options for Linux) and other than that, there isn't much to suggest.

Since we have the same problem, there may be some underlying new bug with the tools, so as a last resort uninstall the tools, and try running for a few days WITHOUT tools to see what happens.

Are you using the graphical shell? I tried with or without the shell, didn't seem to matter much. Also are these on the SAN or local storage?

Reply
0 Kudos
RParker
Immortal
Immortal

Looks like there is a discrepancy here. I would advise you to restart the mgmt-vmware service on esx or reboot the VM to see if it's reflecting the correct usage.

no discrepancy it's normal for Linux to do this. It doesn't do it on physical machines, which further leads me to believe there is a bug in the VM tools.

Reply
0 Kudos
thunderbird83
Contributor
Contributor

I use Debian 4.0 without X window system, only shell.

The hosts are all cloned and therefore identical systems, kernel etc. Only the software running slightly differs. The most are running Apache, MySQL and PHP.

On some the memory usage shown in Virtual Center is almost as high as the assigned RAM. On other servers the used RAM is shown correct (without buffers) even in Virtual Center.

btw, is there a possibility to disable the Cache and Buffers?

With Windows machines we can "overbook" the physical RAM (host 10 guests with 2GB of RAM each on a server with 16GB RAM for example). With Linux this doesn't work.

Reply
0 Kudos