The critical first question is
whether you want an Intel processor or an AMD processor for your
database server. Unfortunately, it is very hard to make a viable case
for choosing an AMD processor-based server for SQL Server 2012, for two
main reasons. The first reason is performance. The cold, hard fact is
that AMD has simply been unable to compete with Intel from a
single-threaded performance perspective since the introduction of the
Intel Nehalem microarchitecture in 2008. This gap has only increased
over the past several years with the introduction of the Westmere,
Sandy Bridge, and Ivy Bridge processors. The second reason is the
licensing cost for SQL Server 2012 Enterprise Edition. AMD processors
have higher physical core counts in their processors compared to Intel,
and they provide lower performance per physical core. This forces you
to pay for more SQL Server 2012 core licenses but get lower
single-threaded performance, which is not a very good combination.
Because SQL Server 2012 Enterprise Edition is
licensed by physical core, this makes it much more expensive to use a
relatively poorly performing AMD processor for SQL Server 2012. One
argument in favor of AMD is that their high-end processors are
significantly less expensive than the high-end Intel models. If your
primary consideration is getting the absolute lowest hardware cost,
regardless of the effect on performance or scalability, then you should
be considering a low core count, AMD processor-based system. In
fairness to AMD, many typical SQL Server workloads would run perfectly
fine on a modern AMD system; therefore, if low hardware cost is your
first priority, you can buy an AMD server with a low core count
processor to save some money.
1. Intel Processors
Until the introduction of the Intel
Xeon E7 processor family in 2011 and the Intel Xeon E5 processor family
in 2012, Intel had different processor families for different socket
count servers. For example, the Intel Xeon 3xxx family was for
single-socket servers, the Intel Xeon 5xxx family was for two-socket
servers, and the Intel Xeon 7xxx family was for four-socket (or more)
servers. Now you can get an Intel Xeon E5 family processor for a one-,
two-, or four-socket server. You can choose a Xeon E5–2400 series
processor for a one- or two-socket server, a Xeon E5–2600 series
processor for a two-socket server, or a Xeon E5–4600 series processor
for a four-socket server. You can also get an Intel Xeon E7 family
processor for a two-, four-, or eight-socket server. You can choose a
Xeon E7–2800 series processor for a two-socket server, a Xeon E7–4800
series processor for a four-socket server, or a Xeon E7–8800 series
processor for an eight-socket (or more) server. These new options from
Intel can be quite confusing to sort out unless you pay attention to
the details.
Prior to the release of SQL Server 2012, paying
the price premium for the absolute best processor available for each
socket in your database server was an effective strategy for database
server processor selection. The SQL Server processor license cost was
pretty high (even for Standard Edition), so you wanted to get as much
performance and scalability capacity as possible for each expensive
processor socket license that you purchased.
This is still a valid strategy for SQL Server
2008 R2 and earlier, but the licensing changes in SQL Server 2012
Enterprise Edition dictate a few modifications to this line of
thinking. In early November 2011, Microsoft announced some rather
fundamental changes regarding how SQL Server 2012 will be licensed
compared to previous versions. SQL Server 2012 has three main editions:
Enterprise Edition, Business Intelligence Edition, and Standard
Edition. The old Data Center Edition and Workgroup Edition have been
eliminated, which is probably no big loss. The existing Developer and
Express Editions are still available, along with Web Edition for
hosting providers.
Rather than the old, familiar socket-based
licensing used in SQL Server 2008 R2 and earlier, SQL Server 2012 uses
a combination of core-based and Server + Client Access License (CAL)
licensing, depending on which edition you buy, and which choice you
make for Standard Edition. With Standard Edition, you can choose
core-based licensing or Server + CAL-based licensing. With Business
Intelligence Edition, you have to use Server + CAL-based licensing,
while Enterprise Edition requires the use of core-based licensing.
Standard Edition is the base edition, with a limit of 16 physical
processor cores. Microsoft decided to maintain the 64GB RAM limit for
SQL Server 2012 Standard Edition (just like the 64GB RAM limit in SQL
Server 2008 R2 Standard Edition). Business Intelligence Edition
includes all the functionality of Standard Edition, plus extra BI
features and functionality. Enterprise Edition includes everything in
BI Edition, plus all the extra Enterprise Edition features and
functionality. Enterprise Edition is the top-of-the-line edition of SQL
Server 2012, now including all the features that were available in SQL
Server 2008 R2 Data Center Edition. As a DBA, you really want to use
Enterprise Edition if you have any choice in the matter, as it offers
so many useful features, such as online index operations, data
compression, and AlwaysOn availability groups, to name a few.
If you are using core-based licensing (as you
must for SQL Server 2012 Enterprise Edition), each physical socket in
your server must use a minimum of four core licenses. That means if you
have old hardware that uses dual-core processors, you still have to buy
four core licenses for each socket. That is yet another reason to not
use ancient hardware for SQL Server 2012. Any Intel Xeon or AMD Opteron
processor that has only two physical cores was at least four to five
years old by the time SQL Server 2012 was released, so it really should
be retired. Keep in mind that only physical cores count for licensing
purposes (on non-virtualized servers), so Intel hyperthreading is free
from a licensing perspective.
Core licenses are now sold in two-core packs,
again with a minimum of four cores per physical socket. The full retail
license cost per physical core is $6,874 for SQL Server 2012 Enterprise
Edition. This is pretty grim news for AMD, with their higher physical
core counts and lower per-socket performance compared to Intel. This
situation was so obvious that Microsoft released a SQL Server 2012 Core
Factor Table on April 1, 2012, that reduces the per-core license cost
by 25% for a number of modern AMD processors that have six or more
cores. Even with this change, the latest AMD processors are not a very
cost-effective choice for SQL Server 2012. The numbers in Table 1
show the cost differential in pretty graphic detail, even with the .75
AMD Core Factor (see the “AMD Processors and Numbering” section later)
applied to the license costs for the AMD processors.
TABLE 1: SQL Server 2012 License Cost Comparison
For an OLTP workload on a two-socket server, an
Intel Xeon E5–2690 processor would be preferable to an Intel Xeon
E7–2870 processor because of its better single-threaded performance, a
result of being a newer-generation model (Sandy Bridge-EP vs.
Westmere-EX), higher clock speed, better memory bandwidth, and PCIe 3.0
support. For a DSS/DW workload, the E5–2690 would be preferable for the
same reasons, even though it has a lower core count and a smaller L3
cache size.
For most OLTP workloads, you would also be far
better off, from a performance perspective, with an older two-socket
Intel Xeon X5690 server or a two-socket Intel Xeon E5–2690 server than
you would be with a four-socket AMD Opteron 6282SE server. The
extremely large difference in license cost between those two options
makes Intel an even more compelling choice. As shown in Table 2,
one way to partially confirm this assessment is to look at TPC-E scores
for different systems and divide them by the total physical core count
for the system (not by the thread count).
TABLE 2: TPC-E Scores by Total Physical Cores
It is very unlikely that you would ever upgrade
to a better processor in an existing database server, so you will be
stuck with your processor choice for the life of the server. If you
have “excess” processor capacity, consider using it to trade CPU
utilization for I/O utilization by using backup compression and data
compression (if you have the Enterprise Edition of SQL Server 2008 or
newer). Unlike a laptop or web server, it is a mistake to buy a
processor that is a couple of steps down from the top-of-the-line model
for database server usage. Trading some extra CPU utilization for less
I/O utilization is usually a net win, especially if you have a modern,
multi-core processor that can readily handle the extra work.
Of course, a new two-socket server will have a
lower total RAM limit than a new four-socket server. For example, a
two-socket Xeon X5690 would be limited to 288GB of RAM, which is
probably enough for most workloads. A two-socket server will also have
less total I/O capacity than a new four-socket server because it has
fewer PCIe expansion slots. Still, you can easily get 5–6GB/sec of
sequential throughput out of a modern two-socket server, which should
be plenty for most workloads. After the Intel 32nm Sandy Bridge-EP Xeon
E5–2600 series was released in early 2012, the wisdom of choosing a
two-socket Intel-based server was even clearer, as it has higher memory
density, more I/O bandwidth, and even better per-core performance than
the Xeon 5600 series did.
If you are looking at the lower end of the cost
and workload spectrum, you have several options. The one-socket 22nm
Intel Xeon E3–1290 v2 processors (which are basically the same as the
desktop Ivy Bridge Core i7 processor) are limited to 32GB of RAM, which
somewhat limits their utility for larger database usage. If 32GB of RAM
is not enough for your workload, a single-socket Dell R320 server with
one Intel Xeon E5–2400 series processor and up to 96GB of RAM is
available. Keep in mind that the memory limit for SQL Server 2012
Standard Edition is still 64GB, which is too low considering the memory
density of modern hardware. One possible way around it with good
hardware (with more than 128GB of RAM) is to install more than one
instance of SQL Server 2012 Standard Edition on the same physical
server.
Classic Intel Processor Numbering
In order to understand older Intel
processor numbers, you need to know how to decode “classic” Intel
processor numbers. By classic we mean Intel Xeon processors produced
from about 2006 until April 2011 (when Intel introduced a new processor
numbering system for new and upcoming processors).
Knowing how to decode the processor model number
is a very handy skill to have when you want to understand the
capabilities, relative age, and relative performance of a particular
processor. An example of an Intel processor number is shown in Figure 1.
Intel Xeon processor numbers are categorized in
four-digit numerical sequences, plus an alpha prefix that indicates
whether it is optimized for electrical power usage or performance. The
alpha prefixes are as follows:
- X, meaning performance
- E, meaning mainstream
- L, meaning power optimized
The model number starts with 3, 5, or 7,
depending on the server form factor for which the processor is
designed. If the processor number starts with a 3, it is designed for a
single-socket server; if it starts with a 5, it is designed for a
two-socket server; and if it starts with a 7, it is designed for a
four-socket or more server. The second digit of the model number
designates the generation, or relative age, of a processor. For
example, the Xeon 5100 series was launched in Q2 2006, while the Xeon
5300 series was launched in Q4 2006, and the Xeon 5400 series was
launched in Q4 2007.
For a more complete example, a Xeon X7560 is a
high-end performance processor for multi-processor systems, an Intel
Xeon E5540 is a mainstream processor for dual-processor systems, while
an Intel Xeon L5530 is a power-optimized processor for dual-processor
systems. The final three digits denote the generation and performance
of the processor; for example, a Xeon X7560 processor would be newer
and probably more capable than a Xeon X7460 processor. Higher numbers
for the last three digits of the model number mean a newer generation
in the family — for example, 560 is a newer generation than 460.
You should always
choose the performance models, with the X model prefix, for SQL Server
usage. The additional cost of an X series Xeon processor, compared to
an E series, is minimal compared to the overall hardware and SQL Server
license cost of a database server system. You should also avoid the
power-optimized L series, as these can reduce processor performance by
20% to 30% while only saving 20 to 30 watts of power per processor,
which is pretty insignificant compared to the overall electrical power
usage of a typical database server (with its cooling fans, internal
drives, power supplies, etc.). Of course, it would be a different story
if you needed dozens or hundreds of web servers instead of a small
number of mission-critical database servers, as the overall power
savings would be pretty significant in that case.
Current Intel Processor Numbering
This section explains the current
processor numbering system for Xeon processors that Intel introduced on
April 5, 2011. This new system, shown in Figure 2,
is used for the new processor families that Intel released on that date
(the E3 series and the E7 series) and the E5 series that was released
in March of 2012. The model numbers for the older existing Xeon
processors remain unchanged in this system.
The first two digits in the processor number
represent the Product Line designation, which will be E3, E5, or E7,
depending on their place in the overall product lineup. After the
Product Line designation is a four-digit number that provides more
details about the particular processor. The first digit is the
“wayness,” which is the number of physical CPUs that are allowed in a
node (which is a physical server). This first digit can be 1, 2, 4, or
8. The second digit is the socket type, in terms of its physical and
electrical characteristics. The last two digits are the processor SKU,
with higher numbers generally indicating higher performance. Finally,
an L at the end indicates energy-efficient, low electrical power
processors. For SQL Server database server usage, you should avoid
these power-optimized processors, as the performance impact of the
reduced power usage is pretty dramatic.
The E3 Product family is for single-processor
servers or workstations. The first generation of this family (E3–1200
series) is essentially the same as the desktop 32nm Sandy Bridge
processors that were released in January 2011. The second generation of
this family is the E3–1200 v2 series, which is basically the same as
the desktop 22nm Ivy Bridge processors that were released in May 2012.
They are both limited to 32GB of RAM.
The E5 Product family (the 32nm Sandy Bridge-EP)
includes the E5–2600 series that was released in March 2012, and the
E5–2400 series (32nm Sandy Bridge-EN) and E5–4600 series that were
released in May 2012. You should probably avoid the entry-level Sandy
Bridge-EN series, which has less memory bandwidth and lower clock
speeds compared to the Sandy Bridge-EP series.
The E7 Product family (the 32nm Westmere-EX) has
different models that are meant for two-socket servers, four-socket
servers, and eight-socket and above servers. The E7–2800 series is for
two-socket servers, the E7–4800 series is for four-socket servers,
while the E7–8800 series is for eight-socket and above servers. Just in
case you are wondering, the “EP” designation at the end of the family
code word (such as Westmere-EP) stands for “efficient performance,”
while the “EX” designation stands for “expandable.”
Intel’s Tick-Tock Release Strategy
Since 2006, Intel has adopted and
implemented a Tick-Tock strategy for developing and releasing new
processor models. Every two years, they introduce a new processor
family, incorporating a new microarchitecture; this is the tock
release. One year after the tock release, they introduce a new
processor family that uses the same microarchitecture as the previous
year’s tock release, but using a smaller manufacturing process
technology and usually incorporating other small improvements, such as
larger cache sizes or improved memory controllers. This is the tick
release. This Tick-Tock release strategy benefits the DBA in a number
of ways. It offers better predictability regarding when major (tock)
and minor (tick) releases will be available. This helps you plan
hardware upgrades to possibly coincide with your operating system and
SQL Server version upgrades.
Tick releases are usually socket-compatible with
the previous year’s tock release, which makes it easier for the system
manufacturer to make the latest tick release processor available in
existing server models quickly, without completely redesigning the
system. In most cases, only a BIOS update is required to enable an
existing model system to use a newer tick release processor. This makes
it easier for the DBA to maintain servers that are using the same model
number (such as a Dell PowerEdge R710 server), as the server model will
have a longer manufacturing life span. For example, the Dell PowerEdge
R710 was able to use the original 45nm Nehalem-EP Xeon 5500 series
processors and the newer 32nm Westmere-EP Xeon 5600 series processors,
so that model server was available for purchase for over three years.
As a DBA, you need to know where a particular
processor falls in Intel’s processor family tree in order to
meaningfully compare the relative performance of two different
processors. Historically, processor performance has nearly doubled with
each new tock release, while performance usually increases by around
20–25% with a tick release. Some of the recent and upcoming Intel
Tick-Tock releases are shown in Figure 3.
The manufacturing process technology refers to
the size of the individual circuits and transistors on the chip. The
Intel 4004 (released in 1971) series used a 10-micron process; the
smallest feature on the processor was 10 millionths of a meter across.
By contrast, the Intel Xeon “Ivy Bridge” E3–1200 v2 series (released in
May 2012) uses a 22nm process. For comparison, a nanometer is one
billionth of a meter, so 10 microns would be 10,000 nanometers. This
ever-shrinking manufacturing process is important for two main reasons:
- Increased performance and lower power usage
— Even at the speed of light, distance matters, so having smaller
components that are closer together on a processor means better
performance and lower power usage.
- Lower manufacturing costs — This is
possible because more processors can be produced from a standard
silicon wafer. This helps to create more powerful and more
power-efficient processors available at a lower cost, which is
beneficial to everyone but especially the database administrator.
The first tock release was the Intel
Core microarchitecture, which was introduced as the dual-core
“Woodcrest” (Xeon 5100 series) in 2006, with a 65nm process technology.
This was followed up by a shrinkage to 45nm process technology in the
dual-core “Wolfdale” (Xeon 5200 series) and quad-core “Harpertown”
processors (Xeon 5400 series) in late 2007, both of which were Tick
releases. The next tock release was the Intel “Nehalem”
microarchitecture (Xeon 5500 series), which used a 45nm process
technology, introduced in late 2008. In 2010, Intel released a Tick
release, code-named “Westmere” (Xeon 5600 series) that shrank to a 32nm
process technology in the server space. In 2011, the 32nm “Sandy
Bridge” tock release debuted with the E3–1200 series for single-socket
servers and workstations. This was followed up by the “Ivy Bridge” tick
release of the E3–1200 v2 series for single-socket servers and
workstations that had a process shrink to 22nm. Table 3 shows the recent and upcoming Tick-Tock releases in the two-socket server space.
TABLE 3: Intel Tick-Tock Release History for Two Socket Servers
Intel Hyperthreading
Intel originally implemented a feature
called hyperthreading back in 2002, as part of the NetBurst
architecture in the Northwood-based Pentium 4 processors and the
equivalent Xeon family. Hyperthreading was created to address the
frequently wasted processor cycles that resulted when the central
processor in a system waited on data from main memory. Instead of
wasting processor cycles during this wait time, the idea was to have
two logical processors inside a single physical core that could each
work on something different when the other logical processor was
stalled waiting on data from main memory.
Hyperthreading is Intel’s marketing term for its
simultaneous multi-threading architecture whereby each physical
processor core is split into two logical cores. The “simultaneous” term
is a little misleading, as you cannot actually have two threads running
simultaneously on the two logical cores in a single physical core of
the same physical processor. What actually happens is that the threads
run alternately, with one working while the other one is idle.
Hyperthreading works quite well for desktop
applications. The classic example is running a complete anti-virus scan
while the user is still able to work interactively with another
application in the foreground. Unfortunately, the initial
implementation of hyperthreading on the Pentium 4 NetBurst architecture
did not work very well on many server workloads such as SQL Server.
This was because the L2 data cache for each physical core was shared
between the two logical cores, which caused performance issues because
the L2 cache had to be constantly refreshed as the application context
switched between the two logical processors. This behavior was known as
cache thrashing, and it often led to
a decrease in overall performance for SQL Server workloads. Another
factor that made this situation even worse was the very deep processor
pipeline that was used in the Pentium 4 architecture, which made it
even more costly when the data needed by the logical processor was not
found in the L2 cache.
Because of these factors, it became very common for database administrators to disable hyperthreading for all
SQL Server workloads, which is really a mistake. Different types of SQL
Server workloads react differently to having hyperthreading enabled,
with OLTP workloads generally performing better with hyperthreading
enabled, and data warehouse workloads sometimes performing worse with
hyperthreading enabled. Before you decide whether to enable or disable
hyperthreading, test it both ways with your actual workload.
Modern Intel processors (Nehalem, Westmere, Sandy
Bridge, and Ivy Bridge) seem to work much better with hyperthreading
because of larger L2 and L3 cache sizes, newer processor architectures,
and faster access to main memory. Because of this, we advise you to
enable hyperthreading for SQL Server, especially for OLTP workloads,
unless you have done testing that actually shows a performance decrease
with your workload. It is significant that every single TPC-E OLTP
benchmark submission for these modern Intel processors has been done
with hyperthreading enabled on the database server, which is certainly
intentional.
2. AMD Processors and Numbering
This section discusses AMD Opteron
processor numbering. Advanced Micro Devices (AMD) has various versions
of the Opteron family that are meant for server use. When assessing AMD
processors, it is very helpful to understand what the model numbers
actually mean. Recent AMD Opteron processors are identified by a
four-character model number in the format ZYXX, where the Z character
indicates the product series:
- 1000 Series = 1-socket servers
- 2000 Series = Up to 2-socket servers and workstations
- 4000 Series = Up to 2-socket servers
- 6000 Series = High performance 2- and 4-socket servers
- 8000 Series = Up to 8-socket servers and workstations
The Y character differentiates products within a series:
- Z2XX = Dual-Core.
- Z3XX = Quad-Core.
- Z4XX = Six-Core.
- First-generation AMD Opteron 6000 series processors are denoted by 61XX.
- Second-generation AMD Opteron 6000 series processors are denoted by 62XX.
The XX digits indicate a change in
product features within the series (for example, in the 8200 series of
dual-core processors, you can find models 8214, 8216, 8218, and so on),
and are not a measure of performance. It is also possible to have a
two-character product suffix after the XX model number, as follows:
- No suffix — Indicates a standard power AMD Opteron processor
- SE — Performance optimized, high-powered
- HE — Low-powered
- EE — Lowest power AMD Opteron processor
For example, an Opteron 6282 SE would be
a 6000 series, 16-core, performance-optimized processor; an Opteron
8439 SE would be an 8000 series, six-core, performance-optimized
processor; while an Opteron 2419 EE would be a 2000 series, six-core,
energy-efficient processor. For mission-critical database servers, we
recommend selecting an SE suffix processor, if it is available for your
server model. The reason why it isn’t available in every server model
is due to its higher electrical power requirements.
It should also be noted that AMD has broken their
own processor numbering rules with the most recent versions of the
Opteron (including the 4100, 4200, 6100, and 6200 series), as they do
not follow the standard numbering scheme just described.
Recent Opteron AMD releases, plus planned releases, are summarized in Table 4.
Since 2011, the 16-core Interlagos processor has been AMD’s
best-performing model, even though it did not live up to expectations
for that release.
TABLE 4: Recent AMD Processor Releases
SQL Server 2012 Core Factor Table
Looking at recent TPC-E benchmark
submissions for both AMD and Intel processors, it is pretty difficult
to avoid noticing how poorly the few tested AMD systems have done
compared to the latest Intel systems. For example, in January 2012, a
new Hewlett-Packard TPC-E benchmark submission showed a 1232.84 TpsE
score for a two-socket AMD system with 32 physical cores, compared to a
1284.14 TpsE score for a two-socket Intel system with 12 physical
cores. Both of these TPC-E benchmark submissions were on SQL Server
2008 R2. With these results, you would be paying 2.66 times as much for
SQL Server 2012 Enterprise Edition core licenses for the AMD system
compared to the Intel system (32 physical cores vs. 12 physical cores).
This is rather dire news for AMD, with their higher physical core
counts and lower per physical core OLTP performance compared to Intel.
Likely in response to this situation, on April 1,
2012, Microsoft released a new SQL Server 2012 Core Factor Table for
AMD processors, which is shown in Table 5. Note that not all processors are included in the table.
TABLE 5: SQL Server 2012 Core Factor Table for AMD Processors
PROCESSOR TYPE |
CORE FACTOR |
All other AMD Processors |
1 |
AMD 31XX, 32XX, 41XX, 42XX, 61XX, 62XX Series Processors with 6 or more cores |
0.75 |
Single-Core Processors |
4 |
Dual-Core Processors |
2 |
The most relevant part of this table regards the
newer AMD 31XX, 32XX, 41XX, 42XX, 61XX, and 62XX series of processors
with six or more cores that have a core factor of 0.75. Having a core
factor of 0.75 means that you multiply the actual number of physical
cores times the core factor to arrive at the number of cores for SQL
Server licensing purposes; for example, if you had a four-socket
server, where each socket was populated with an AMD Opteron 6284 SE
processor. That particular processor has 16 physical cores, so 4 times
16 would give you a result of 64 SQL Server 2012 core licenses that
would be required for that server (before the Core Factor table was
introduced). Using the new licensing rules from the Core Factor table,
you would be able to multiply 64 times 0.75 to get a new result of 48
SQL Server 2012 core licenses that would be required for that server
(after the Core Factor table was introduced). This means that AMD cores
for some processors are somewhat more affordable now for SQL Server
2012 than they would be without the core factor calculation.
Based on the SQL Server 2012 Core Factor Table, you would only be paying twice as much
for SQL Server 2012 Enterprise Edition licenses for the 32-core AMD
system compared to the 12-core Intel system (32 AMD physical cores
times 0.75 vs. 12 Intel physical cores). That is a slightly better
story for AMD, but it is still a pretty hard sell.
Based on the TPC-E benchmark results, both the
older Intel Xeon X5600 Westmere-EP series and the new Intel Xeon
E5–2600 Sandy Bridge-EP series perform much better per physical core on
OLTP workloads than the latest AMD Opteron 6200 series processors.
These Intel processors simply have significantly better single-threaded
performance, which is very important for OLTP workloads.
As a result of this new Core Factor
Table, SQL Server 2012 processor licenses will be a little less
expensive than they were previously for those AMD processor families
that have more than six cores, but they will still be much more
expensive in total than a better-performing Intel solution. The
somewhat lower hardware cost for the AMD processor compared to the
hardware cost of the Intel processor is rather trivial compared to the
difference in the licensing cost. Hopefully AMD can do better with the
upcoming Piledriver core-based Opteron series expected in 2013.