Building a Desktop Workstation for SQL Server Development and Testing

Back in March of 2014, I wrote a fairly long blog post called Building a Workstation for SQL Server 2014 Development and Testing, which still generates quite a bit of hits and e-mail. Since it is about eighteen months later, I thought it was about time to update this information to cover the latest available hardware choices.

With the current selection of high-performance and very affordable desktop computer components, it is not very difficult to assemble an extremely high performance workstation for SQL Server development and testing at a very reasonable cost. Depending on how much performance you want and what your available budget is, you can take several different routes to get this accomplished.

At the high end of the spectrum, you can get a Socket 2011 v3 motherboard, with an Intel Xeon E5-2600 v3 product family “Haswell-EP” processor or an Intel Core i7-5800 product family “Haswell-E” processor and up to 64GB or 128GB of ECC DDR4 RAM, and multiple PCIe flash storage cards, and spend a pretty significant amount of money, depending on your exact hardware and storage choices. 

In the middle, you can build a very powerful system using the new 14nm Intel Core i7-6700K “Skylake” processor that uses a new LGA 1151 motherboard and DDR4 memory. Skylake processors require a newer Intel chipset, and the first Skylake motherboards that are available are using the high-end Z170 Express chipset. Aside from DDR4 support, the most interesting improvement to Z170 Express is an increased number of PCIe lanes. The Z170 chipset supports a total of 20 PCI-Express lanes at the PCH in conjunction with the CPU’s 16 PCIe 3.0 lanes for a platform total of 36. Last generation’s Z97 Express chipset coupled with Devil’s Canyon or Haswell CPUs only allowed for 24 PCIe 2.0 lanes. All of these from the PCH were only PCIe 2.0 compliant. In contrast, all of the Z170’s PCIe lanes are Generation 3.0 compliant while retaining backwards compatibility with PCIe 2.0 and 1.0 specifications. This means you have a lot more I/O bandwidth available for storage.

At the lower end of the spectrum, you can put together a system with a single Intel Core i7-4790K “Devil’s Canyon” processor, 32GB of non-ECC DDR3 RAM, and a single high-performance, 6Gbps consumer-class SSD, and still have a system with more processing power than many existing Production database servers. A system that uses this older generation architecture will still be quite powerful, but will be more economical than ever, since the Skylake family has been released.

If you are going to build a desktop system from scratch, you need eight basic components:

  1. Computer Case
  2. Power Supply
  3. Motherboard
  4. Processor
  5. Memory (RAM)
  6. Storage (magnetic or flash)
  7. Discrete Video Card (optional, not really necessary in most cases)
  8. Optical Drive (optional, becoming much less important)

This assumes that you have a keyboard, mouse, and one or more monitors. I’ll discuss each one of these components, with some tips for what you should consider as you are choosing them.

Computer Case

You will need some sort of case to hold your components (unless you want to leave them running on a test bench). Personally, I like mid-range, mid-tower cases from companies like Fractal Design, Antec, Cooler Master, and Corsair. Mid-Tower cases give you plenty of room for common ATX motherboards, and they usually have at least four to six internal 3.5” or 2.5” drive bays. Newer designs have special 2.5” mounting points for SSDs and front or top mounted USB 3.0 or USB 3.1 ports. Better cases are much easier to work with, and they often have much better cable management features (so you can route most of your cables in a separate space under the motherboard). This not only looks much nicer, but it gives you better airflow inside the case. You probably don’t really need a fancy, gaming-oriented case with LED lighting and a huge number of case fans. A decent case in the $50-100 range will usually have good quality components (such as quieter, larger diameter case fans), along with good thermal and noise management features. The Fractal Design Core 3300 is a good example of an affordable, good quality case for about $80.00. You can spend a little less on a case, or quite a bit more. Just make sure that the case will allow you to install the size of motherboard that you will be using.

Power Supply

You should invest in a decent quality power supply as opposed to the cheapest one you can find. You don’t want to go overboard and get a 1200 watt behemoth gaming-oriented power supply (unless you are building an extreme gaming rig with multiple, high-end video cards that really need that much power). For the kind of system that I am recommending, you can use a high quality 400-500 watt 80 PLUS modular power supply and have plenty of reserve power. Modular power supplies have detachable cables for things like SATA power, MOLEX power, PCI-E power, etc., so you only need to plug in and use the cables you actually need.

