Dual VM (Linux SMP) on a Linux Host

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
Has anyone tried this? I've searched and searched to no avail.

I'd like to setup a box (Q6600) with Linux (I've gotten fond of Ubuntu because it's pretty damn easy and the GUI reduces my learning curve). I would then like to install VMWare Server and setup two VMs (again using Linux) and installing an SMP client in each.

I've alread got the VM "image" I want to use so this works well for me. I just need to get the Host OS and VMWare Server up and running.

- I had thought about WinXP, but cost of licensing is an issue
- I had looked at diskless, but I don't believe it can run Dual SMPs (please correct me if I am wrong).
- Running Dual SMPs (native in Linux) I believe suffers from the same issue that running it in Windows where it crashes the other instance if you kill the first instance

If so,
- is 2 GB enough memory for this? or would 4GB be better
- Are there any pitfalls to be aware of when setting this up?
- Can you run this possibly on WMWare Player?

Are there any reasons you wouldn't want to do this?
 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
I believe that two instances of the Linux SMP Client suffers from the same issue that Dual Windows SMP clients suffer from. They both crash when you try to kill one of them.
 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
Not necessarily me killing it, but if for some reason it doesn't close gracefully (reboot or lose network connection or other), then you lose everything. At least that is the way I understand the Linux SMP client works. If it doesn't have the same issues, then this question is moot.

If they are separated (in their own VM), then if a box is rebooted nothing is lost.

 

gnewbury

[H]ard|DCer of the Month - September 2007
Joined
May 4, 2001
Messages
2,544
On my Kubuntu box if I kill 1 Fold the other does not die.
Dual SMP's no VM.

 

Charlie_D

Gawd
Joined
Mar 7, 2007
Messages
872
You can run either way, two SMP clients from the CLI (they won't crash each other), or in VMs. The advantage of the VMs has been that you show up as a 'dual core' machine, so you don't get the slow(er) quad WUs.

If you want to run two instances without the VM, just have two different directories; I run them from a bash script, since I like watching the progress while I'm putzing around, here's a sample:
Code:
#folding1
cd /home/chas/folding
taskset -c 0,1 ./fah6 -forceasm -smp -local -verbosity 9

Before anyone comments, yes it's basic. It's all I really need :p

the taskset is to marry it to a certain set of cores; this corresponds to core 1 and 2, the other bash script is identical aside from using "taskset -c 2,3". I usually watch lm_sensors to see which pair of cores are closest temperature-wise. Usually it's as above, but occasionally I change the taskset sequence (the cores similar in temperatures are usually the 'same set', I've found).

Anyway, this is a bit of a ramble. If I'm not clear, just ask for clarification :) Back to work...\

EDIT: Oh yes. I usually have two tabs in the terminal, so I don't have multiple terminal windows loitering around of my virtual desktops (CTRL+shift+TAB, from the gnome-terminal). It's my main system, so this rig runs a GUI.

 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
Well this pretty much answers my question. I'm glad to hear that Linux doesn't have the same problems that would plague a Dual SMP setup on Windows.

For those of you that have Dual SMP on Linux,
- Do you just create an instance in the CPU1 folder and another in a CPU2 folder? Or do you create two instances of the foldingathome folder?
- Can you set both instances to be run as a service when Linux comes up?
- If you set up security to do an autologon using the user that the SMP instances are attached to, whenever you reboot, it should automatically start folding on both instances, correct?

Is it really this simple?

 

SmokeRngs

[H]ard|DCer of the Month - April 2008
Joined
Aug 9, 2001
Messages
17,053
You can run either way, two SMP clients from the CLI (they won't crash each other), or in VMs. The advantage of the VMs has been that you show up as a 'dual core' machine, so you don't get the slow(er) quad WUs.



This basically covers it. I run it both way. Two of my quads run Linux as the host OS with Linux VMs folding. They put out the best PPD as they keep getting the 1760 pointers which put out much better PPD than the quad units. The clients in the VMs only report as dual core processors because VMWare is only using two cores.

On my main machine I run two instances of the client in consoles as VMWare usually doesn't care for releasing CPU cycles to other apps not in the VMs. This wasn't a problem for a while until I did an nVidia driver update. I have no clue what happened but I was no longer able to play Quake Wars with both VMs running and had to shut one down to get the game to run smoothly. However, both instances do get the quad only units and the PPD for the machine has seriously dropped.

I haven't been playing many games lately so I'm tempted to install at least one VM to bring the PPD up a bit on one client. I used to do at least 4600PPD with dual VMs whereas I'm now lucky if I hit 4000PPD with just the dual instances. This is just because of the difference in the points of the work units.

As for running dual Linux VMs with Linux as the host OS, I would suggest a minimum of 2 gig of RAM. 2 gig is what I have in both my machines that have this setup. I don't normally actively use the systems for anything other than the VMs, though so the RAM isn't a big deal. I usually setup each VM instance for 512 meg of RAM and when setting up the client limit it to 512 meg of RAM. This still leaves me 1 gig of RAM for the host OS. Well, that's on one machine. The other machine also has an XP VM running 24/7 so it uses some RAM as well leaving less for the host OS. If you plan on actively using the system with dual VMs I wouldn't run with less than 4 gig of RAM. That's what I have in my main system and when running dual VMs I never had any trouble with running out of RAM. I don't think I ever actually used the swap partition even with the dual VMs running.

 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
Thanks SmokeRings.

I guess I need to download the Linux version of VMWare Server :)

 
Joined
Apr 3, 2008
Messages
43
I messed around with VMware Server Linux x84_64 edition, but could not find a way to get processor affinity working with it.

