Crunching in a Virtual Machine

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0
Topic 197346

I'm thinking about setting up a hypervisor machine (Either Xen or vSphere) and I'm trying to research them on the net. One thing I came across was GPU pass through, which seems to be a technique of giving one VM access to a GPU installed on the hypervisor. So of course I started wondering about running Boinc in a VM doing GPU crunching. Anyone here have any experience with that?
Questions that pop in to my mind are:
Which hypervisor would do GPU pass through best?
How much performance do you lose compared to running native?

ExtraTerrestrial Apes
ExtraTerrestria...
Joined: 10 Nov 04
Posts: 770
Credit: 567,980,350
RAC: 119,392

Crunching in a Virtual Machine

I haven't heard of anyone sorting this out, especially not for non-gaming APIs needed for GP-GPU. So if anyone knows more we're listening :)

MrS

Scanning for our furry friends since Jan 2002

Anonymous

RE: I'm thinking about

Quote:
I'm thinking about setting up a hypervisor machine (Either Xen or vSphere) and I'm trying to research them on the net. One thing I came across was GPU pass through, which seems to be a technique of giving one VM access to a GPU installed on the hypervisor. So of course I started wondering about running Boinc in a VM doing GPU crunching. Anyone here have any experience with that?
Questions that pop in to my mind are:
Which hypervisor would do GPU pass through best?
How much performance do you lose compared to running native?

This is totally "new" to me so I did some poking around and found this read on the NVIDIA website. Interesting read and provides insight into this type of configuration for those of us not familiar with it.

[EDIT]
I think I might be in over my head but here are two additional links. It looks a bit more complex then I initially thought. XEN server and XEN desktop seem to be a requirement.
Found these additional link that might be worth a look:
LINK 1
This link discusses the installation of NVIDIA GRID VGPU.

LINK 2

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

Robl, what you are referring

Robl, what you are referring to is a new technique called vGPU which is a way to make many VMs on the host share a GPU (just like several processes can run on a single CPU by giving them small time slices). This however requires new GPUs (the nVidia GRID family). This is very new and very expensive.

What I'm trying to get to work is an older technique called VGA pass-through. Essentially you allocate a GPU on the host to a single VM. No other VMs (and even the host) can use it. This can be done with any old GPU (and indeed any PCI device). Since the GPU is not virtualised I hope the performance will be close to native.

At the moment I have made it work in a windows VM with a very old GPU I have laying around. Next step is to move my GTX580 to the hypervisor machine and see what the performance is like.

Anonymous

RE: Robl, what you are

Quote:

Robl, what you are referring to is a new technique called vGPU which is a way to make many VMs on the host share a GPU (just like several processes can run on a single CPU by giving them small time slices). This however requires new GPUs (the nVidia GRID family). This is very new and very expensive.

Got it. I did some more "looking" after my post. I soon realized that this approach required "new" GPU hardware along with the XEN server/desktop. That item alone prices at $500 according to their website. I soon realized this was going to be out of my reach.

If I understand you correctly then if a virtual host has access to a GPU and the "host" does not then what advantage would this arrangement have over having the "host" access it directly and not messing with a virtual host? Are you suggesting for example that if I have a host running a webserver and I run a VM with GPU access that the performance on the webserver side would be improved?

Like I said this is "new" to me and I am interested in this approach.

After reading your post I did installed virtualbox on an Ubuntu laptop and loaded win7 in the "virtual" space. This actually resolved a situation where I needed access to a win program that was used in conjunction with stuff I was doing on the "host". I was quite amazed at how robust this arrangement was. So I thank you for bringing up the VM "question" as it pertains to distributed computing.

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

RE: If I understand you

Quote:
If I understand you correctly then if a virtual host has access to a GPU and the "host" does not then what advantage would this arrangement have over having the "host" access it directly and not messing with a virtual host? Are you suggesting for example that if I have a host running a webserver and I run a VM with GPU access that the performance on the webserver side would be improved?


