So I decided to upgrade some of my database data onto SSD from the typical HDD setup. I ordered 2 Kingston Digital 120GB SSDNow V300 from Amazon for cheap. One for box1 and one for box2. I will be running the tests on box2 since I'm currently migrating projects over to upgrade to the latest Ubuntu 14.04.

Overview

The database that I'm working with contains just shy of 2 million records. This database contains a table `urls` which stores webpage information such as the meta title, description, keyworks, favicon, etc. This data is generated by the webworker.py package I'm currently writing. We all know that InnoDB tends to "slow" down once breaking the 1M mark. Lets see the performance of HDD vs SSD.

HDD Setup

My server currently has a partition for the /var system directory which means anything in /var will be stored on that disk. I did this so mysql would "kinda" be on it's own disk. Oh the HDD is a 7200 RPM mechanical drive.

COUNT(*) Example:

mysql> select sql_no_cache count(*) from urls;
+----------+
| count(*) |
+----------+
|  1998099 |
+----------+
1 row in set (37.81 sec)

SSD Setup

I copied my database directory from /var/lib/mysql/website to my new mounted SSD location. I then moved website database directory to website.bak so I had a backup and symbolic linked website to my SSD location.

COUNT(*) Example:

mysql> select sql_no_cache count(*) from urls;
+----------+
| count(*) |
+----------+
|  1998099 |
+----------+
1 row in set (2.53 sec)

Conclusion

From the results we can see that SSD simply outperforms the HHD by almost 15X in this count * query. Kingston claims their SSD's are 10X faster than traditional HDD and can say this is absolutely true since the MySql count * test exceeded their claims. If you need performance, throw some hardware at it. SSD's outperform HDD's in every single way so remove some of the bottlenecks and that is the HDD IO limitations...

comments powered by Disqus
eXTReMe Tracker