Power supplies are much less efficient when they are only supplying a very small portion of their rated output. Getting a 1200 watt power supply because you think it must be “better” than a good 500 watt power supply is actually a waste of money, both for the initial cost of your power supply and the electrical power costs over the life of your machine. The components that I am recommending will end up drawing about 30-40 watts at idle.  I really like Seasonic power supplies, especially their fan-less, modular models such as the SS400FL and the newer SS-520FL2. They are both completely silent and highly efficient, 80+ Platinum rated power supplies. Another less expensive alternative that I like are Corsair power supplies, such as the Corsair CX500M modular power supply.

Motherboard

The motherboard is where all of your other components are plugged into, so it is a critical component. You need to consider which processor you are going to be using, since there are several different processor socket types available, which will dictate your motherboard choices. The most common type in late 2015 is the LGA 1150, which will work with the 4th generation, 22nm Intel Core processors (Haswell and Devil’s Canyon). You also need to consider the form-factor of your motherboard. You can choose from ATX, micro-ATX, and mini-ITX, which refers to the size of the motherboard. You also need to think about the chipset used on your motherboard.

The Intel Z97 Express chipset is their best chipset for an LGA 1150 motherboard. As you are looking at motherboards, you should be looking at the low-to-mid range Z97-based motherboards instead of the high-end, gaming motherboards. The high-end gaming Z97 motherboards can be quite expensive, and they will probably have features (such as support for three discrete video cards), that you don’t really need for a SQL Server workstation or test server. Instead, make sure you choose a model that has four DDR3 RAM slots, and at least six 6Gbps SATA ports. You also might want a model that has one or more M.2 slots. A good example Z97 motherboard is the ASRock Z97 Extreme6/3.1.

A newer, slightly more expensive choice is a 6th generation, 14nm Intel Core processor (Skylake), combined with a Z170 chipset. Right now, there are only two Skylake processor choices that are widely available, the Core i7-6700K, and the Core i5-6600K. Skylake processors use the the new Socket LGA 1151, and DDR4 RAM, so you will need a new motherboard and new memory if you are upgrading from an older platform. Unlike older Intel processors, these new Skylake processors do not come with a stock cooling fan bundled with the processor, so you will have to buy some type of CPU cooler. A good example Z170 motherboard is the ASRock Z170 Extreme7 +. The reason I really like this motherboard is because of all of the I/O capacity and flexibility that it offers, with three PCIe 3.1 x16 slots, and three Ultra M.2 PCIe 3 x4 slots.

If you are going to run Windows Server 2012 R2 for your host operating system, you should be aware that most Intel embedded NICs that you will find on many desktop motherboards will refuse let you install the NIC drivers with a Microsoft server operating system. In that case, you can buy an inexpensive, non-Intel ($15-20) PCI-E Gigabit Ethernet card that work just fine. If you are running Windows 8.1 or Windows 10 for your host operating system, you won’t have this issue.

Processor

You can choose a modern, Intel desktop processor that may well have much more raw processing power than many older two or four-socket production database servers. This is not an exaggeration, although it depends on the age of your production database server. You are far more likely to run into memory or I/O bottlenecks as you push a modern Intel desktop system than processor bottlenecks. For most people, an Intel Core i7-4790K processor will be your best choice (especially if you live near a Micro Center). It is a quad-core processor with hyper-threading (so you have eight logical cores) that runs at a base clock speed of 4.0GHz, with the ability to TurboBoost to 4.4GHz. It runs very cool, and is easy to overclock even with the stock Intel processor cooler. It is not really necessary to overclock this processor, to get good performance. You can have a maximum of 32GB of DDR3 RAM with this processor, and it supports both VT-x and VT-d for better virtualization performance.

Most 4th generation Intel Core processors (Haswell) have pretty good integrated graphics built-in to the CPU package. The better models have HD4600 graphics which give you more than enough performance for normal desktop usage and even some moderate gaming. There was a pretty big improvement in the integrated graphics performance between the Ivy Bridge and Haswell processors, so it is much more feasible to simply use the integrated graphics instead of buying a separate, discrete video card. This will save you money and reduce your electrical power usage.

One big variable in the cost of using this processor is whether you live near a Micro Center computer store or not. Micro Center has 25 locations in the Continental United States, and they sell a few specific models of Intel processors at prices that no other company seems willing to match. They have been doing this for years, and it is their regular practice (so it is not a special sale or promotion). The only catch is that those processors are only available for in-store pickup (so no mail-order).

