LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Ram needed to run a VM (https://www.linuxquestions.org/questions/linux-hardware-18/ram-needed-to-run-a-vm-4175603610/)

DanceMan 04-10-2017 11:24 PM

Ram needed to run a VM
 
I use mostly older computers, both laptops and desktops. How much ram do I need to run a VM, Virtual Box probably? Machinery is Core2 Duo and Atom desktops, and Core 2 Duo and Pentium M laptops. That means from 2G to 8G, some will be 4G, and some are 32-bit only.

By run, I include a range from "run well" to "will work for browsing, but don't think about anything demanding."

Base OS would be Mint Cinnamon or Mate, guest OS would be Win 7.

ondoho 04-11-2017 01:45 AM

virtualbox strongely suggests to always use less than 50% of your available RAM.
then it depends on the vm; a fullblown KDE desktop will certainly require at least 1GB, but a command line debian install just needs a few dozen MB. etc.
but it isn't only the RAM; newer CPUs come with virtualization support; without that it's going to be tough going for everything graphical.

jsbjsb001 04-11-2017 07:27 AM

It depends, is the short answer.

The long answer is, it depends on the distro, (as ondoho said) desktop environment, the apps you plan on running in your VM, what you plan on using your VM for, etc.

So maybe fill in the blanks there, and we can give you better answer.

sundialsvcs 04-11-2017 09:21 AM

The VM will "reserve" a section of the host's RAM, and, in order to run efficiently, it needs for that RAM to actually be available for its (exclusive) use.

I often run VMs with as little as half-a-gigabyte of RAM. But, the memory is uncontested on the host. I do not run memory-intensive host applications while I am running a VM.

My VMs ordinarily do not run a GUI.

DanceMan 04-11-2017 02:50 PM

'newer CPUs come with virtualization support"

Thanks for reminding me of this. Certainly the Pentium M's will lack this.


For lack of any definitive advice or feedback on ram amounts (I did give the OS that would be used) I'll start with the best hardware, an E8400 with 8G ram, and work down from there and find out by trial and error.

As an aside, an old (ancient by current standards?) Thinkpad T40, T41 or T42 and Travelmate equivalent with ram maxed at 2G and hdd upgraded from 4200rpm to 5400rpm runs well for browsing on Mint Mate 32-bit. Some can even manage streaming a football game with a few dropped frames, but current video is beyond them.

jefro 04-11-2017 02:51 PM

Swap files have always been a way to help with less than optimal ram. Modern vm's on modern systems can allocate ram a bit.

!!! 04-11-2017 03:03 PM

Edit: I got your LinuxMint host, Win7 guest scenario backwards here, sorry.

My opinion: (WinXP 2G netbook; ...x600 screen bad for ...x768 and unusably slow GUI withOUT VT-x)
CLI: 0.5G guest linux, on 1-2G host Win PC; twice that for minimal GUI; 4x that for average linux gui.
Yes, try small; watch top/taskmgr. Try it: it's totally QUICK and easy with vbox! Let us & future readers know what you find!!! (is vt-x essential to 'adaquate' gui perf?)

p.s. it may likely depend on the Win ram being *really* free: I ran into a 2G Win7 with ram all used, NO app running, an svchost (netsvcs) where I couldn't attribute threads individually, paging like crazy (hundred hard faults and million commits a second), using all ram, probably downloading updates or virus: 23.61.194.27 134.170.165.251 8.253.129.249 8.254.243.78 8.254.243.174 (hadn't been powered-on for a couple years; stops if no internet connection). Any 1 basic win tool I tried ran sloooow, even if I killed off most of dozens of processes, so didn't try vbox (yet).

frankbell 04-11-2017 08:24 PM

I give my VMs 4GB RAM each (I installed 16GB in my computer so I could do that).

I regularly run two and occasionally three. Note that they are not production VMs, but learning VMs.

jefro 04-11-2017 09:50 PM

I've played with some very old MS OS's and used old versions of qemu and bochs. They won't run modern linux.

ondoho 04-12-2017 12:52 AM

Quote:

Originally Posted by DanceMan (Post 5695723)
(I did give the OS that would be used)

indeed you did:
Quote:

Originally Posted by DanceMan (Post 5695432)
Base OS would be Mint Cinnamon or Mate, guest OS would be Win 7.

win7 as a guest on an old pentium? (snort, chuckle)
ok, you said you are going to somehow get newer hardware specifically for this.
may i ask why you need this so much?

jsbjsb001 04-12-2017 02:48 AM

Quote:

Originally Posted by DanceMan (Post 5695723)
'newer CPUs come with virtualization support"

Thanks for reminding me of this. Certainly the Pentium M's will lack this.


For lack of any definitive advice or feedback on ram amounts (I did give the OS that would be used) I'll start with the best hardware, an E8400 with 8G ram, and work down from there and find out by trial and error.

As an aside, an old (ancient by current standards?) Thinkpad T40, T41 or T42 and Travelmate equivalent with ram maxed at 2G and hdd upgraded from 4200rpm to 5400rpm runs well for browsing on Mint Mate 32-bit. Some can even manage streaming a football game with a few dropped frames, but current video is beyond them.

I'm not trying to be smart here but, just giving an OS, is not enough information to give you a proper answer. As with all respect, we are not mind readers here. Please bear this in mind when asking general questions, with all respect.

If your using such "old hardware", you cannot expect a modern OS to work very well (if at all) on said, "old hardware".

Personally, I agree with frankbell and do the same myself (giving my VM's 4GB of RAM each), for what it's worth.

ondoho 04-12-2017 12:03 PM

this:
https://www.virtualbox.org/wiki/End-user_documentation
and make sure to click all further links, too.
clarification: when it says "minimum 512MB RAM", that means for the guest; so afaiu the host must have more than 1GB of physical RAM

haertig 04-13-2017 09:08 PM

If your needs in the VM are meager, you can allocate it a meager amount of ram.

Example: My parents have an old computer, a Pentium E2180 2.00GHz, with 2Gb ram. Not very powerful. But they like this ancient board game - Hoyle Card Games - made by Sierra sometime back in the early 90's I think. I couldn't get that to run under Wine for them, so I used Virtualbox to run Windows 2000, allocated it 512Mb ram, and the old card game runs perfectly. They don't do anything else on the host (LinuxMint) when playing the card game however. And a game that old will certainly be lightweight.

ondoho 04-14-2017 01:06 AM

haertig: have you tried dosbox instead?

ericson007 04-14-2017 01:21 AM

In my case i use centos and have 2 virtual machines that overbook the max ram available onthe host.

I do also have ofher vms running but between numa and ballooning, it does seem to work well in terms of managing memory in the overall picture.

Old hardware i cannot advise much, but if it is standard stuff and at least sandybridge, ballooning will make things work pretty well with slight actual ram over commits.

Older hardware is interesting since eerything as to be virtualized, and on top of that I do find virtual box performance lacking a tad compared to kvm or xen.

Unfortunately if your hardqare is so old kvm may not be an option, but in my experience, it is huge, it is a nightmare but it just works so much better.

Pick up some cheap stuffwith vtx etc from ebay if you can. It does make things tons easier.


All times are GMT -5. The time now is 10:47 AM.