LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 09-24-2010, 06:34 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Running Multiple VMs on a Limited RAM


Hi,

My Intel PC has 512 MB of RAM. I have installed RHEL 5.x on the top of Windows XP as a Gust OS with Sun VirtualBox. It is running fine because I specified 25 MB RAM to be allocated to the Virtual Machine. I want to do some practical of NIS, NSF, SAMBA, BIND, etc. and so I want to run one more VM that I have already tested and is working fine. But since I have 512 MB of Physical RAM and out of which 250 * 2 = 500 MB of RAM is allocated to the two VMs so at anytime I am able to run only one of the two VMs. I just increased the Paging Size of Windows XP and made it 1200 MB. But it has not made the things any better.

Any suggestions? I know I need to get more RAM and will do that in next 1 or 2 weeks when I get my salary. Till then is there any solution so that I can do my practicals?
 
Old 09-24-2010, 07:58 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
RAM that is allocated to the VM is no longer available to the host. So when you run one VM with 250 Megs of RAM, you only have left 262 Megs for the host.

You thus are running two operating systems, each with very minimal RAM. This limits you. If you try to run a third OS...you just don't have enough memory.

You know what the solution is, and I don't think there's a practical workaround. You need more RAM.
 
Old 09-24-2010, 08:49 PM   #3
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by jiml8 View Post
You know what the solution is, and I don't think there's a practical workaround. You need more RAM.


Hey! I have done it! I mean, I just changed the settings of the two VMs and set their RAM Size to 124. But I started one VM at a time and then paused it before starting the second VM. Then resumed the first VM. Now both of them are working fine.
 
Old 09-25-2010, 12:39 AM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Fact - you need more RAM.

Period.

It's absurd to run any modern desktop GUI: Windows/XP, Ubuntu - you name it - in less than 512MB.

It's literally cheaper in the long run to buy a new motherboard that supports more (faster and cheaper) RAM, than to live with an older motherboard that only supports (less, slower, more expensive) RAM.

It makes absolutely no economic sense to keep obsolete hardware any longer than you need to.

But if you're stuck with an older motherboard - then DON'T expect any VM under any circumstances to run any faster than a .... very ... slow .... crawl.

You've been warned

Last edited by paulsm4; 09-25-2010 at 12:40 AM.
 
Old 09-25-2010, 03:23 AM   #5
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
For your VMs to run fine you can indeed trim down their memory even further; You could check and see how far you can go, before the system is going to hog up ;-) (another very funny thing to practice with: what is the bare minimum specs I need?)

- figure out which services are running, how much memory they consume and whether or not the are needed. Turn them off if you don't need them. If unsure, you can always start them at a later time :-)
- Turn off X, X eats massive amounts of memory. I think this is runlevel 3 by the specs.
- If feeling zealous: recompile your kernel to the bare minimum required

If you do this right, I think you can go as low as maybe as low as 50MB of ram or maybe even less.

For Paulsm4: there is a good reason to have less ram than what you'd call economically justified :-) If you don't have the money, you can't buy the RAM. :-) With memory as cheap as it is nowadays, it should be quite doable to save up some money to get some more RAM.

Just for your convenience: know that XP does not support very much RAM; it's 32-bit in every sense in that regard.
 
Old 09-25-2010, 07:04 PM   #6
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Quote:
For your VMs to run fine you can indeed trim down their memory even further; You could check and see how far you can go, before the system is going to hog up ;-) (another very funny thing to practice with: what is the bare minimum specs I need?)- figure out which services are running, how much memory they consume and whether or not the are needed. Turn them off if you don't need them. If unsure, you can always start them at a later time :-)
- Turn off X, X eats massive amounts of memory. I think this is runlevel 3 by the specs.
I did the same last midnight till morning. I knew I had to find out a way. I shutdown unnecessary services / applications on Windows XP - the Host OS. I then started the first Virtual Machine VM-1 in Run Level 3 and paused it after logging in. I started the second VM VM-2 in Run Level 3 as I needed Networking Enabled.

Yes, X was making it difficult for my PC to run them simultaneously on 512 of RAM along with the OS Windows XP SP2.


Quote:
- If feeling zealous: recompile your kernel to the bare minimum required
If you do this right, I think you can go as low as maybe as low as 50MB of ram or maybe even less.
That would be great to go about experimenting the Kernel thing. I think I need more skills and expertise to accomplish it. I have downloaded the latest stable version of Linux (linux-2.6.35.5.tar) and will figure out how to compile and use it.


About my Hardware configuration... I bought it 4 years ago and did a lot of work to save the money to get it. I was (and still am) very much interested in Computer programming. My Computer has this hardware configuration:

Intel(R), Pentium(R) 4 CPU 2.40GHz, 2.40 GHz, 512 of RAM

Since the RAM is DDR1 so it is costlier than DDR2. I will buy 1 GB of RAM in next a few days coz I am not able to install OpenSolaris 10. When I install it with VirtualBox, it reports "Unable to allocate memory". So, adding 1 GB of RAM would make things better.


Anyways, thanks for your post. You have touched upon good points.
 
Old 09-26-2010, 01:01 AM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Quote:
Since the RAM is DDR1 so it is costlier than DDR2
That's exactly the point I was trying to make. In the U.S., it's literally cheaper to buy an entire new motherboard, CPU and 2-4GB of DDR2 RAM than it is to buy 1GB for DDR1 RAM.

That is, if the older motherboard even *SUPPORTS* up to 1GB of RAM (which many older motherboards won't).

I know it feels bad to give up old hardware - especially if you're on a budget. But the ironic fact is that it's very, very often cheaper to buy a new (faster/bigger/better) system than it is to try "upgrading" an older one.

The technical term is "Penny Wise/Pound Foolish".

IMHO

Last edited by paulsm4; 09-26-2010 at 01:03 AM.
 
Old 09-26-2010, 08:39 AM   #8
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
"Penny Wise/Pound Foolish."


That is true! Haha!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tcptraceroute/Traceroute/Ping] Windows VMs & Linux VMs BiFo Linux - Networking 0 08-24-2010 02:07 PM
Debian limited to 4 GB RAM? miros84 Linux - Hardware 18 01-26-2010 03:32 PM
Running a process with limited root privileges geek.ksa Linux - Security 6 02-19-2009 04:35 PM
LXer: Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) LXer Syndicated Linux News 0 01-14-2009 08:20 PM
A problem with multiple VirtualBox VMs using the same TCP port crisostomo_enrico Solaris / OpenSolaris 5 08-22-2008 10:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 05:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration