Building a Ubuntu development system for 2015

Well that time has come, the time to upgrade my personal computer. There was a time ‘back in the day’ I used to build my own computers on a fairly regular basis. However it has been awhile since I did a full up rebuild of a system. So I decided to document the process this time, as I think the information will be beneficial to me, and possibly to some other folks in the future. The last set of PC’s I built were shuttle boxes. I really loved those form factors even tho I was not a big fan of the non standard motherboard size. `why did they not use PC-104?’ Alas that is another post altogether.

Why-build-it

Anyway I had gotten to the point where I was needing to build up and run multiple vm’s on the fly and I was taxing out my disk io and using more ram than I had, pushing me into swap. I was getting 92 megs a second out of my buffered disk reads. This was sometimes noticeably bad… bad enough for me to twiddle my thumbs and search the internet… not good

So its time to pay the piper and upgrade. As I began the process I need to keep a few things in mind. “I am not building a gaming pc, I am not building a gaming pc, I am not building a gaming pc ” this is what I keep whispering to myself as I begin to shop for new hardware. Because as you shop for new computer hardware its easy to get side tracked by modern gaming allure. I am not immune to this trap.

To be prudent I need to set some goals for what I am building, in order to properly do that I need to evaluate what I want to do.

I want to build a field-of-dreams web community.

Simple, there it is… I have said it… its out there… its a bit vague, and could also be considered a bit audacious. Probably just one too many cups of coffee. However it is me being true to thy self. Now onto the business of turning this 100 square foot office into the magic carpet that gets me to that community building.

I probably need to scope the goal, and this article a bit better so lets do that: “I want to build a PC that I can create a vm-hotel where I provision vm’s quickly on the fly “ so I kick-the tires on webstack technologies. Consider a the following stack examples:

Example Provisioned VM’s
  • CentOS 6.5
    • nginx, apache, postgres, django, rabbit, celery
    • jquery, underscore, backbone, marionette, bootstrap
  • Ubuntu 14.04
    • apache, rails
    • mysql, couchdb
  • Fedora 20
    • apache, php, wordpress
    • mysql, zurb foundation

The thing with working with provisioned vm’s. If you are not building them on a frequent basis the libs will get out of sync with the actual libs you are using. So now the ‘why-build-it‘ is addressed… lets move on to the ‘what-to-build‘. I need to build a machine that maximizes Ram && DiskIO.

What-to-build

Its time to shop for some hardware. Its shopping season so lets have some fun. It became clear to me right away that I did not have a big enough budget to pay Dell, Leveno’s, or Apple’s prices for hardware that I needed/wanted, although some of there offerings were extremely alluring. So I need to build this machine. I have done this a few times over my career and I have spent a lot of times reading motherboard spec’s to figure out which pieces to buy that are compatible with the motherboard. I did not enjoy this process, and what’s more I got it wrong a bunch. I decided to shop for build kits from newegg to avoid the incompatibility issues. I have always been an Intel guy so that made the process easier. After messing with these for a bit I started to ask around a bit for advice. In the end I ended up getting a hardware savant friend of mine to help me out with the parts list, and I am so glad I did.

do not be afraid to lean on your friends in your weak area’s

Based on the importance of price and RAM && DiskIO here is what we opted for:

Part Approximate Price 11/12/2014 Description
CPU $340 Intel Core i7-2600K Sandy Bridge Quad-Core 3.4GHz (3.8GHz Turbo Boost) LGA 1155 95W Desktop Processor Intel HD Graphics 3000

Update: Since the 2600K has been release there has also been the 3770K and the 4790K.( see these i7 Model comparisons )

MotherBoard $85 ASRock Z75 Pro3 LGA 1155 Intel Z75 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
RAM $160 G.SKILL Ripjaws X Series 16GB (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model F3-12800CL9Q-16GBXL
SSD $120 * 2 SAMSUNG 840 EVO MZ-7TE250BW 2.5″ 250GB SATA 6Gb/s 1x nm Samsung Toggle DDR 2.0 3-Bit MLC NAND Flash Memory (400Mbps) Internal Solid State Drive (SSD)
Video $90 MSI R7 250 2GD3 OC Radeon R7 250 2GB 128-Bit DDR3 PCI Express 3.0 HDCP Ready CrossFireX Support Video Card
Power Supply $75 Rosewill CAPSTONE-550-M 550W Continuous @ 50°C, Intel Haswell Ready, 80 PLUS GOLD, ATX12V v2.31 & EPS12V v2.92, SLI/CrossFire Ready, Modular Active PFC Power Supply
Case $87 Antec P100 Black ATX Mid Tower Computer Case
Monitor Cables $8 + 9 Nippon Labs Premium 10 ft. with Digital Dual-link 10ft Model DVI 10 DD 10 feetGearIT GI-HDMI-DVI-BK-10FT Black 10ft High Speed HDMI To DVI-D M-M Video Adapter Cable

Ok, so that is just over 1k, which is a bit more than I wanted to spend, but I had a problem and I needed to solve it.

The build

I enlisted Shinwa again to help me build the thing: because … well … he loves it, and I was for sure going to learn something from him. For starters I had never done a hardware raid before. I can now check that off of my bucket-list.

Configuring a Hardware Raid (ASRock Z75 Pro 3)
  • Boot ( F2 ) to enter Bios
  • Enable Raid controller
  • Reboot
  • Enter Raid Configuration BIOS: ( Ctrl – i )
  • Configure the two hard-drives as 1 RAID0 ( striped ) drive

The point here was to make one ‘faster’ 500 Gig drive. I will actually add some other drives later for slow storage. I will also include some hard-drive speed measurements in this post for reference.

We had to update the firmware on the SDD’s. Which we did.

Other points of interest. I was blown away by the CPU, how small it was… and now surprisingly more fragile. I guess I should not have been surprised in the wake of the consumer electronics revolution. ( Smart Phones ) However, to be honest I was blown-away, I guess my brain was just stuck in the ‘this is a pc mindset’.

Words of wisdom related to building PC hardware:

  • Motherboard Install: ‘always take note of your offsets BEFORE you place the motherboard down’
    Otherwise you are going to have to do this a few times and will probably not be a very happy-panda.
  • ‘Don’t touch those CPU pins!’
    Nothing is worse than booting up to beep-code nothingness. The cpu is apparently allot more fragile than it used to be during the install process. My guess is that this is related to pin-pitch getting significantly smaller. i.e. you are not touching one or two pins you are touching 20.

Some nice features of the hardware set:

  • the case [Antec P100] with its cable routing features
  • the case’s airflow design and filters are nice
  • the case’s sound-dampening foam is nice. However those sdd’s don’t make any noise.
  • the [ Rosewill ] power-supply with its modular-design
  • the SDD’s looked very sexy ( ok: ok: this is not a feature… or is it )

the cable routing features and the modular-design of the power supply were a joy to work with.

Note: if you were like me, ‘modular design’ as it relates to the power supply will mean nothing to you until you start adding cables, then you will wonder why on-one has ever done this before.

Power on… no smoke, no beep codes… life is good.

The new DiskIO output:

I mentioned earlier that on the old system I was getting 92 megs a second. Well how am I doing now?

hdparm -tT /dev/mapper/isw_cgcagdciag_Volume0p1 

/dev/mapper/isw_cgcagdciag_Volume0p1:
 Timing cached reads:   27460 MB in  2.00 seconds = 13746.25 MB/sec
 Timing buffered disk reads: 1206 MB in  3.00 seconds = 401.72 MB/sec
root@ubuntu:~# hdparm -tT /dev/mapper/isw_cgcagdciag_Volume0p1 

/dev/mapper/isw_cgcagdciag_Volume0p1:
 Timing cached reads:   27484 MB in  2.00 seconds = 13758.47 MB/sec
 Timing buffered disk reads: 1210 MB in  3.00 seconds = 403.28 MB/sec

ok, so now I am getting ~400 megs a second. Not to shabby. This is a huge improvement from what I had before and I am very excited about it. Except there are two issues.

  • those solid state drives should net around 500 MB/s
  • we RAID0/striped the disk to get a speed improvement

So I now need to do some more research as to why the Ubuntu driver is not giving me all of the speed from the disk. For re

 

$ uname -a
Linux ubuntu 3.13.0-43-generic #72-Ubuntu SMP Mon Nov 20 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

and the drivers

$ lsmod |grep raid
raid10                 48128  0 
raid456                86666  0 
async_raid6_recov      12984  1 raid456
async_memcpy           12762  1 raid456
async_pq               13365  1 raid456
async_xor              13160  2 async_pq,raid456
async_tx               13509  5 async_pq,raid456,async_xor,async_memcpy,async_raid6_recov
raid6_pq               97812  2 async_pq,async_raid6_recov
raid1                  35530  0 
raid0                  17842  0 

 

Wrap up:

Aside from not-getting-the max speed out of my disks I am a super happy panda. Time to get back to the business of programming.

In part 2 of this series of posts I will cover The OS Install: Time for the Trusty Thar Ubuntu 14.04

In part 3 I will investigate the SDD performance not being quite as fast as it should be. Hint: visit the motherboard manufactures page for hints.