Skip to main content

Oracle VM memory issue

After some first baby steps with Oracle VM I wanted to push this thing a little bit further. So my idea was to have more than a couple of VM's running simultaneously.
The Oracle VM told me however that I had not enough memory to do this.
So I was sitting in front of my dedicated laptop and told the screen that there should be 4 GB inside. The laptop however had one of his funny days and told me (using free and top) that really nothing more than 572 MB would be inside the machine.

Hmm - when a machine tells me something I am the first to listen. So I shutdown everything, got my screwdriver, opened the memory compartment and had a look. Indeed 1 bank of 2GB. I didn't check the second bank as this is hidden underneath the keyboard. Closing the machine and powering it up, I prepared myself for another round of telling it that it should recognize a little bit more than 572 MB.

I examined the dmesg and still it told me that there was only 572 MB inside.

Now imagine, you have just seen 2 GB inside (and hope that 3 or 4 are in there) while the Oracle VM keeps telling me that only a very limited part of that memory was there.

So friends and neighbors, there are two possibilities:
a) The memory was KAPUT
b) Something prevents Linux to see/use it all.

As I could not prove or examine option a) I had a look at option b).

A long long time ago I was pretty good with low level Linux (baking my own kernels and so on). And then I remembered that with Xen it is possible to fool around with the memory during boot time.

Checking the menu.lst of the GRUB I found the following:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
# Detect64 claims this is 64 bit box
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=572M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Oracle VM Server-ovs serial console (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz console=com1,vga com1=57600,8n1 dom0_mem=572M
...

Gotcha!

dom0_mem=572M

So I found the reason for the lack of memory (an amnesic laptop ;-)

Off we go - with a modified menu.lst:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda2
# initrd /initrd-version.img
#boot=/dev/sda
# Detect64 claims this is 64 bit box
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=572M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Andreas VM Server-ovs (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz dom0_mem=2048M
module /vmlinuz-2.6.18-128.2.1.4.9.el5xen ro root=UUID=ad545ccc-b2bb-450b-a048-a58b22c51cc4
module /initrd-2.6.18-128.2.1.4.9.el5xen.img
title Oracle VM Server-ovs serial console (xen-3.4.0 2.6.18-128.2.1.4.9.el5ovs)
root (hd0,0)
kernel /xen-32bit.gz console=com1,vga com1=57600,8n1 dom0_mem=572M
...

I added the "Andreas Server-ovs" stanza, to prevent me from a re-installation if something would not work.

So after a reboot my laptop tells me that it has the large amount I was hoping for.

As this part of the memory is just the amount Xen is using there is some more in it.

Checking what really is in there:

[root@ovm ~]# xm info | grep memory
total_memory : 3447
free_memory : 1363
node_to_memory : node0:1363

This looks better.
Well i keep it like this for a while and play with my 2GB for now.

Comments

Just a hint: try to set your grub.conf back to what is was and hit "xm list | grep total_memory" ;)

Popular posts from this blog

Oracle Fusion Middleware Forum in Valencia

Last week the 22nd Fusion Middleware and PaaS Partner Community Forum took place in Valencia, Spain. For me this was a very valuable experience - again as I have visited a number of #ofmForum before. Let me recap here the highlights of this meeting. After a great Welcome-Reception the evening before, where everybody had the chance to catch up with a large number of old (and soon-to-be new) friends, the conference started with a kind of the state of the union by Jürgen Kress. The community already has more than 8000 people. This - in a fact - is a tremendous achievement. Everybody agrees that this is only possible by the relentless work of Jürgen who puts a big effort into this. It shows that other areas inside the Oracle technology stack do not benefit by equivalent communities. Even other communities, when they exist at all, do not compete in the same league. So a VERY BIG THANK YOU for Jürgen is at its place here. After the opening a keynote from Alistair Hopkins showed ver...

Oracle Streams Explorer

At the recent Oracle SOA Suite community forum in Budapest I had a hands-on experience with the Oracle Streams Explorer. Having worked with the Oracle Complex Event Processing and also some hands-on exercises with the new Oracle Event Processing, the Oracle Streams Explorer is a very easy to handle and useful addition to the area of near-real-time data insight and analysis. The user interface comes along in the new Oracle look-and-feel. You can select a number of areas like IOT, Risk and Fraud Management, Transportation and Logistics, Customer Experience and Analysis and Telecommunications. Within that you get a number of predefined patterns and resources. Defining your own solution can therefore be based on an existing solution in your catalog or simply by combining input streams and defining filters on them. Now plenty of examples can (and will) be named. The essence for me - and this is a message that I will convey to customers - is the fact that by using Oracle Streams Expl...

Copy and Paste

I bounced into a funny thing when I setup a Data Guard Physical Standby Database. First I prepared some database init parameters in a document (actually I reused some old documentation I had done in a previous project). log_archive_dest_1 location=use_db_recovery_file_dest valid_for=(all_logfiles,all_roles) db_unique_name=osbsoadb The "alter system ..." command worked like a charm. During the preparations I needed to restart the database instance. To my surprise I received an error that there was an issue with an init parameter. ORA-16024:  parameter  LOG_ARCHIVE_DEST_1  cannot  be  parsed Google did not really help me. So I decided to create a pfile from the spfile and had a look into it. There it became evident what the error was. Somehow during the copy & paste the end-of-lines were copied as well - leaving my init parameter with some newlines in it. Made one line from it in the pfile, started the db and cr...