example of transcendent memory and oracle databases

I did some tests with tmem using an Oracle Database 11gR2 and swingbench setup. You can see a graph below. Let me try to explain what this means.

Using Oracle VM 3 with some changes booting dom0 (additional parameters at the boot prompt) and with UEK2 as a guest kernel in my VM, I can make use of autoballooning. What you see in the graph below is very simple : it's a timeline (horizontal)of how much actual memory the VM is using/needing. I created 3 16GB VMs that I wanted to run on a 36GB Oracle VM server (so more VM memory than we have physically available in the server). When I start a 16GB VM (vertical) the Linux guest immediately balloons down to about 700Mb in size. It automatically releases pages to the hypervisor that are not needed, it's free/idle memory otherwise. Then I start a database with a 4GB SGA, as you can see, the second I start the DB, the VM grows to just over 4GB in size. Then I start swingbench runs, 25, 50, 100, 500, 1000 users. Every time such a run starts, you can see memory use/grab go up, when swingbench stops it goes down. In the end after the last run with 1000 users I also shut down the database instance and memory drops all the way to 700Mb.

I ran 3 guests with swingbench and the database in each and through dynamic ballooning and the guests cooperatively working with the hypervisor, I was able to start all 3 16GB VMs and there was no performance impact. When there was free memory in the hypervisor, cleancache kicked in and guests made use of those pages, including deduping and compression of the pages.

If you want to play with this yourself, you can run this command in dom0 to get decent statistics out of the setup : xm tmem-list --long --all | /usr/sbin/xen-tmem-list-parse. It will show you the compression ratio, the cache ratios etc. I used those statistics to generate the chart below. This yet another example of how, when one can control both the hypervisor and the guest operating system and have things work together, you get better and more interesting results than just black box VM management.

tmem>

Comments:

Hi Wim,

this is exactly what I'm trying to achieve on my own testbed - running several databases (and other stuff) sharing cpu/IO AND memory resources. But how did you enable the ballooning? Maybe I was blind when I scanned the doc.

Thanks,
Harald

Posted by guest on June 03, 2012 at 05:11 AM PDT #

Harald,

1) you need to use our uek2 kernel (2.6.39)
2) you must edit /etc/grub.conf : add parameter "tmem" at the end of the xen.gz boot line.
3) you can play with adding "tmem_compress" or "tmem_dedup" to the xen.gz boot line as well
4) reboot and check if your dom0 kernel has tmem enabled
in xm dmesg :
-> (XEN) tmem: initialized comp=N dedup=N tze=N global-lock=N
5) boot a guest with uek2 and check there as well
in dmesg :
frontswap enabled, RAM provided by Xen Transcendent Memory
cleancache enabled, RAM provided by Xen Transcendent Memory

Posted by Wim on June 03, 2012 at 10:18 AM PDT #

Hello Wim,
your test looks great and I tried it in our OVM3.1.1.
The VM will shrink the memory as expected but I hava problem when starting more VMs with more memory then availible on the VM-Server. The manager didn't not see, that there is free memory on the server.

What else did you do to start all the VM*s?

Posted by Thorsten Bruhns on June 07, 2012 at 05:57 AM PDT #

Thorsten,

the manager doesn't understand this yet

Posted by wim on June 07, 2012 at 08:12 AM PDT #

Are there plans to change the manager?
This will make the OVM more interesting for testsystems with lots of virtual machines.

Posted by Thorsten Bruhns on June 07, 2012 at 09:51 AM PDT #

yeah we 're trying to figure out when. that's the next phase. can't give you a specific timeline

Posted by wim on June 07, 2012 at 10:50 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Wim Coekaerts is the Senior Vice President of Linux and Virtualization Engineering for Oracle. He is responsible for Oracle's complete desktop to data center virtualization product line and the Oracle Linux support program.

You can follow him on Twitter at @wimcoekaerts

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
9
10
11
12
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today