High memory usage

ramonrgl

Renowned Member
Sep 12, 2015
4
0
66
Hello all, im new in proxmox and have a problem with memory. My server is: a intel xeon 4c/8t E3-1240 3,40g with 32 g memory, actually have 4 vm with windows 7 ultimate and 3 gigabytes asigned, but after i start the first one the memory usage in server summary says it use 10 g and after the second vm its use 17-18 g, i stop both and the summary still say its use 17 g what im doing wrong?

Thxs in advanced.
 
Hello all, im new in proxmox and have a problem with memory. My server is: a intel xeon 4c/8t E3-1240 3,40g with 32 g memory, actually have 4 vm with windows 7 ultimate and 3 gigabytes asigned, but after i start the first one the memory usage in server summary says it use 10 g and after the second vm its use 17-18 g, i stop both and the summary still say its use 17 g what im doing wrong?

Thxs in advanced.
Hi,
linux takes memory, which is not used, for caching (buffer) data to speed up operations.

Look with free like this:
Code:
# free
             total       used       free     shared    buffers     cached
Mem:     132018788  118031712   13987076          0   56175092     348292
-/+ buffers/cache:   61508328   70510460
Swap:      8388604          0    8388604

##empty cache
# echo 3 > /proc/sys/vm/drop_caches

# free
             total       used       free     shared    buffers     cached
Mem:     132018788   59901372   72117416          0       3564     103648
-/+ buffers/cache:   59794160   72224628
Swap:      8388604          0    8388604
to see which process use the most mem see with
Code:
ps aux | sort -k 4 -rn | head -10
Udo
 
Ok im here again, we have two similar servers:

1- Test server CPU fx8329 16GB, 2HDD 2TB Hitachi
2 - Production Sever
intel xeon 4c/8t E3-1240 3,40g with 32 g memory

Test server information:

root 2985 5.3 12.9 2440908 2096852 ? Sl 11:16 32:47 /usr/bin/kvm -id 100 -chardev socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -smbios type=1,uuid=3761df58-96aa-4d28-8916-a496a01d19ed -name VM-PC -smp 2,sockets=1,cores=2,maxcpus=2 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga std -no-hpet -cpu kvm64,hv_spinlocks=0xffff,hv_relaxed,+lahf_lm,+x2apic,+sep -m 2048 -k es -cpuunits 1000 -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:6760faf208a -drive file=/var/lib/vz/images/100/vm-100-disk-2.qcow2,if=none,id=drive-ide1,format=qcow2,aio=native,cache=none,detect-zeroes=on -device ide-hd,bus=ide.0,unit=1,drive=drive-ide1,id=ide1,bootindex=200 -drive file=/var/lib/vz/template/iso/win7allin1.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=100 -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=8A:48:06:E3:F8:FC,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -rtc driftfix=slew,base=localtime -global kvm-pit.lost_tick_policy=discard


root 6811 15.3 10.6 4626744 1717724 ? Sl 12:07 86:00 /usr/bin/kvm -id 104 -chardev socket,id=qmp,path=/var/run/qemu-server/104.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/104.vnc,x509,password -pidfile /var/run/qemu-server/104.pid -daemonize -smbios type=1,uuid=77addec9-e0f5-4d70-bc0c-b54bb08baec3 -name UbuntuOs -smp 4,sockets=2,cores=2,maxcpus=4 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga vmware -cpu kvm64,+lahf_lm,+x2apic,+sep -m 4096 -k es -cpuunits 1000 -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:6760faf208a -drive file=/var/lib/vz/images/104/vm-104-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none,detect-zeroes=on -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -drive file=/var/lib/vz/template/iso/ubuntu-14.04.3-desktop-amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -netdev type=tap,id=net0,ifname=tap104i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=7A:E0:F6:DC:79:F0,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300
www-data 53810 0.1 0.3 282940 59056 ? S 21:28 0:00 pveproxy worker

top command

top - 21:27:55 up 10:11, 1 user, load average: 0.01, 0.02, 0.00
Tasks: 294 total, 1 running, 293 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.1 us, 0.3 sy, 0.0 ni, 97.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 16153872 total, 4550008 used, 11603864 free, 70360 buffers
KiB Swap: 4849660 total, 0 used, 4849660 free, 125244 cached


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6811 root 20 0 4518m 1.6g 4024 S 15.0 10.6 85:52.69 kvm
2985 root 20 0 2383m 2.0g 3864 S 5.0 13.0 32:44.47 kvm
2931 root 20 0 203m 38m 3992 S 0.7 0.2 1:13.59 pvestatd
2897 root 20 0 287m 62m 6620 S 0.3 0.4 0:05.13 pvedaemon worke
10261 www-data 20 0 285m 61m 4776 S 0.3 0.4 0:02.79 pveproxy worker
1 root 20 0 10600 828 704 S 0.0 0.0 0:00.58 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.04 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.16 ksoftirqd/0
5 root rt 0 0 0 0 S 0.0 0.0 0:00.00 stopper/0
6 root rt 0 0 0 0 S 0.0 0.0 0:00.02 watchdog/0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.05 migration/1
8 root rt 0 0 0 0 S 0.0 0.0 0:00.00 stopper/1
9 root 20 0 0 0 0 S 0.0 0.0 0:00.15 ksoftirqd/1
10 root rt 0 0 0 0 S 0.0 0.0 0:00.01 watchdog/1