For example, Micro Center is currently selling the Intel Core i7-4790K processor for $279.99, while NewEgg is selling the exact same Intel Core i7-4790K processor for $339.99. Micro Center quite often does promotions where they will reduce the price of a motherboard by $40-$50 if you buy the motherboard with a qualifying processor. Their prices on motherboards, cases, memory, hard drives and SSDs are also quite competitive.

A newer Intel Core i7-6700K processor will cost $349.99 at Micro Center, and it will cost $369.99 at NewEgg.

Memory

If you select an LGA 1150, Z97 Express motherboard with four RAM slots, you can have up to 32GB of non-ECC DDR3 RAM in your system. You can get two 8GB sticks of 240-pin PC3 12800 DDR3 RAM for about $89.00, so it would be about $178.00 to get 32GB of RAM. This should be plenty for most development and testing workloads (including running multiple VMs), but if you really need more, you could make the jump to the LGA 2011 v3 platform that uses the more expensive six and eight-core Intel Haswell-E processors where you can eventually have up to 128GB of DDR4 RAM.

DDR4 RAM is a little bit more expensive than DDR3 RAM, but the price differential is not really that large. For example, you can get two 8GB sticks of 288-pin PC4 17000 DDR4 RAM for about $105.00, so it would be about $210.00 to get 32GB of RAM. Eventually, you will be able to get 16GB DDR4 DIMMs, so you will be able to have 64GB of RAM in a Z170 Express system.

One thing you will want to do as you are configuring your system is to go into your BIOS setup and turn on Extreme Memory Profile (XMP), so that you will get better memory performance. This can occasionally cause stability problems, depending on the type of memory that you have, but if that happens, you can always turn it back off.

Storage

You will need some type of storage for your system. Traditional magnetic hard drive prices continue to decline, so that you can get a high-performance 3TB, 7200rpm SATA III drive with 64MB of cache, such as a 3TB Western Digital WD Black WD3003FZEX for $149.99. For just a little more money, you can also get a much smaller, but much much higher performance 6Gbps SATA III consumer-grade SSD, such as a 500GB Samsung 850 EVO SSD for $179.99. Solid State Drive prices have come down a lot (as performance has increased dramatically) over the past couple of years, but they still cost about six times as much as conventional magnetic storage, per gigabyte.

I really encourage you to use a modern, fast 6Gbps SATA III SSD for your boot drive since it will have an extremely dramatic, positive effect on how fast your system performs and “feels” in everyday use. It will boot faster, shut down faster, programs will load nearly instantly, and it will take much less time to install new software and Windows Updates. It is similar to the difference between a dial-up modem and a fast broadband connection. Once you start using a fast SSD, you will never want to go back to a conventional magnetic hard drive.

You want to make sure your fast 6Gbps SSD is plugged into a 6Gbps SATA III port (not one of the 3Gbps SATA II ports). Otherwise, your fast SSD will be limited to about 275MB/sec for sequential reads and writes (which is still about twice as fast as a very fast traditional 7200rpm SATA hard drive). You also want to avoid the smallest capacity 64GB and 128GB SSD models, since their performance is much usually much lower than the larger capacity models from the same manufacturer and product line. This is because the smaller capacity models have fewer NAND chips and fewer data channels. Ideally, you would want a 250GB (or larger) 6Gbps SATA III SSD plugged into each SATA III port that you have available on your motherboard. This would give you lots of options for how to lay out your SQL Server data files, log files, tempdb files and SQL Server backup files.

Of course, you may not want to spend that much money, so it is still common to have one or two SSDs, along with one or more conventional magnetic drives in a desktop system. One of the luxuries with a desktop system compared to any laptop is that you have a very high number of internal drive bays and up to ten or twelve SATA III ports on the motherboard. You can also buy inexpensive PCI-E SATA III cards to add even more SATA III ports to a desktop system.

If you want even more storage performance, you may want to consider a PCIe NVMe flash storage card such as the Intel 750 Series, which comes in 400GB, 800GB, and 1.2TB capacities. These cost slightly less than $1.00/GB, and their performance is about 4-5 times better than SATA III SSDs for reads and about 2-3 times better for writes. Another alternative that will be available in October is the new Samsung 950 Pro Series of M.2 PCIe NMVe flash devices, which will initially come in 256GB and 512GB capacities. If you have one or more M.2 slots that support PCIe 3.0 x4, then you will also get tremendous performance from these.

