📜 ⬆️ ⬇️

MySQL on HDD and SSD

Good day,% username%
I have long been interested in the question of how MySQL will behave, and indeed the server on SSD drives. Therefore, being a client of one of the VPS / VDS hosters, I decided to rent myself a 1 Gb SSD per server. And that's what happened.


Introduction


I’ll say right away that MySQL didn’t initially optimize anything and didn’t change the settings at all. Server of this configuration: CPU 960 MHz, RAM 512 Mb, HDD 16 Gb. OS: Debian 5.0. Immediately it is worth noting that these same SSD and HDD are not real, but a piece of a dedicated RAID1 SAN (Network Storage)

HDD


Reading speed:
Timing cached reads: 1168 MB in 2.04 seconds = 573.66 MB / sec
Timing buffered disk reads: 34 MB in 3.12 seconds = 10.91 MB / sec
')
Mysql test:
TestTimeAdditionally
alter-table:43 wallclock secs(0.01 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.04 CPU)
ATIS:10 wallclock secs(2.50 usr 0.12 sys + 0.00 cusr 0.00 csys = 2.62 CPU)
big-tables:10 wallclock secs(1.83 usr 0.20 sys + 0.00 cusr 0.00 csys = 2.03 CPU)
connect:147 wallclock secs(14.30 usr 6.94 sys + 0.00 cusr 0.00 csys = 21.24 CPU)
create:371 wallclock secs(0.43 usr 0.26 sys + 0.00 cusr 0.00 csys = 0.69 CPU)
insert:1288 wallclock secs(149.86 usr 23.97 sys + 0.00 cusr 0.00 csys = 173.83 CPU)
select:132 wallclock secs(14.06 usr 1.58 sys + 0.00 cusr 0.00 csys = 15.64 CPU)
transactions:Test skipped because the database doesn't support transactions
wisconsin:10 wallclock secs(1.20 usr 0.33 sys + 0.00 cusr 0.00 csys = 1.53 CPU)
secondsusrsyscputests
TOTALS2090.00181.3233.37214.693425950


SDD


Reading speed:
Timing cached reads: 1534 MB in 2.00 seconds = 766.98 MB / sec
Timing buffered disk reads: 268 MB in 3.00 seconds = 89.21 MB / sec

Mysql test:
alter-table:13 wallclock secs(0.04 usr 0.02 sys + 0.00 cusr 0.00 csys = 0.06 CPU)
ATIS:11 wallclock secs(2.54 usr 0.10 sys + 0.00 cusr 0.00 csys = 2.64 CPU)
big-tables:9 wallclock secs(1.80 usr 0.19 sys + 0.00 cusr 0.00 csys = 1.99 CPU)
connect:161 wallclock secs(14.70 usr 6.67 sys + 0.00 cusr 0.00 csys = 21.37 CPU)
create:190 wallclock secs(0.66 usr 0.30 sys + 0.00 cusr 0.00 csys = 0.96 CPU)
insert:1183 wallclock secs(149.18 usr 23.92 sys + 0.00 cusr 0.00 csys = 173.10 CPU)
select:125 wallclock secs(13.74 usr 1.57 sys + 0.00 cusr 0.00 csys = 15.31 CPU)
transactions:Test skipped because the database doesn't support transactions
wisconsin:9 wallclock secs(1.26 usr 0.31 sys + 0.00 cusr 0.00 csys = 1.57 CPU)
secondsusrsyscputests
TOTALS1760.00180.9833.03214.013425950


Conclusion


MySQL on HDD and SSD
Honestly I expected more performance gains. If there are experts on MySQL optimization (not on scripts that everyone recommends), then please tell me what else to do to make it even better.

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


All Articles