www-data 52839 0.2 0.3 291328 61232 ? S 21:17 0:01 pveproxy worker
www-data 2962 0.0 0.3 281948 56628 ? S 11:16 0:00 spiceproxy worker
www-data 2961 0.0 0.3 279604 55720 ? Ss 11:16 0:00 spiceproxy
www-data 2936 0.0 0.3 280576 56628 ? Ss 11:16 0:00 pveproxy
www-data 10261 0.0 0.3 292440 62700 ? S 12:53 0:02 pveproxy worker
root 2898 0.0 0.3 294148 63700 ? S 11:16 0:05 pvedaemon worker
root 2897 0.0 0.3 294080 63812 ? S 11:16 0:05 pvedaemon worker

Production server info

root 4936 29.9 6.4 2556460 2114308 ? Sl 21:12 3:44 /usr/bin/kvm -id 101 -chardev socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/101.vnc,x509,password -pidfile /var/run/qemu-server/101.pid -daemonize -smbios type=1,uuid=1af3644a-583d-4320-8c89-954da20e565d -name Servidor-PC -smp 2,sockets=1,cores=2,maxcpus=2 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga std -no-hpet -cpu coreduo,hv_spinlocks=0xffff,hv_relaxed,+x2apic -m 2048 -k es -cpuunits 1000 -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:4cf6d66f1a9d -device ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7 -drive file=/var/lib/vz/images/101/vm-101-disk-1.vmdk,if=none,id=drive-sata0,format=vmdk,cache=unsafe,aio=threads,detect-zeroes=on -device ide-drive,bus=ahci0.0,drive=drive-sata0,id=sata0,bootindex=100 -drive file=/var/lib/vz/template/iso/Win_7.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/101/vm-101-disk-2.qcow2,if=none,id=drive-sata1,format=qcow2,cache=unsafe,aio=threads,detect-zeroes=on -device ide-drive,bus=ahci0.1,drive=drive-sata1,id=sata1 -netdev type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=02:79:05:E6:62:D4,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -rtc driftfix=slew,base=localtime -global kvm-pit.lost_tick_policy=discard


root 3178 16.5 6.3 2427076 2075696 ? Sl 20:52 5:19 /usr/bin/kvm -id 100 -chardev socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait -mon chardev=qmp,mode=control -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -smbios type=1,uuid=8c31925f-d181-49f1-9a86-778e4e3daf2c -name Salcedo01 -smp 1,sockets=1,cores=1,maxcpus=1 -nodefaults -boot menu=on,strict=on,reboot-timeout=1000 -vga std -no-hpet -cpu kvm64,hv_spinlocks=0xffff,hv_relaxed,+lahf_lm,+x2apic,+sep -m 2048 -k es -cpuunits 1000 -device piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=tablet,bus=uhci.0,port=1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 -iscsi initiator-name=iqn.1993-08.org.debian:01:4cf6d66f1a9d -drive file=/var/lib/vz/template/iso/Win_7.iso,if=none,id=drive-ide2,media=cdrom,aio=native -device ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200 -drive file=/var/lib/vz/images/100/vm-100-disk-1.raw,if=none,id=drive-ide0,format=raw,cache=writeback,aio=threads,detect-zeroes=on -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100 -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown -device e1000,mac=62:84:40:E6:F3:39,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300 -rtc driftfix=slew,base=localtime -global kvm-pit.lost_tick_policy=discard


www-data 5017 0.2 0.1 292384 62272 ? S 21:12 0:01 pveproxy worker
www-data 4599 0.1 0.1 291308 61316 ? S 21:08 0:01 pveproxy worker
www-data 3168 0.0 0.1 281952 56632 ? S 20:52 0:00 spiceproxy worker
www-data 3167 0.0 0.1 279608 55724 ? Ss 20:52 0:00 spiceproxy
www-data 3146 0.1 0.1 292492 62744 ? S 20:52 0:03 pveproxy worker
www-data 3143 0.0 0.1 280516 56644 ? Ss 20:52 0:00 pveproxy
root 3138 0.2 0.1 208552 38608 ? Ss 20:52 0:04 pvestatd
root 3118 0.0 0.1 294092 63376 ? S 20:52 0:01 pvedaemon worker

top command info

top - 21:31:30 up 39 min, 1 user, load average: 0.11, 0.30, 0.40
Tasks: 376 total, 2 running, 374 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.7 us, 0.8 sy, 0.0 ni, 95.2 id, 1.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 32913796 total, 14624696 used, 18289100 free, 2396 buffers
KiB Swap: 32505852 total, 0 used, 32505852 free, 97260 cached


PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3178 root 20 0 2370m 2.0g 3832 R 20.3 6.3 7:14.77 kvm
4936 root 20 0 2436m 2.0g 3912 S 5.6 6.4 4:28.02 kvm
3116 root 20 0 287m 61m 6252 S 1.7 0.2 0:02.04 pvedaemon worke
5017 www-data 20 0 285m 61m 4740 S 0.7 0.2 0:02.54 pveproxy worker
680 root 38 18 0 0 0 S 0.3 0.0 0:00.89 z_wr_iss/2
682 root 38 18 0 0 0 S 0.3 0.0 0:00.89 z_wr_iss/4
1 root 20 0 10608 824 692 S 0.0 0.0 0:00.66 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.04 migration/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
5 root rt 0 0 0 0 S 0.0 0.0 0:00.00 stopper/0
6 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
7 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
8 root rt 0 0 0 0 S 0.0 0.0 0:00.00 stopper/1
9 root 20 0 0 0 0 S 0.0 0.0 0:00.03 ksoftirqd/1

The test server have 294 task when the production server have 376 task, i think the high memory usage difference its here.

Someone can help me a bit?

thxs in advance.


 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!