📜 ⬆️ ⬇️

Testing MySQL: ZFS vs UFS

zfs I had some time ago the need to create instant backups of the mysql database. The desire existed for a long time, but somehow it still seemed to be living normally with replication and backup with a slave. But the cases are different, and the ability to take an instant snapshot from the master server's file system can make life much easier. I realized that I needed a snapshot . And where there is a snapshot , ZFS appears semi-automatically on the horizon. In addition, it still has some goodies, which at the moment I don’t really need me, but in principle, their presence can greatly brighten up life.

The process of taking a snapshot of the file system, I still leave aside, but I'm trying to get some idea about ZFS compared to UFS in my conditions. Recently, I published in Habré a translation of material from John David Duncan . It describes everything quite tasty, but you have to try it yourself.

I tried…

')
I did not set myself the goal of organizing a thorough, super-reliable comparison of ZFS and UFS. Unfortunately, I have neither the strength nor the time for this. Especially since it is to test the exhibits, so that this testing satisfies all interested parties - it is absolutely unrealistic. Everyone has their own conditions and tasks. And better I will describe my conditions to you, and use publicly available tests. And let everyone make the conclusions himself! The only thing I would ask to share these findings in the comments.

So, the test system: dell r610, 2x intel xeon e5520, 8x2gb ecc ddr3 pc1066, hdd 4x146gb 15000rpm Seagate savvio 15k2, 2x bp 717v, perc 6 / I 256mb + bbu.

Drives merged into RAID5 + hotspare

FreeBSD 8.0-RELEASE GENERIC amd64

As a test, I drove the sql-bench from the MySQL package.

Server from ports: mysql-5.1.41.

In addition to the file system in the tests, I changed the mysql configs, again in order not to compose them painfully and do not paint in the article, I used the standard from / usr / local / share / mysql:

my-small.cnf
my-huge.cnf
my-innodb-heavy-4G.cnf

The name of the config is reflected in the table headers. In addition, I tested my config, which is to some extent a hybrid of my-huge.cnf + my-innodb-heavy-4G.cnf, perhaps not the most effective ... For the configuration of my-innodb-heavy-4G.cnf, I added another UFS test with softupdates.

Testing MySQL: ZFS vs UFS


The table shows the number of tests performed in the first column, and the number of seconds spent on performing a test suite.

To make it easier to analyze the data, I perverted a little - put the TOTAL line at the top of the table, and below the decoding for gourmets.

smallhugeinnodbhybrid
Operationiterationsufszfsufszfsufsufs + suzfsufszfs
TOTALS897029306.00400.00160.00269.00152.00133.00255.00155.00262.00
alter_table_add1002.004.002.004.003.003.004.003.004.00
alter_table_drop912.004.003.005.003.002.004.003.004.00
connect10,0003.003.003.003.003.003.003.003.003.00
connect + select_1_row10,0004.005.004.005.005.004.004.004.005.00
connect + select_simple10,0004.004.003.003.004.004.004.003.004.00
count_distinct10006.006.000.001.000.000.000.000.000.00
count_distinct_210008.008.000.000.001.000.000.000.000.00
count_distinct_big1002.001.001.001.001.001.001.001.001.00
count_distinct_group10007.007.000.000.000.001.000.001.000.00
count_distinct_group_on_key10006.008.000.000.000.000.000.000.000.00
count_distinct_group_on_key_parts10007.007.001.000.000.000.000.000.000.00
count_distinct_key_prefix10003.003.000.000.000.000.000.000.000.00
count_group_on_key_parts10008.009.000.000.000.000.001.000.001.00
count_on_key50,00058.0066.003.004.003.003.003.005.004.00
create + drop10,00014.0025.003:00 p.m.30.0014.0010.0031.0014.0034.00
create_MANY_tables10,00012.0018.0012.0025.0011.0010.0025.0011.0024.00
create_indexeight0.000.001.001.000.000.001.000.001.00
create_key + drop10,00016.0068.0016.0087.0016.0016.0011.0017.0090.00
create_table310.000.000.000.000.000.000.000.000.00
delete_bigone0.000.000.000.000.000.000.000.000.00
drop_indexeight1.001.000.000.000.001.001.001.001.00
drop_table280.000.000.000.000.000.000.000.000.00
drop_table_when_MANY_tables10,0006.003.006.003.006.002.003.007.003.00
insert507685.006.003.005.004.004.006.004.005.00
insert_many_fields20002.001.002.002.002.002.001.002.002.00
min_max_on_key70,0008.0010.004.006.004.005.004.005.006.00
select_1_row100,0008.008.0010.0010.007.008.008.008.009.00
select_1_row_cache100,0007.008.004.004.003.002.002.002.002.00
select_2_rows100,0008.009.0011.0012.009.009.0010.009.0010.00
select_big700.000.000.000.000.001.000.000.001.00
select_big_str10,0002.004.003.004.003.003.003.002.002.00
select_cache10,00024.0024.001.001.000.000.000.000.001.00
select_cache210,00025.0024.0024.0024.0025.0024.0025.0025.0024.00
select_column + column100,0008.008.0011.0010.008.0010.008.007.007.00
select_distinct8001.002.001.000.001.001.000.001.000.00
select_group28002.003.000.001.000.001.000.000.001.00
select_group_when_MANY_tables10,0001.002.002.003.003.002.004.003.003.00
select_join1000.001.000.000.000.000.000.001.00
select_key_prefix_join1002.001.000.000.000.000.001.000.000.00
select_many_fields20005.006.002.002.002.002.003.002.002.00
select_range41022.0023.002.002.002.001.002.002.001.00
select_simple100,0003.005.005.005.004.003.003.005.002.00
select_simple_cache100,0003.004.004.004.004.002.003.004.003.00
select_simple_join5000.000.000.001.000.000.000.000.000.00
wisc_benchmark1141.001.001.001.001.001.001.001.001.00


I would like to dwell on this, but I asked above to share your conclusions in the comments, it would probably not be fair to finish without my own conclusions :)

And my conclusion is that the ZFS overhead is felt on the hardware reyd, and in my specific conditions I don’t want to switch to ZFS, and I’ll still try to take the pictures I need on UFS2. But I have somewhere in a servachek zagashniki without a raid and with several SATA disks, probably there will be the potential of ZFS.

Source: https://habr.com/ru/post/78895/


All Articles