memory balooning & page sharing

diaolin

Renowned Member
Jul 7, 2008
332
8
83
Trentino Italy
I will test the memory sharing present in kvm-83.
In this manner i will use this method for the win2k machines:

http://www.linux-kvm.com/content/get-performance-boost-backing-your-kvm-guest-hugetlbfs

mkdir /hugepages
mount -t hugetlbfs hugetlbfs /hugepages
reboot
and
in rc.local
echo 296 > /proc/sys/vm/nr_hugepages

and in the VMID.conf a parameter like this

mem-path: /hugepages

If this parameter exists then the kvm startup should be the same as always with
the parameter –mem-path /hugepages

The real question for Dietmar:

could you add into the interface of "Create machine" a flag like this:

Use page sharing?

If flagged then the web interface should write the mem-path into VMID.conf

The rest is into QemuServer.pm

Is it possible to have this change?

Tx for your work Dietmar & Friends, the solution is very good.

Ciao
This week i'm not in office and despite my answer can take a little more time
:)

Is anyone interested on this cange?

This solution can help when using multi desktop machines.

Same RAM - multiple sessions
 
Last edited:
i've seen nobody interested on ballooning

Anyway, i'm testing the memory ballooning between multiple machines
(win2k) just for reducing memory usage.

The solution proposed by KVM is very interesting.

I hope that in the next future we'll have a button that permits to use
hugepages in the VM itself.

:)

Ciao, Diaolin
 
Hi Diaolin,

I am quite interested in that feature! But there are so much things to do ...

For now, I can add the 'args' setting in qemu-server file, in order to pass arbitrary options to kvm. Would that help for now?

- Dietmar
 
+1

Memory overcommit (with no significant negative impact on performance ?) would be a huge plus for VDI.
Please report your test results Diaolin.
 
of course

i would use this for VDI.

When sufficiently tested i'll report the result.

I'm also investiganting the
qemu-img growing method

Ciao
 
ARGS - Please!

Hi Diaolin,

I am quite interested in that feature! But there are so much things to do ...

For now, I can add the 'args' setting in qemu-server file, in order to pass arbitrary options to kvm. Would that help for now?

- Dietmar

Dietmar, please let us know when Args is available - that would be a huge plus! I would be quite grateful to be able to pass additional options to KVM that are not yet supported in the web interface.

Thanks.
 
Aaaaaaaaaaaaargs...

Thank you, Dietmar

i'll probe the args today.

Many people was interested on it.

Just a question: if i write
args: "my args"

and then i modify from interface, the chenge does not affect the args parameter. True?
 
Dietmar - two words: THANK YOU!!!!!

That tiny little configuration option args has opened up so many options. All the features of KVM are now available to me. What a fast response too.

You guys rock - keep up the great work!

THANKS AGAIN!
 
it works but...

when using the memopry paging don't forget to assign the whole
dimension to the pages.

If you use a lower dimension than the assigned to the virtual machine
if the machine uses more than the paged it hangs.

BE CAREFUL.
in any case the performance is very good, i don't know how much
but it's visible.

Diaolin
Many thanks to Dietmar
 
Hi

I'm trying to optimize the use of a server with a Xeon 3Ghz CPU with 1GB of RAM.
So i tried hugepages with Proxmox 1.1. to run :
1/ debian apache server (1 Cpu - 512Mb RAM / 512Mb of Swap)
2/ 2x windows XP SP3 (1 Cpu - 512Mb)

I'm not going to use the all 1GB memory when all the VMs will be running so I'm willing to use Hugetlbfs and balooning.

I've created the hugepages file sys following :
http://www.linux-kvm.com/content/get-performance-boost-backing-your-kvm-guest-hugetlbfs
I've add the following args to the VMID.conf :
mem-path : /hugepages
The command line starting the VM doesn't seem to take care of the arg in the conf file. So I used the command line with the option "-mem-path /hugepages" and it apparently worked but...
It seems that a memory reservation is made when applying hugetlbfs, cause my memory use grow from 130Mb to 860Mb...
Plus, i've succeeded in starting 1 Windows XP SP3 VM but I can't start the 2nd one (which is a copy of the first)

Without hugetlbfs, the 2 VMs start.

Do you have a hint for me?

I really want to test hugetlbfs and ballooning in my production environement so could you help me achieving my test plz
 
Hi mobius,

The proper setting in your VMID.conf file should be:

args: -mem-path /hugepages
 
Hi mobius,

The proper setting in your VMID.conf file should be:

args: -mem-path /hugepages
hello there
i have done same

vps:~# tail -n 5 /proc/meminfo
HugePages_Total: 7869
HugePages_Free: 7354
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB

the strange points i need help with is

1- the host ram now showed up as fully used
Mem: 16414872k total, 16363328k used, 51544k free, 1504k buffers

2- when i run any bench mark in my windows 2003 kvm vm which have
args: -mem-path /hugepages
the load spiks some times to 3
my current system configuration

Uptime04:30:04 up 00:12, load average: 0.05, 0.65, 0.54 CPU(s)16 x Intel(R) Xeon(R) CPU X55600 @ . CPU Utilization
0.42%​

IO Delays
2.56%​

Physical Memory (15.65GB/15.59GB)
15.59GB​

Swap Space (15.00GB/42MB)
42MB​

HD Space root (94.49GB/8.32GB)
9.27%​

HD Space data (1378.03GB/9.55GB)
0.69%​

Version (package/version/build)pve-manager/1.1/3718 Kernel VersionLinux 2.6.24-3-pve #1 SMP PREEMPT Wed Feb 25 12:42:01 CET 2009 and my pveperf

CPU BOGOMIPS: 89604.27
REGEX/SECOND: 532578
HD SIZE: 94.49 GB (/dev/pve/root)
BUFFERED READS: 41.42 MB/sec
AVERAGE SEEK TIME: 21.01 ms
FSYNCS/SECOND: 900.97
DNS EXT: 242.55 ms
 
Hi

Thx for your help !

But in the 2nd point of my post i still doesn't understand what's happening.
It seems that a memory reservation is made when applying hugetlbfs, cause my memory use grow from 130Mb to 860Mb...
...
Without hugetlbfs, the 2 VMs start.
Do you have a hint for me?

And the memory used is less (about 780Mb)

I now succeeded in starting the two Vms with hugepages, but the memory in use grows upto 968Mb without doing anything and with a hugepages of 400mb.
It seems to be the same thing for amravit...

An idea?

thx

Mobius
 

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!