Databases Reference
In-Depth Information
Your choices for durable storage essentially boil down to three options, in increasing
order of performance: SANs, conventional disks, and solid-state devices. In a nutshell:
• SANs are nice when you need their features and sheer capacity. They perform well
for many workloads, but they're costly and they have high latency for small, ran-
dom I/O operations, especially when you use a slower interconnect such as NFS
or when the working set is too larger to fit in the SAN's internal cache. Beware of
performance surprises with SANs, and plan carefully for disaster scenarios.
• Conventional disks are big, cheap, and slow at random reads. For most scenarios,
the best choice is a RAID 10 volume of server-grade disks. You should usually use
a hardware RAID controller with a battery backup unit and the write cache set to
the WriteBack policy. Such a configuration should perform very well for most
workloads you throw at it.
• Solid-state drives are relatively small and expensive, but they're very fast at random
I/O. There are two classes: SSDs and PCIe devices. To paint these with a broad
brush, SSDs are cheaper, slower, and less reliable. You need to RAID them for
durability, but most hardware RAID controllers aren't up to the task. PCIe devices
are expensive and have limited capacity, but they're extremely fast and reliable,
and they don't need RAID.
Solid-state devices are great for improving server performance overall, and sometimes
an inexpensive SSD is just the ticket for helping out a particular workload that suffers
a lot on conventional disks, such as replication. If you really need horsepower, you
need a PCIe device. Adding fast I/O to the server tends to shift the bottleneck to the
CPU, and sometimes to the network.
MySQL and InnoDB aren't fully capable of taking advantage of the performance avail-
able from high-end solid-state storage, and in some cases the operating systems aren't
either. But this is improving pretty rapidly. Percona Server has a lot of improvements
for solid-state storage, and many of these are finding their way into mainstream MySQL
in the upcoming 5.6 release.
In terms of the operating system, there are just a few Big Things that you need to get
right, mostly related to storage, networking, and virtual memory management. If you
use GNU/Linux, as most MySQL users do, we suggest using the XFS filesystem and
setting the swappiness and disk queue scheduler to values that are appropriate for a
server. There are some network parameters that you might need to change, and you
might wish to tweak a number of other things (such as disabling SELinux), but those
changes are a matter of preference.
 
Search WWH ::




Custom Search