Memory issues

chrisalavoine

Renowned Member
Sep 30, 2009
152
0
81
Hi all,

Am running Proxmox VE 1.4 beta:

pve-manager: 1.4-6 (pve-manager/1.4/4340)
qemu-server: 1.1-4
pve-kernel: 2.6.24-15
pve-kvm: not correctly installed
pve-firmware: 1
vncterm: 0.9-2
vzctl: 3.0.23-1pve3
vzdump: 1.2-2
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1

Linux ess-kvm-001 2.6.24-8-pve #1 SMP PREEMPT Mon Sep 28 16:25:36 CEST 2009 x86_64 GNU/Linux


Just booting my machine and it appears to be using 4GB of RAM (running a 'top' command). I have 8GB of RAM.

Obvisouly, once I've started a few VM's this disappears quite quickly. Any ideas why this should be happening?

Cheers,

c:)
 
Am running Proxmox VE 1.4 beta:

Please update!

[/Quote]
Just booting my machine and it appears to be using 4GB of RAM (running a 'top' command). I have 8GB of RAM.
[/QUOTE]

What theoutput of

# free

(after booting).
 
Have updated to 1.4 stable.

Still getting odd memory reporting. Proxmox web interface tells me I'm only using 50% RAM, but 'top' command tells me I'm using more like 90%.

Also, as time goes by the memory usage seems to be slowly creeping up until it reaches about 50MB free memory and then stabilises.

Any ideas why this should be?

Cheers,
c:)

EDIT: Also, after running iotop command it appears that there is a 'kvm -monitor" process that using a lot of resources. It seems to be running on VMID 110 which is a Windows 2003 server.
 
Last edited:
Have found a dirty fix for this.

Discovered that if I run the 'pveperf' command it clears the memory. So, for instance, last night I left the server and this morning it had stabilised at 50MB free memory once again. I ran 'pveperf' and it clear the memory to give me 3.5GB free.

So, for now, I've set a cron job to run pveperf once an hour. It's not a proper fix but it'll keep resources freed up while we figure out what's going on.

I can assure you I haven't misread the 'top' command.

Cheers,

c:)
 
Discovered that if I run the 'pveperf' command it clears the memory.

no, it simply flush the cache.

So, for instance, last night I left the server and this morning it had stabilised at 50MB free memory once again. I ran 'pveperf' and it clear the memory to give me 3.5GB free.

So, for now, I've set a cron job to run pveperf once an hour. It's not a proper fix but it'll keep resources freed up while we figure out what's going on.

I can assure you I haven't misread the 'top' command.

Seem you simply do not understand how memory works, and are not willing to learn it. What you do is nonsense.
 
no, it simply flush the cache.



Seem you simply do not understand how memory works, and are not willing to learn it. What you do is nonsense.

Apologies if I sounded arrogant.

Here is the output of free:

total used free shared buffers cached
Mem: 8162112 4231132 3930980 0 448672 27264
-/+ buffers/cache: 3755196 4406916
Swap: 7340024 2768 7337256


This is with pveperf running in cron. I don't understand memory very well but I always assumed that what 'top' was telling me was a real indication of memory values.

c:)

P.S. I'm always willing to learn.
 
This is with pveperf running in cron. I don't understand memory very well but I always assumed that what 'top' was telling me was a real indication of memory values.

top tells you the truth, but it show you 8 values, like

Code:
Mem:   6038972k total,  3555512k used,  2483460k free,   126020k buffers
Swap:  1959920k total,        0k used,  1959920k free,  2916160k cached

So above values indicates that 3.5GB of memory is used. But about 3GB is used for cache and filesystem buffers. So only 500MB are used.

If you run 'pveperf' with the cron job, the effect is that you basically turn of the filesystem cache. This results in bad performance and you do not gain anything. Cache/buffers aue automatically freed is some program want to use it for something else.

Hope things are more clear now.
 
top tells you the truth, but it show you 8 values, like

Code:
Mem:   6038972k total,  3555512k used,  2483460k free,   126020k buffers
Swap:  1959920k total,        0k used,  1959920k free,  2916160k cached

So above values indicates that 3.5GB of memory is used. But about 3GB is used for cache and filesystem buffers. So only 500MB are used.

If you run 'pveperf' with the cron job, the effect is that you basically turn of the filesystem cache. This results in bad performance and you do not gain anything. Cache/buffers aue automatically freed is some program want to use it for something else.

Hope things are more clear now.

Ok, I'll turn off the cron job, and then post another "free" this evening. Thanks for the explanation.

c:)
 
Ok. This is the result of the 'free' command after 6 hours:

total used free shared buffers cached
Mem: 8162112 8115872 46240 0 3883884 19500
-/+ buffers/cache: 4212488 3949624
Swap: 7340024 2772 7337252


Strange, eh?

As I mentioned in an earlier post there is a 'kvm -monitor' proc running that seems to be doing a lot of disk writes. It's linked to VMID 110 which is a Windows 2003 server. I only mention this because someone in another thread had said that maybe the Windows VM were causing the memory problems.

c:)
 
I have three VM's running on this machine.

2 x Ubuntu servers and a windows server 2003.

Ubuntu servers = 720MB each
Windows server = 2GB

Total memory = 3.5GB (ish)

This is what is reported when I first start the VM's. After running for around 6 hours (but only when the Windows machine is on), the memory is slowly used up until I reach the situation above (i.e. 50MB free memory). This means that if another process runs (qmrestore, vzdump) the whole system struggles.

If I turn off the windows machine the memory leak stops.

c:)
 
Code:
total used free shared buffers cached
Mem: 8162112 8115872 46240 0 3883884 19500
-/+ buffers/cache: 4212488 3949624
Swap: 7340024 2772 7337252

Above output says there ar 3.9 GB free! So what is strange about that?
 
Sorry. I'm getting very confused seeing the 8GB "used" column. There is 3.9GB in cache then?

The second value on the second line tell you what is free:
Code:
-/+ buffers/cache: 4212488 3949624

So 8115872k are used, but 3883884k+19500k aure use for buffer and cache.

If you subract buffers an cache from used:

8115872k - 3883884k - 19500k = 4212488k (this is what is really used)

The rest is free (total - used):

8162112 - 4212488 = 3949624 (this if free)

got it?
 
The second value on the second line tell you what is free:
Code:
-/+ buffers/cache: 4212488 3949624

So 8115872k are used, but 3883884k+19500k aure use for buffer and cache.

If you subract buffers an cache from used:

8115872k - 3883884k - 19500k = 4212488k (this is what is really used)

The rest is free (total - used):

8162112 - 4212488 = 3949624 (this if free)

got it?

Got it.
Wow, I've been reading memory wrong all this time! Thanks for taking the time with a very slow Englishman.

c:)