Discrete Video Card

There are some situations where the Intel integrated graphics might not be enough for your needs. An example would be if you were doing things such as AutoCad that really place a lot of stress on your graphics performance. Another example is if you wanted to run multiple, large monitors on your system. Most motherboards that support the Intel integrated graphics only have two or three video connectors (such as a VGA connector, DVI connector and an HDMI connector), so that would limit how many monitors you could connect to the system. Depending on your processor choice, you may not have integrated graphics at all.

If you do decide to go with one or more discrete video cards, you can get quite decent performance for about $100-150.00 each (but you can spend much, much more). You may also need a power supply with multiple, supplemental PCI-E power connectors, and you might even need a higher capacity power supply.

Optical Drive

Even though they are becoming much less useful over time, it can still be useful to have a DVD-Recorder, optical drive in a desktop system. It just makes it easier to install the operating system and other software (although you can certainly install from a USB drive). It is also becoming much more common to simply mount an .iso file for doing something like installing SQL Server 2014. You can get bare, OEM optical DVD drives for about $15-20. Personally, I like to use an external USB optical drive to install the operating system, so I don’t have to have an internal optical drive taking up space and power in the system.

So, after all of this, how much money am I trying to convince you to spend?  Well, here is one example:

  1. Case                   $80.00
  2. Power Supply       $50.00
  3. Motherboard      $190.00          (ASRock Z97 Extreme 6 USB 3.1 from Micro Center)
  4. Processor          $270.00          (Intel Core i7-4790K from Micro Center)
  5. RAM                  $178.00          (32GB of DDR3 RAM)
  6. Storage             $330.00          (One 500GB Samsung 850 EVO SSD and one 3TB 7200rpm drive)
  7. Optical drive         $20.00

Total System         $1118.00

This system would have much better performance than a laptop that would cost several times as much. It would also have better performance than many production SQL Server database servers. It would be pretty easy to slice over $400.00-$500.00 off of this system cost by choosing some different components, and still have a very capable system.

Of course, a desktop system like this does not have redundant, server-class components or ECC RAM, so you would not want to use them in a production situation. They would probably be much better (in terms of performance) than some ancient, out of warranty, retired server for development and testing.

SQL Server Diagnostic Information Queries for September 2015

This month, I spent quite a bit of time synchronizing the scripts between the SQL Server 2016, 2014, and 2012 versions, making sure the small differences that were cropping up between the versions were cleaned up as much as possible. The SQL Server 2016 version will continue to be improved with more SQL Server 2016-specific queries and new columns in existing queries over the next few months as I discover interesting new things in SQL Server 2016. I am also continuing to add more relevant comments and links to the other active versions of these queries in order to help better interpret the results of these queries and save me time in looking up supporting documentation.

Rather than having a separate blog post for each version, I have just put the links for all six major versions in this single post. There are two separate links for each version. The first one on the top left is the actual diagnostic query script, and the one below on the right is the matching blank results spreadsheet, with labeled tabs that correspond to each query in the set. 

Here are links to the latest versions of these queries for SQL Server 2016, 2014 and 2012:

SQL Server 2016 Diagnostic Information Queries (September 2015)

SQL Server 2016 Blank Results

SQL Server 2014 Diagnostic Information Queries (September 2015)

SQL Server 2014 Blank Results

SQL Server 2012 Diagnostic Information Queries (September 2015)

SQL Server 2012 Blank Results

Here are links to the most recent versions of these scripts for SQL Server 2008 R2 and older:

Since SQL Server 2008 R2 and older are out of Mainstream support from Microsoft (and because fewer of my customers are using these old versions of SQL Server), I am not going to be updating the scripts for these older versions of SQL Server every single month going forward.  I started this policy six months ago, and so far, I have not heard any complaints.

SQL Server 2008 R2 Diagnostic Information Queries

SQL Server 2008 R2 Blank Results

SQL Server 2008 Diagnostic Information Queries

SQL Server 2008 Blank Results

SQL Server 2005 Diagnostic Information Queries

SQL Server 2005 Blank Results

The basic instructions for using these queries is that you should run each query in the set, one at a time (after reading the directions for that query). It is not really a good idea to simply run the entire batch in one shot, especially the first time you run these queries on a particular server, since some of these queries can take some time to run, depending on your workload and hardware. I also think it is very helpful to run each query, look at the results (and my comments on how to interpret the results) and think about the emerging picture of what is happening on your server as you go through the complete set. I have some comments in the script on how to interpret the results after each query.

