Wednesday, February 17, 2016

Dream Machine

tl;dr "If you build software, build your own PC, it will make you happ(y|ier)"

Introduction

I’ve been developing software since the 80’s and have owned lots of different factory made machines from ZX Spectrums, Dells, Lenovo’s, to my current Macbook Pro.
I decided to build my own system for the following reasons:
  • I develop in Linux/Windows/Mac OSX, and don’t want to waste time rebooting
  • I need a GPU for fast Machine Learning
  • Speed
  • Curiosity
  • Silence
I built a PC based on the Intel Skylake 6700k and it works great, if you want to do the same, read on for what makes up my system for development and machine learning and my opinions on the good, the bad, and the ugly...

What you will need

To replicate the system that I built, you will need the hardware and software listed below, a free afternoon and an extra pair of hands for help.  Fitting all the hardware together turned out to be a really easy process, comparisons to putting Lego together are fully justified.

Before and after Pictures

The before picture shows all the components you will need still in their boxes, the after picture below shows my Ubuntu system running Mac OSX and Windows 10 in parallel in virtual machines.



The Hardware

During the course of my research on building a PC, I read lots of stories of people buying hardware that didn't work together.  I found the logicalincrements.com website invaluable for finding compatible hardware.
The following 8 pieces of hardware are compatible and work well for me:

  1. Case

    I purchased a Be Quiet! Silent Base 800 Black with Window.  This strangely was one of the most impressive pieces of hardware that I bought, it came with 3 fans included (most people recommend getting separate fans), and I was really impressed at how well it is put together and it’s modularity.

  2. Motherboard
    After a lot of research (Custom PC magazine has some good articles on Z170 motherboard comparisons) I went for a Z170A MSI Titanium XPower motherboard, mostly because it has two M.2 SSD slots and was rated one of the best Z170A motherboards by Custom PC magazine.

  3. Processor
    I went for an intel Skylake 6700k as it was the latest and greatest at the time of build.

  4. CPU Cooler

    I went with a Kraken X41 water based cooler here (mostly because this is what the Custom PC build instructions that I followed used). This was the only component that was fitted in a non-standard way in the case, I believe it’s supposed to be fitted with the air being pushed through the radiator, it would only fit in the case for me with the air being pulled through the radiator (see picture below, radiator is out of view under NZXT white fan on top of case)



  5. Disk
    I wanted the fasted possible disk so went for a Samsung V-NAND SSD 950 Pro M2.SSD disk.

  6. Power Supply Unit
    I went for a Be Quiet! Dark Power Pro 11 PSU as it got a good review in Custom PC magazine and I figured it would most likely be compatible with the Be Quiet case, which it is.

  7. GPU
    I went for an NVidia 980Ti GPU here as I didn’t think the price difference to the Titan was worth the small performance gains

  8. 2 x UHD monitors
    Screen real estate is really important to me for development so I went for two UHD monitors, a 28” Samsung UHD Monitor and a 40” Phillips Brilliance UHD Monitor, I find the 28” Monitor to be just that bit too small for UHD resolution but the 40” to be just fine, I think the sweet spot would be 3x36” monitors with 4k resolution.


The Software

I used Ubuntu 16.04 as my base system, I run virtual machines for Mac OSX and Windows through VMWare Workstation Pro.
You will need:
I won’t go into the details of how to set all this stuff up but the end result is a development system that runs Ubuntu on bare metal with virtual machines for Windows and Mac OSX which run at a totally acceptable speed for development.


Machine Learning Benchmarks

In order to test if machine learning works faster with GPUs as advertised, I used the simple benchmark of running the Google DeepDream iPython Notebook in CPU mode and GPU mode, you can see a video of the iPython notebook running below in CPU mode (on left) and GPU mode (on right) and the massive difference in speed.



The iPython Notebook took the following times to run to completion:

  • CPU mode: 244 Minutes
  • GPU mode: 3 Minutes

Conclusion

Do it, you won’t regret it!

The Good

  • Very Fast, working in virtual machines feels close to working on bare metal.
  • GPU works as advertised for machine learning.
  • Lots of ports and slots for upgrading and adding new cards/devices for engineering work.
  • The Ubuntu keyboard shortcuts for window management (using the mouse is tricky with UHD)


The Bad

  • It's expensive, the full build cost including monitors was approximately €3000.
  • My UHD Monitors are slow to wake from sleep, sometimes one monitor goes to sleep and won’t wake (Ctrl-Alt-F2, Ctrl-Alt-F7 required to wake it up)
  • iPhone isn’t picked up by Mac OSX virtual machine in XCode as an external device.


The Ugly

  • The Noise (It is not totally silent, approximately 45dB)

Recommended resources