KVM gaming build

Phuncz

Lord of the Boards
Original poster
SFFn Staff
May 9, 2015
5,827
4,902
I'm planning a new build that's going to be something totally different and use a hypervisor to run Windows as a virtual machine (guest OS) on a Linux (probably Ubuntu 16.04) as the host OS. But there's a lot of aspects to consider.

What's certain:[/SIZE]
That I'm going to run Linux daily and that I need Windows for games. This can be solved by using KVM on Ubuntu and utilizing hardware passthrough for my GPU and input devices. But this has requirements.
And my next case will be mATX.

What's necessary:
1. a dedicated GPU and an iGPU (CPU) or a second GPU, because one GPU is going to be "reserved" for the Windows VM and I won't need much rendering performance on my desktop use.
2. a CPU and motherboard that support VT-x and VT-d. The latter is an issue, my current i5-4670K doesn't support it and I'm not sure it works properly on the Asus Impact VII.
3. use as much of my hardware as possible while still looking forward. Might I go dual-GPU someday ?

What's available:
Current PC:
- Intel Core i5-4670K
- Asus Maximus VII Impact
- 2x DDR3-1600 8GB RAM
- AMD Radeon R9 290X
- Samsung 950 Pro 512GB M.2 NVMe SSD

Some other useful parts:
- AMD Radeon HD 7770
- mATX motherboard plate

Considering buying:
- ~300€ i7-4790K used (supports VT-d, works with current entire build, has GPU)
- ~700€ Socket 2011-3 mATX board, CPU and DDR4 RAM (looking at ASRock X99M Extreme4, i7-5820K, 4x 8GB DDR4)
- ~550€ Socket 1151 mATX board, CPU and DDR4 RAM (looking at ASRock Z170M Extreme4, i7-6700K, 4x 8GB DDR4)

What's the problem:
The i7-4790K is the cheapest solution to allow this, it has an iGPU and I can use the rest of my components. But I'm not sure the Asus Impact VII works well with VT-d, some topics mention that Asus is iffy with VT-d support not working as intended or stably.

Socket 2011-3 mATX build allows me to go beyond the limit of quad-core and 16GB RAM, so it's much more future-proof. But since socket 2011-3 has no iGPU at all, I'll be needing a seperate GPU either way. While I don't need to buy one since I still have a Radeon HD 7770 available, it could still work.

Socket 1151 mATX build is the middle ground: it sits in between cost-wise, allows more RAM, has an iGPU (potentially Crossfire or SLI passthrough !) but has only 4 cores.

Is there anyone with KVM experience on projects like these that could chime in ? Or any other aspects to think about are welcome. If it were up to me, I'd just run it on my build right now, but when I bought the CPU I never knew I would need VT-d and Intel stopped blocking it in the K-series CPUs with Devil's Canyon and onward.
 
  • Like
Reactions: iFreilicht

PlayfulPhoenix

Founder of SFF.N
SFFLAB
Chimera Industries
Gold Supporter
Feb 22, 2015
1,052
1,990
An initial thought - Running Windows within Linux via KVM on a broad selection of hardware/configs is going to generally be pretty buggy for Windows, and often times Linux. You're also going to have the biggest potential for impeding performance on the platform that (in your use case) actually needs it the most.

Consequently, let me ask you this: if you're going to need the performance for Windows and not so much for Linux, is there a reason you don't just flip what's installed and what's virtualized? Windows should have no real driver/compatibility issues or bugs pertaining to hardware, and practically any virtualization implementation on top of it will provide the performance you need for whatever Linux distro you install.