You need to click on the top left square of the results grid in SQL Server Management Studio (SSMS) to select all of the results, and then right-click and select “Copy with Headers” to copy all of the results, including the column headers to the Windows clipboard. Then you paste the results into the matching tab in the blank results spreadsheet.

About half of the queries are instance specific and about half are database specific, so you will want to make sure you are connected to a database that you are concerned about instead of the master system database. Running the database-specific queries while being connected to the master database is a very common mistake that I see people making when they run these queries.

Note: These queries are stored on Dropbox. I occasionally get reports that the links to the queries and blank results spreadsheets do not work, which is most likely because Dropbox is blocked wherever people are trying to connect.

I also occasionally get reports that some of the queries simply don’t work. This usually turns out to be an issue where people have some of their user databases in 80 compatibility mode, which breaks many DMV queries, or that someone is running an incorrect version of the script for their version of SQL Server.

It is very important that you are running the correct version of the script that matches the major version of SQL Server that you are running. There is an initial query in each script that tries to confirm that you are using the correct version of the script for your version of SQL Server. If you are not using the correct version of these queries for your version of SQL Server, some of the queries are not going to work correctly.

If you want to understand how to better run and interpret these queries, you should consider listening to my three latest Pluralsight courses, which are SQL Server 2014 DMV Diagnostic Queries – Part 1SQL Server 2014 DMV Diagnostic Queries – Part 2 and SQL Server 2014 DMV Diagnostic Queries – Part 3. All three of these courses are pretty short and to the point, at 67, 77, and 68 minutes respectively. Listening to these three courses is really the best way to thank me for maintaining and improving these scripts…

Finally, if you want to get even more information about how to run and interpret these queries, you should consider attending my half-day session Dr. DMV’s Troubleshooting Toolkit at the PASS Summit 2015 starting at 9:30AM on Friday, Oct 30, 2015 in Seattle.

Please let me know what you think of these queries, and whether you have any suggestions for improvements. Thanks!

Samsung 950 PRO M.2 PCIe NVMe SSD

Samsung has announced their new 950 PRO M.2 PCIe NVMe solid state drive, which is potentially great news if you are considering building a new system (or have a new enough system that has M.2 slots that support PCIe 3.0 x4 speeds)

According to the press release:

The 950 PRO will be available in 512 gigabyte (GB) and 256GB storage capacities. The 512GB version delivers sequential read/write speeds of up to 2,500 MB/s and 1,500 MB/s. Random read performance is up to 300,000 IOPS, with write speeds of up to 110,000 IOPS.

Both capacities come with a 5-year limited warranty up to 200 terabytes written (TBW) for the 256GB and 400TBW for the 512GB. The 950 PRO will be available beginning in October 2015, with an MSRP of $199.99 for the 256GB capacity and $349.99 for the 512GB capacity.

TheSSDReview has a good story about this drive here.

In case you are wondering, NVMe or NVM Express (Non-Volatile Memory Express) is an optimized, high performance, scalable host controller interface with a streamlined register interface and command set designed for enterprise and client systems that use PCIe SSDs. It typically offers much better performance than the legacy AHCI (Advanced Host Controller Interface) interface used by some PCIe solid state drives (and all SATA solid state drives). You can read more about NVM Express here.

I am getting close to buying the parts for a new Z170-based, Core i7-6700K desktop system to replace my current Z77-based Core i7-3770K system that I built in early 2012. I am going to be using an ASRock Z170 Extreme7+ motherboard for this new system, mainly because all of the I/O capacity that it offers, including four PCIe 3.1 x16 slots, and three “Ultra” M.2 PCIe 3.0 x4 slots. It also has ten SATA 3 ports, three SATA Express ports, and USB 3.1 Type A and C support.

Even with the new Z170 chipset, you won’t be able to use all of this I/O capacity, since you only have 26 high-speed I/O lanes available, but you should be able to put three Samsung 950 PRO M.2 drives into the three available slots on this motherboard.

 

 

Figure 1: ASRock Z170 Extreme7+ Motherboard

If you want to be able to use one of these very fast M.2 solid state drives, you will need to make sure that your system has an M.2 slot that is also long enough (80mm) to accommodate the card. You will also want your M.2 slot to support PCIe 3.0 x4 (meaning four lanes), which is sometimes called “Ultra M.2”.