I'm not sure what you question is. If you set up 2 VMs, one with a webserver and one with GPU passthrough the first VM does not know about the GPU so it should not be affected it all. I'm not setting up the virtualisation to improve performance on anything. My idea is to have less hardware in my closet. Any ability to run boinc in a VM is purely a bonus.

My situation was that I have a windows server machine (needed for work) and a linux one (for tor, plex and other stuff). These two boxes are my old retired workstations. The linux box has my old GTX580 in it so it also runs boinc.
I'd like to play around with new operating systems as well so the idea of merging the two server boxes into a hypervisor box was born. My windows server box now runs xenserver and windows server 2008 r2 as a VM. I will migrate my debian linux into a VM next. This is a little complex since it requires moving the GTX580 to the new box and also moving boinc from linux to the windows VM (VGA pass-through is best done in a windows VM) and I don't want to much downtime on my tor relay and boinc so I test alot :)

I could of course have set up hyper-v on the windows server and run linux as a VM but I'm not sure how hyper-v would manage vga pass-through, or even let the windows host access the gpu. Also, microsoft requires jumping through a lot of hoops like requiring window 8.1 enterprise for remote management.
Another option would be to use linux and then use a software VM manager like virtual box but then the performance in the VMs would suffer. A hardware virtualizer is best for performance and this machine will be a server, sitting in a closet so I don't use the "console".

Sid
Sid
Joined: 17 Oct 10
Posts: 164
Credit: 952,064,335
RAC: 111,437

Probably, it might

Anonymous

Logforme, I understand

Logforme,

I understand your objective. The link to xenserver was most helpful/useful. At present I would need a "spare" pc to attempt a move to xenserver so that if something goes wrong I would not impact my current setup. Maybe something to consider down the road. And I need to do some more reading.

Sid,

your link was also helpful.

ExtraTerrestrial Apes
ExtraTerrestria...
Joined: 10 Nov 04
Posts: 770
Credit: 567,980,350
RAC: 119,392

Doesn't look too encouraging

Doesn't look too encouraging yet: link.

MrS

Scanning for our furry friends since Jan 2002

Anonymous

RE: My windows server box

Quote:
My windows server box now runs xenserver and windows server 2008 r2 as a VM. I will migrate my debian linux into a VM next. This is a little complex since it requires moving the GTX580 to the new box and also moving boinc from linux to the windows VM (VGA pass-through is best done in a windows VM) and I don't want to much downtime on my tor relay and boinc so I test alot :)

Logforme,

Have you had a chance to do the above. The reason I ask is that I "came across" a PC on which I have installed XenServer and have configured two VMs: one win7 and the other Ubuntu server. I do not have in that box a GPU but I could transfer one from another box. I would be transferring a GTX 650 Ti. To achieve "pass through" on a Win 7 VM is it just a matter of installing the correct driver for this card. My cpu/motherboard supports Virtualization and I have enabled it in the bios. I have not tried the GTX 650 yet because I have had a bit of a learning curve with XenServer patch installation as well as with the XenServer xs-tools.iso installation. Yes XenServer is free but they make you work for it. :>)

Logforme
Logforme
Joined: 13 Aug 10
Posts: 332
Credit: 1,714,373,961
RAC: 0

No luck I'm afraid. I

No luck I'm afraid.

I moved the GTX580 into the machine. Xenserver recognized it and allowed me to assign it to my windows 2008 server VM. Inside the VM it showed up in the device manager with a yellow triangle on it saying the device failed to start. Installing the Nvidia drivers worked fine but when I tried to use the GPU for anything it just failed.
I figured maybe it's a Nvidia issue so I swapped the GTX580 for my AMD 7970 and that one showed up in the device manager fine (no warning triangle). Installing drivers worked fine but then it failed when I tried to use it. Boinc found and sent some work to it but when the app started I got an error in the log saying something like "GPU disappeared".

For now I have the GTX580 in its old machine so my goal of getting less hardware in my closet failed (for now).

Apart from this I'm super happy with my xenserver.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.