Everyone knows the performance parameters of disk subsystems in theory. But what in practice? Many ask this question, some build their hypotheses. I decided to conduct a series of tests and define “Who is who.” I started testing with all known dd utilities, hdparm, then moved to fio, sysbench. A number of tests were also performed using UnixBench and several other analogues. A number of graphs were built, but with further testing it was discovered that the majority of this software is unsuitable for adequate comparison of different disks.
With the help of fio, it was possible to create a comparative table or graph for SAS, SATA, but when testing SSD it turned out that the results obtained were completely unsuitable. Of course, I respect the developers of this whole software, but at that moment it was decided to create a series of not synthetic tests, but closer to the real situation.
At once I will say that the test parameters and the machines themselves were selected in such a way that the test results were not distorted by the type of processor, its frequency or other parameters.
Test 1
Creating files
For eight cycles, the creation of small files with chaotic content and with a gradual increase in the number of files per cycle was generated. For each cycle, the execution time was measured.
From the graph it is clear that SSD KINGSTON SV300S3 have a high speed of creating files and almost do not depend on their number. It is also worth noting that these particular disks have a more straightforward scale.
On SAS disks in Hardware RAID it is clear that the speed depends on the type of raid, but does not depend on the number of disks.
But more time is spent not on creating files, as it turned out, but on overwriting them. So let's move on to the second test.
Test 2
File overwriting
Those that operations were repeated in the first test, but the files were not created new each time, but the same file was used, in which new information was recorded each time.
Immediately struck a terrible picture on SATA 7,200 rpm MB2000GCVBR. Slow recording and 2x 300GB SAS SEAGATE. For this, I decided to throw them out of the graph for clarity on the rest.
The fastest subsystem was a single SSD KINGSTON. The second and third place was taken by 8x SEAGATE ST3300657SS and 4x SEAGATE ST3300657SS. We also see that with an increase in the number of SSDs in the array, the speed drops slightly.
')
Test 3
MySQL Combining sql queries INSERT, SELECT, UPDATE, DELETE
An InnoDB table was created with the following structure:
CREATE TABLE `table` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`time` int(11) NOT NULL,
`uid` int(11) NOT NULL,
`status` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=cp1251;
Several requests were generated simultaneously:
- INSERT;
- UPDATE sampled by PRIMARY KEY;
- UPDATE with a selection of FULLTEXT (search on 4 characters from 24): WHERE `status` LIKE '% (string)%';
- DELETE FROM with a selection of PRIMARY KEY;
- DELETE FROM with selection without using the key: WHERE `time`> (int);
- SELECT with selection without using the key: WHERE `time`> (int);
- SELECT sampled by PRIMARY KEY;
- SELECT with selection by FULLTEXT (search by 4 characters from 24): WHERE `status` LIKE '% (string)%';
- SELECT with selection without using the key: WHERE `uid`> (int).
And again we see the same picture as in the second test.
In the following tests, I use the sysbench utility, which generates large files:
128 files, with a total size of 10 GB, 30 GB and 50 GB.
The block size is 4 Kb.
Just want to note that on some graphs, for some servers there is no data for 10 GB. This is due to the fact that there is more than 10 GB of RAM on these machines and data caching is performed. The lack of some results on 50 GB is due to the lack of disk space in the case of SSD KINGSTON SV300S3.
Test 4
Line recording (file creation)
It can be seen that the best performance is available for all variations with SSD KINGSTON SV300S3, as well as for 8x SEAGATE ST3300657SS in RAID10. Very well seen growth rate with an increase in the number of SAS disks.
Here is the very moment where you can clearly see that SSDs are completely different. The difference is 4 times!
Test 5
Line recording (file overwriting)
The leaders are the same. If we compare 2x SSD from INTEL and 2x SAS, there is practically no difference.
Test 6
Linear reading
Here we see a slightly different picture. The leaders are 4x SSD KINGSTON RAID10, with minimal changes in results with increasing file size, and 8x SEAGATE in RAID10, with a gradual decrease in speed, at speeds of 700 Mbps and 600 Mbps.
Lines of 1x SSD KINGSTON and 2x SSD KINGSTON RAID1 matched. Simply put, linear reading is better to take either a RAID10 or a single disk. Using RAID1 is not justified.
You can clearly see that showed 2x SAS RAID1 and 4x SAS RAID10 are very similar. But with the increase in the number of disks twice seen a huge increase in speed.
Intel RAID1 2x SSD has not a small drop in speed over a span of 10 GB - 30 GB, and then they go at the same speed with SATA RAID1.
Test 7
Random read
The leaders are all SSD:
- 4x KINGSTON RAID10;
- 2x KINGSTON RAID1,2x INTEL RAID1;
- 1 KINGSTON.
All others copied to the next graph for clarity.
The highest speed among these has naturally 8x SAS RAID10, but the speed drops sharply. But based on data from 2x SAS and 4x SAS, I would assume that with further growth in volume the speed stabilizes.
Test 8
Random record
Excellent performance has 2x 120GB SSD INTEL SSDSC2CT12 Hardware RAID1 SAS1068E with a stable speed of 30 Mbps. According to KINGSTON, with an increase in the number of disks, the speed, oddly enough, decreases. In fourth place is 8x SAS SEAGATE.
Test 9
Combined random read and write operations
We all know that no server has only reads or records. Both operations are always performed. And in most cases these are just random operations, not linear ones. And so, let's see what we did.
Due to the excellent recording speed with a large margin is 2x SSD INTEL, followed by SSD KINGSTON. Third place was shared by 2x SSD KINGSTON and 8x SAS SEAGATE.
Test 10
After conducting all these tests, I decided that it would be convenient to derive the dependence of speed on the ratio of random read and random write operations.
Who has a speed increase, who has a fall, and 8x SAS RAID10 has a straight line.
Test 11
He also made a comparison of large arrays from SAS disks, by which it can be seen that the speed of the disk depends more than on their number.
It's time to take stock.
There were many cars, but not enough. Unfortunately, I was not able to determine whether the indicators for SSD INTEL SSDSC2CT12 are their peculiarity or raid controller peculiarity. But I suppose that controller.
- With the increase in the number of SAS disks in the array, all indicators only improve.
- For MySQL, slow subsystems are SATA RAID1 and SAS RAID1. For the rest there are differences, but they are not so significant.
- For linear recording, both large arrays from SAS disks in RAID10 and SSD are good. It makes no sense to use arrays from SSD. Cost is rising, and productivity is in place.
- For linear reading, any large arrays are good. But in practice, lin. reading without writing is almost never met.
- Random read for SSD single or Software RAID.
- For random recording, it is better to use Hardware RAID from the SSD, although single SSDs are not very strong.
- Random read / write, that is one of the most important indicators, have the best results on Hardware RAID from SSD.
- Summarizing all the above, for most tasks it is better to use large arrays (> = 8) from SAS or Hardware RAID from SSD. But for some tasks it would be more correct to use single SSDs.
- Based on the volumes of SSD, which are mainly offered in our market, for VDS nodes it is worth using the maximum performance of processors paired with large SAS arrays or mediocre processors and single SSDs. I think that using hw raid for two SSDs will be a little expensive.
- If you need a fast system and there is no need for a large 2x SSD disk space in Hardware RAID is the best choice. If you want to save a little at the expense of performance, then you can take a single SSD or two SSDs in the soft-raid.
Questions that were left unanswered:
- What happens when SSDs increase in Hardware RAID?
- What is cheaper for virtual servers: expensive cars and one large array of SAS or several mediocre servers with single SSD? In this issue, you should also consider the reliability / durability of SAS and SSD, as the latter are rumored by different.
In addition to the listed tests and servers, there were still many, but they were not included in the results, as they were “calibrated” tests and many of them were considered incorrect.
RAMDisk testing was also performed. The indicators were pretty good, but not the best. Probably due to the fact that it was a virtual machine.
All tests, except the last, were made only on dedicated servers.
Thanks:
- vds4you for providing a large number of virtual machines on the basis of which tests were calibrated;
- PlusServer for providing the first four tested machines on SSD / SAS, which have been tested for quite a long time. Unfortunately, they got into these graphics. As well as two SATA from current tests;
- FastVPS for providing all servers with KINGSTON SSD;
- ServerClub for providing machines with SSD INTEL Hardware RAID, as well as all machines with SAS disks;
- everyone who participated in the discussion of the initial tests, in particular on the forum searchengines