Previously I covered simple case with FlashCache, when data fits into cache partitions, now I am trying to test when data is bigger than cache.
But before test setup let me address some concern (which I also had). Intel X25-M has a write cache which is not battery backuped, so there is suspect you may have data loss in the case of power outage.
And in the case with FlashCache it would mean you can send your database to trash, as there is no way to recovery from that ( only restore from backup).
I personally did couple of power failure tests and there is article on this topic http://www.anandtech.com/show/2614/10. I did not see any data loss in my tests, and the article says that the write cache “..isn’t used for user data because of the risk of data loss, instead it is used as memory by the Intel SATA/flash controller for deciding exactly where to write data..”. So I assume we should be safe running Intel X25-M with enabled write cache.
Second issue I faced, and which took quite efforts to sort ( thanks Mohan Srinivasan, maintainer of FlashCache, for help with that) is 16KB alignment in XFS and FlashCache. As developers recommend to have 16KB block size in XFS and 16KB block size in FlashCache, I was not able to make it working, there too many moving parts – it’s XFS alignment by RAID strip size, XFS aligned file allocation, raid partition should be created aligned by 16K block, etc. In result I had too many cache misses
so results were not impressive, I had to move to standard for filesystems 4K blocks.
For benchmark I used sysbench oltp with 300 mln rows, which gives about 70GB of data. I allocated 35GB for cache on SSD and I used 16GB and 10GB buffer pool sizes. I run sysbench with special distribution, not uniform, the reason for that is that I do not really expect big improvement from clear uniform random hits, as in this case we will have 1/2 probability to go to disk read, and also there overhead in FlashCache on flushing and replacing pages. Special distribution is 75% of all requests are hits 1% of data, and rest data are accessed in 25% of cases. I think it also better describes real workload, as you do not expect all 100% of users coming to your website in the same time.
So full details are there
And short results:
|buffer_pool, GB||RAID10||FlashCache 20%|
As you see there is more 2x improvement, which is quite impressive.
Of course you do not have to believe benchmarks, so I encourage you to test yourself (my full scripts and mysql config files are on Wiki page).
There are binaries for CentOS 5.5 and Ubuntu 10.04 if you are not so much in kernel modules compiling:
Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.
Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below.