LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Virtual Machines on Linux and Max. Available Memory (https://www.linuxquestions.org/questions/linux-hardware-18/virtual-machines-on-linux-and-max-available-memory-581089/)

defa0009 08-30-2007 06:22 PM

Virtual Machines on Linux and Max. Available Memory
 
This may be a common question but I could not find a post on it.

I am in charge of some development servers at work. These physical servers are currently running Windows 2003 Server R2 Standard Edition (32 bit) but the server can support 64 bit. My understanding is this 32 bit OS will only recognize up to 4GB of memory?

So here is my problem... these servers need to host 8 Virtual Machines running Windows 2003 Server R2 Standard Edition (32 bit) that require 2GB of memory each. From what I have heard you can run VM's on Linux so what I would like to do if posssible is move these physical server's OS's to a Linux distro of some sort that could see more than just 4GB of memory (ie. 8x2=16GB). That way these VM's can all run together on the same machine saving the company having to buy more servers.

Here are a couple of questions I have that I hope someone can answer:

Q. Is it possible to run Windows based VM's on Linux?

Q. If so what Linux distro would best meet our needs?

Q. What is the max memory that would be recognized with a typical Linux install?

Q. Would it be possible to run 32 bit Windows based VM's on a 64 bit Linux distro?


Thanks for your help,
Rick.

Electro 08-30-2007 07:27 PM

A virtual machine for 80x86 processors creates a real computer so that you can run any 80x86 OS in the virtual machine. There is a performance issue even though virtual machines work in the low-level environment to handle some communications with devices.

A 32-bit OS can handle 4 GB of RAM but not all the memory can be used because of PAE. Some motherboard manufactures include an option to turn off PAE if possible and others are fixed in the on position. A 64-bit OS can handle over a terabyte of RAM, but it is limit by the maximum memory address that the processor can handle.

VMware ESX with VMware Virtual SMP could be used to handle 8 virtual machines on a multi-processor system. You need to pick a motherboard that can handle greater than 16 GB. An 8 processor or 16 processor with 32 GB of RAM server will cost the same as 8 computers with dual processors and 2 GB of RAM.

The distribution that I suggest that provides minimal fuss to get VMware to work is Gentoo. Another is CentOS if you want to use Redhat Enterprise like tools. For Debian based distributions, Ubuntu (server edition).

I suggest convert some of the Windows servers to Linux to save money. Yes, there are comparative Linux software that is equal and/or better than Windows.

defa0009 08-31-2007 07:14 PM

Electro, thanks for the reply. I have downloaded the Centos iso's. Is it possible to recompile the kernel to allow for more memory?

jiml8 08-31-2007 07:20 PM

I run VMWare Workstation on a Mandriva installation with no issues at all. Workstation went in without trouble when first installed, and has worked without trouble ever since, through multiple upgrades of Mandriva. All I have to do is recompile the distro-dependent stuff whenever I change kernel.

Workstation is a more complicated product than Server, which follows since workstations tend to do a lot more than servers do. If Workstation is trouble free, I certainly would expect Server to be trouble free as well.

syg00 08-31-2007 08:02 PM

Quote:

Originally Posted by Electro (Post 2876320)
A 32-bit OS can handle 4 GB of RAM but not all the memory can be used because of PAE. Some motherboard manufactures include an option to turn off PAE if possible and others are fixed in the on position.

This is extremely misleading. 32-bit Linux with PAE on a PAE capable motherboard will address and use up to 64 Gig of real storage. Each process is limited to a 4 Gig address space.

For Centos, merely use yum to install kernel-PAE. Check their fora, it's where I found it.
The free VMWare server (GSX ???) was limited to 2 CPUs per guest when I tried it under Centos. Things may be different now.
And of course the Linux options are to be considered as well.

defa0009 08-31-2007 10:25 PM

Thanks to all you guys for this valuable information.

I'm going to repeat myself just so I am clear on what your all saying....

I have 8 Windows based VM's and I need to give 2GB of ram to each of them, lets say even 4GB since that is the max that these Windows VM's will be able to access.

In order for me to acheive this if I install the 32 bit i386 Centos 5 OS (with Kernel-PAE) on a system with a board that supports PAE and stick 8x4=32GB of ram in it all of the Windows based VM's will be able to utilize their own maximum of 4GB each?

And 1 more question that I'm hoping you can answer. The server I have supports 64 bit applications so would it be possible to run 32 bit Windows based VM's on a 64 bit Linux distro?

syg00 09-01-2007 01:49 AM

Quote:

Originally Posted by defa0009 (Post 2877432)
I have 8 Windows based VM's and I need to give 2GB of ram to each of them, lets say even 4GB since that is the max that these Windows VM's will be able to access.

You can't.
You can give them 4 Gig, and given the amount of RAM you plan on having, it is likely it won't page, but you can't guarantee it.
Quote:

In order for me to acheive this if I install the 32 bit i386 Centos 5 OS (with Kernel-PAE) on a system with a board that supports PAE and stick 8x4=32GB of ram in it all of the Windows based VM's will be able to utilize their own maximum of 4GB each?
Yes - but virtual.
Quote:

The server I have supports 64 bit applications so would it be possible to run 32 bit Windows based VM's on a 64 bit Linux distro?
I wouldn't go there. Too many issues with host vs. hypervisor vs guest (kernel mode) vs. guest (userland).
I think you have enough to keep you occupied.
I haven't tried it though, so feel free to pioneer, and let us know how it goes ... :p

defa0009 09-01-2007 10:25 AM

Quote:

Originally Posted by syg00 (Post 2877497)
You can't.
You can give them 4 Gig, and given the amount of RAM you plan on having, it is likely it won't page, but you can't guarantee it.

Sorry but I'm kind of confused by what your saying... could you explain more in depth what you mean? Am I suggesting more memory than I need?

Quote:

Originally Posted by syg00 (Post 2877497)
Yes - but virtual.

The VM will use virtual memory but in the end isn't the VMwareServer application actually allocating the physical memory for it?


Thanks.

jiml8 09-01-2007 02:12 PM

Quote:

Originally Posted by defa0009 (Post 2877823)
The VM will use virtual memory but in the end isn't the VMwareServer application actually allocating the physical memory for it?
Thanks.

No, actually the kernel is allocating the memory that VMWare Server asks for, and that memory is ALL virtual. Ordinarily the kernel will use up all the physical memory first, so I would expect that you'll get results resembling what you expect, but you are getting into an area of the Linux kernel that is a bit ugly and not fully developed.

The page table requirements for the kernel to track 32 Gigs of RAM will be severe; I'm not sure how much the system itself will need for this, but you can bet it will be a lot.

I am not sure, but I think you'll be breaking ground on this - at least, insofar as allocating that much memory per server.

Electro 09-01-2007 05:37 PM

Linux is virtual memory and multi-tasking operating system. Running a 64-bit kernel that will handle 8 virtual machines running a 32-bit OS should not have any problems. Just make sure the host has a few gigabytes for itself or else it will crawl. For each virtual machine keep the RAM capacity lower than 3 GB, so you do not waste memory allocating 4 GB. I suggest giving 2 GB for each virtual machine.

Quote:

Originally Posted by syg00 (Post 2877361)
This is extremely misleading. 32-bit Linux with PAE on a PAE capable motherboard will address and use up to 64 Gig of real storage. Each process is limited to a 4 Gig address space.

For Centos, merely use yum to install kernel-PAE. Check their fora, it's where I found it.-+
The free VMWare server (GSX ???) was limited to 2 CPUs per guest when I tried it under Centos. Things may be different now.
And of course the Linux options are to be considered as well.

PAE is misleading too because it uses memory to address 4 GB or 64 GB. A 32-bit OS handling 4 GB of memory will provide 3.2 GB of RAM to the user, so the user it is not getting the memory that he or she paid for. Actually the 64 GB of memory will be virtual memory not real memory. Real memory is 4 GB on a 32-bit OS with out virtual memory methods getting in the way. Virtual memory provides dirty methods of allocating infinite memory at a cost of using memory to allocate very, very high addresses.

64-bit OS can handle several exabytes (1024^6) of real memory. PAE will then effect this OS when the capacity is equal or exceeded which is a shame.

PAE is weird magic to allocate memory for an 80x86 processor that can not handle memory as real memory.

syg00 09-01-2007 08:26 PM

Quote:

Originally Posted by Electro (Post 2878138)
Running a 64-bit kernel that will handle 8 virtual machines running a 32-bit OS should not have any problems.

Good - glad to hear it.
I only have old PIII Xeons to play with, so I had no experience with this. I believe the Xen people used to warn against mixing modes, but I'm happy to be wrong.

defa0009 09-03-2007 08:31 AM

Again thanks for all the input. Here is what I am going to try:

1. Install Centos5 64bit
2. Load 20gb of ram
3. Dedicate 2gb for each of the 8 VM's and leave 4gb for Centos

BTW should I still intall the kernel-PAE through yum, do I still need it with this setup?

Also does anyone know of a good free VM server application for Linux, and would I be able to migrate my existing VMWare VM's into it or do I need to re-create them with the server app I install in Centos?

syg00 09-03-2007 03:13 PM

Quote:

Originally Posted by defa0009 (Post 2879681)
BTW should I still intall the kernel-PAE through yum, do I still need it with this setup?

No - PAE is only relevant in 32-bit.

defa0009 09-03-2007 03:17 PM

Quote:

Originally Posted by syg00 (Post 2880053)
No - PAE is only relevant in 32-bit.

Of course, that makes obvious sense...

Quote:

Also does anyone know of a good free VM server application for Linux, and would I be able to migrate my existing VMWare VM's into it or do I need to re-create them with the server app I install in Centos?

Electro 09-03-2007 04:11 PM

VMware is the best and the easiest to use under Linux. It is very reliable. All the information about VMware Server is on VMware's site. Though I suggest use VMware ESX with Virtual SMP and other add-ons to help you manage your setup.


All times are GMT -5. The time now is 03:48 PM.