(This is 10x the case if you ever go multi-GPU, by the way - I know of two folks IRL that have experimented with SLI on a Linux machine, and the results were not ideal. This was a few years ago, though. Maybe AMD is a bit better about this, but I honestly don't know.)
 

Phuncz

Lord of the Boards
Original poster
SFFn Staff
May 9, 2015
5,827
4,902
It is indeed a solution but KVM is already reportedly offering performance with hardware passthrough that only has single digit percentages of loss. I'm not aware that this is possible with a Windows hypervisor. I also want to be able to break free from Windows (for daily tasks) for various reasons.

Performance-wise, lets not forget what Linus did with 7 Radeon Nano GPUs using KVM. I would still like multitasking performance to be available in Linux, but I don't think I'll be needing more GPU power than a recent iGPU can deliver.

I could also go with ESXi but the problem is that it doesn't allow iGPU passthrough so I NEED to use a second dedicated GPU no matter what and I would be managing three OSes instead of two.
 

PlayfulPhoenix

Founder of SFF.N
SFFLAB
Chimera Industries
Gold Supporter
Feb 22, 2015
1,052
1,990
I guess my confusion lies with what you get by doing it this way, instead of using Windows primarily. I can immediately see the potential pitfalls, but can you explain how you'd personally benefit from doing it this way?
 

Phuncz

Lord of the Boards
Original poster
SFFn Staff
May 9, 2015
5,827
4,902
You are not wrong that the opposite (Windows host with a Linux VM guest) will work and provide the best possible gaming performance, I just don't want to be dependant on Windows and I want to use Linux primarily.
 

PlayfulPhoenix

Founder of SFF.N
SFFLAB
Chimera Industries
Gold Supporter
Feb 22, 2015
1,052
1,990
Could you dual-boot?

This wouldn't let Phuncz use both environments at the same time, but if that doesn't matter than this would be the best option IMO.

Also, something I really love about Boot Camp on my Mac is that you can use third party virtualization software to boot that partition and run it alongside OS X, or boot into it directly at startup and run it natively. I haven't done it in years but man is it handy when you need access to both at once (like as a CS student).

Does something like that exist for Windows or Linux?
 

Phuncz

Lord of the Boards
Original poster
SFFn Staff
May 9, 2015
5,827
4,902
Does something like that exist for Windows or Linux?
If I would use two screens and something that supports RDP or use Synergy, I could use both at the same time when using my example. With only one screen, you'd need two video inputs.

Could you dual-boot?
Do you mean if I could use both Linux and Windows at the same time using KVM ? Yes, with the above.
If you mean that a dual-boot would also be a solution, I'm not a fan of multiple booting OS'es on the same "layer". While running VMs lets you run an infinite amount of extra OSes "under" your hypervisor, doing this and keeping sanity in check with all the bootloaders, I'd not like that.
 
Last edited:

Soul_Est

SFF Guru
SFFn Staff
Feb 12, 2016
1,531
1,926
This is an interesting idea and one that I have explored in my head for a while. Provided that you are using a somewhat lightweight variant of Ubuntu (or better yet, an much leaner Linux distro) and a somewhat stripped down installation of Windows, you can get pretty excellent performance for your games while still being able to use the Linux installation. Unfortunately, I have never had the hardware to test it nor could I afford such hardware. I will help where I can.
 

Phuncz

Lord of the Boards
Original poster
SFFn Staff
May 9, 2015
5,827
4,902
Although Ubuntu is pretty lean in itself, it's the reason I'm thinking about more than 4 cores and more than 16GB of RAM, which I both have now. The thing that makes this work is the hardware passthrough, so the GPU can be addressed "directly" from the virtualized OS.
 
  • Like
Reactions: Soul_Est

Soul_Est

SFF Guru
SFFn Staff
Feb 12, 2016
1,531
1,926
Although Ubuntu is pretty lean in itself, it's the reason I'm thinking about more than 4 cores and more than 16GB of RAM, which I both have now. The thing that makes this work is the hardware passthrough, so the GPU can be addressed "directly" from the virtualized OS.
That I understand already. I reason I said what I said in my previous post is to wring as much performance as possible out of the system. There is always room for optimization that could net you non-trivial gains in performance in both environments.