[mythtv-users] MySQL on SSD 99% Utilization

Rob Smith kormoc at mythtv.org
Thu Feb 3 17:48:18 UTC 2011


On Thu, Feb 3, 2011 at 8:40 AM, Brian Long <briandlong at gmail.com> wrote:
> Is it generally a bad practice to put MySQL on a SSD?  I figured it would
> provide a nice fast DB and keep my DB separate from my recording disks, but
> I guess I was wrong.

Bad practice? negative. It's the way the industry is heading, but
alas, there are a fair number of pitfalls.

That SSD doesn't support TRIM (
https://secure.wikimedia.org/wikipedia/en/wiki/TRIM_(SSD_command) ),
and thus after you've written 30 gigabytes to that drive it has to do
a read, erase, write. This is extremely slow*.

SSD's are *extremely* sensitive to non-aligned file systems. You have
to be extremely careful when you create the partitions to prevent
performance issues.

Filesystems are not typically optimized for SSDs, you can typically
set some flags that will help (noatime, nodiratime, nobh,
data=writeback)

The default IO scheduler for recent kernels is CFQ and is entirely
meaningless for SSDs, using noop is much** better.

myisam has some options that also should help***. myisam-block-size is
the key one if you are memory limited. mysqltuner.pl might help.

* milliseconds vs microseconds
** depends on workload
*** depends on specific bottleneck

~Rob


More information about the mythtv-users mailing list