VMware Server Linux is a web-based GUI. Once it is running, you can launch individual virtual machines (.vmx files). There is some kind of command line way of executing virtual machines without the web-based GUI but I could never quite get it working. It start with the command:
Code:
vmrun

So the command is easy enough but there are a ton of flags you need to add, and it all became a tangled mess.

With the vmrun command I tried to prepend it with:
Code:
taskset -c 0,1
and for the second virtual machine:
Code:
taskset -c 2,3

I also tried launching the virtual machines from the web-based GUI and then setting affinity based on their Process ID#s:
Code:
taskset -c 0,1 -p 9050

This too failed.

And when I ran 2 x 2-processor virtual machines from the web-based GUI, System Monitor showed that I was load balancing the two "dual-core" virtual machines across all 4-cores of my Q6600, with the result that I was getting terrible frame times.

Suggestions?
 

SmokeRngs

[H]ard|DCer of the Month - April 2008
Joined
Aug 9, 2001
Messages
17,053
I messed around with VMware Server Linux x84_64 edition, but could not find a way to get processor affinity working with it.

VMware Server Linux is a web-based GUI. Once it is running, you can launch individual virtual machines (.vmx files). There is some kind of command line way of executing virtual machines without the web-based GUI but I could never quite get it working. It start with the command:
Code:
vmrun

So the command is easy enough but there are a ton of flags you need to add, and it all became a tangled mess.

With the vmrun command I tried to prepend it with:
Code:
taskset -c 0,1
and for the second virtual machine:
Code:
taskset -c 2,3

I also tried launching the virtual machines from the web-based GUI and then setting affinity based on their Process ID#s:
Code:
taskset -c 0,1 -p 9050

This too failed.

And when I ran 2 x 2-processor virtual machines from the web-based GUI, System Monitor showed that I was load balancing the two "dual-core" virtual machines across all 4-cores of my Q6600, with the result that I was getting terrible frame times.

Suggestions?

The beta of version 2 of VMWare for Linux is web based GUI only. The final product is supposed to be web based only as well. I tried messing with this thing once and it was nothing but trouble for me.

The regular free version 1.05 VMWare server for Linux has a web based GUI as well as a regular server console program which in my opinion is much easier to use. I've never actually messed with the web based control with 1.05 as I generally hate web based control schemes.

I don't know about setting affinities as I haven't actually done that so I'm not sure of the answer to your question there.

 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
Ok. Real off the wall question here. I'm going to want to play with this before I install it on my future boxen (not yet here, but trying to get ready for it).

Vista x64 Host -> Linux VM (ubuntu)
VMWare Server (in above VM) -> Linux (ubuntu) VM

I would set up the first Linux VM with 2 GB (which is what all of my boxes will be running) and then set the VM inside the VM with 512MB each.

Doable? Or should I just wait and try it when I get the boxes?

 
Joined
Apr 3, 2008
Messages
43
If you're going to use Windows 64-bit as your host OS, it's likely much easier to run two guest instances of Linux (two VMware virtual machine instances of Ubuntu).

So:

HOST (Windows XP 64-bit)
-- GUEST_1 (Ubuntu in VMware)
-- GUEST_2 (Ubuntu in VMware)

Running a virtual machine inside a virtual machine is possibly not possible?

Also, consider Xubuntu--a lightweight official spin-off of Ubuntu that uses about 100 MB less RAM.
 

capreppy

[H]ard|DCer of the Month - April 2009
Joined
Jul 4, 2007
Messages
3,410
I've already got my Linux VM Instances running on my box. I'm good there, was just trying to see if I could play with installing Linux VMWare Server inside a VM Instance.

No worries, I'll just wait till my new boxen arrive.

I'll take a look at Xubuntu.

 
Top