MySQL Performance Tuning: Part 1. Configuration (Covers MySQL 5.7)

I've prepared this mysql config file tuning tutorial for you - it has pretty much all you need to know about configuring MySQL for best performance.
On the agenda:
1. Essentials of MySQL Configuration
2. Differences between:
- MySQL versions (5.1, 5.5, 5.6, 5.7) and
- Distros (Community MySQL, Percona Server, MariaDB, WebScaleSQL)
3. 17 Key Settings for High Performance MySQL Server
And a bonus section: how to look at MySQL status variables.
Enjoy!
P.S. Some links from the video:
Article by Laurynas Biveinis about WebScaleSQL:
www.percona.com/blog/2014/05/...
My my.cnf template download: www.speedemy.com/17
On innodb_io_capacity: www.speedemy.com/17-key-mysql-...
More on MySQL handler counters: dev.mysql.com/doc/refman/5.7/e...
On using Threads_running: www.speedemy.com/mysql-trouble...
Cacti: www.cacti.net
Zabbix: www.zabbix.org
Percona Monitoring Plugins: www.percona.com/software/mysq...
Percona Toolkit: www.percona.com/software/mysq...
Innotop manual: innotop.googlecode.com/svn/htm...
Innotop source: github.com/innotop/innotop
If I forgot to include some link, please be kind and report that in the comments so I update this.

Пікірлер: 77

  • @katineko6030
    @katineko60306 жыл бұрын

    This was amazing!!! Thank you for your hard work and deep understanding!

  • @dube4real
    @dube4real4 жыл бұрын

    This is simply awesome. Please keep up the great work

  • @Icedgarr
    @Icedgarr8 жыл бұрын

    Thank you for your resources, they are great and you are a very good tutor!

  • @VonderBoob
    @VonderBoob6 жыл бұрын

    I've been looking for this for a long time. Answered my biggest questions that I've had for years.

  • @salehhoushangi
    @salehhoushangi4 жыл бұрын

    excellent video and all of things you need to optimize mysql database mentioned. thank you so much man.

  • @edvinhe2603
    @edvinhe26036 жыл бұрын

    Could've probably been the best MySQL tuning video here.

  • @MrGramita
    @MrGramita7 жыл бұрын

    definitely one of the most complete MySQL videos out there. Thank you Sir, really appreciated

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    Thank you so much!

  • @mrkamranumer
    @mrkamranumer2 жыл бұрын

    Very helpful and informative. Excellent video tutorial for MySQL DBAs

  • @devdeckardCain
    @devdeckardCain7 жыл бұрын

    This video was actually INCREDIBLY helpful! I couldn't thank you enough for sharing your knowledge!

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    Thanks, Deckard. I really appreciate it.

  • @vitalyRodero

    @vitalyRodero

    2 жыл бұрын

    Do you have the cnf.file by any chance?

  • @ZiedALAYA
    @ZiedALAYA6 жыл бұрын

    Very useful and clear. Thanks for this great video and ressources.

  • @jeffherdzina6716
    @jeffherdzina67167 жыл бұрын

    That was a great tutorial ! Hopefully, that part 2 will be out soon.

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    Hi, Jeff. Actually, slow query logging series (3 videos) serves as Part 2 of MySQL Performance Tuning, even though I should have stated it clearly: 1. kzread.info/dash/bejne/oKN60JSsl7TPfto.html 2. kzread.info/dash/bejne/e4Kj2Muoj6nbhLg.html 3. kzread.info/dash/bejne/mGqay9uYlLm_qNo.html

  • @jeffherdzina6716

    @jeffherdzina6716

    7 жыл бұрын

    Thanks !!

  • @Darival92

    @Darival92

    7 жыл бұрын

    pin this comment

  • @bhaskarjadapalli4137
    @bhaskarjadapalli41375 жыл бұрын

    really awesome...great explanation and very useful, thanks for uploading

  • @piyushjoshi5345
    @piyushjoshi53454 жыл бұрын

    superb , nailed it!! hope I'll find more videos from speedemy

  • @originaltasan
    @originaltasan3 жыл бұрын

    Incredibly solid information!

  • @prozacsf84
    @prozacsf847 жыл бұрын

    thank you friend. better than most of the resources - more clear, informative, true.

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    I really appreciate your feedback.

  • @seonwookim5391
    @seonwookim53912 жыл бұрын

    one of the greatest videos I've ever seen !!!

  • @Salman9blog
    @Salman9blog7 жыл бұрын

    It was really awesome... waiting for the next Tutorials

  • @dawidpopiela2281
    @dawidpopiela22813 жыл бұрын

    Great explained and great speaker! Kudos!

  • @frank007hk
    @frank007hk6 жыл бұрын

    Luckily found this video. It helps me a lot.

  • @imsanjaya
    @imsanjaya2 жыл бұрын

    its simply excellent

  • @BryanChance
    @BryanChance Жыл бұрын

    Priceless... Thank you

  • @lky-tech
    @lky-tech Жыл бұрын

    I am looking this video since long time

  • @ernestoborges7064
    @ernestoborges70645 ай бұрын

    Gracias!!, Excelente Video, solo con la primer variable, la respuesta del servidor cambió notablemente.

  • @yakuza131
    @yakuza1317 жыл бұрын

    That was a great tutorial !

  • @marciomcm2736
    @marciomcm27362 жыл бұрын

    Great video! Thank you!

  • @jonneyjunmu464
    @jonneyjunmu4644 жыл бұрын

    helpful and can get many handy things which is not included in the official ref .

  • @jenko2550
    @jenko2550 Жыл бұрын

    Super clearly.thanks

  • @aliciabreucop7474
    @aliciabreucop74746 жыл бұрын

    Great tutorial very useful

  • @sathvichet6071
    @sathvichet60715 жыл бұрын

    This video is very helpful to me

  • @itedusolution3907
    @itedusolution39072 жыл бұрын

    Thanks Sir, worth to watch

  • @rvjaws3340
    @rvjaws33404 жыл бұрын

    Very Nice infromation .. Thank you So much Sir ..

  • @boseakash
    @boseakash7 жыл бұрын

    Thank you sir. :)

  • @shaileshchile329
    @shaileshchile3298 жыл бұрын

    Its very useful.. Thank you Sir...

  • @Speedemy

    @Speedemy

    8 жыл бұрын

    Thank you, Shailesh! I'm really happy about it.

  • @lky-tech
    @lky-tech Жыл бұрын

    seems the author of this video is very busy or changed the line. Thank you so much for this highly knowledgeable video ever on MySQL

  • @soundisfunction
    @soundisfunction3 жыл бұрын

    Excellent

  • @mic2199
    @mic21993 жыл бұрын

    Thanks that was great :)

  • @vitalyRodero
    @vitalyRodero4 жыл бұрын

    Thank you much for sharing your knowledged. I find it very valuable content. Please let me ask. Minute 43.52 shows commands pager grep seq and show engine innodb status\G select sleep (60); the results on my end are not the same. Can you explain are they both sepparate commands or are all in one line.

  • @ranvijaymehta
    @ranvijaymehta4 жыл бұрын

    Thank you so much

  • @Limpuls
    @Limpuls6 жыл бұрын

    Puikus video!

  • @mohammadazizulislamasif4558
    @mohammadazizulislamasif45586 жыл бұрын

    Everyone is highly appreciating this video. I don't even know what is said there! 😞

  • @edonur246
    @edonur2466 жыл бұрын

    So glad that I found this video, thanks for sharing BTW, I've downloaded the ebook and seems that it is got encrypted or something else when I open it. What should I do to fix this ?

  • @edonur246

    @edonur246

    6 жыл бұрын

    Sorry, my bad. I can read the ebook now. Thanks

  • @ashy77771012
    @ashy777710127 жыл бұрын

    Great Video!! There are few other settings which we are tweaking on the server like sort_buffer_size, max_heap_table_size, max_connections. Are they not important? We changed them on recommendation by mysql tuner script.

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    Hi, Ashish. Thanks! All settings are important, it's just that some are importanter than others ;) Re the ones you mentioned: - sort_buffer_size - only increase per query (you can test it with specific query and you'll see if it helps) - max_heap_table_size (and tmp_table_size) - would be fairly high on the list too. watch Created_tmp_disk_tables status variable to understand if it could help to increase it, but note that sometimes tmp tables are created on disk becasuse tmp tables don't support dynamic columns (text/blob) - max_connections - not really related to performance. mysql can have high number of idle connections at virtually no cost (tens of thousands). but if you need to change it, definitely do that. Hope that helps.

  • @DevenSitapara
    @DevenSitapara6 жыл бұрын

    Thanks, 👌

  • @tongyinwang215
    @tongyinwang2154 жыл бұрын

    innodb_buffer_pool_size really give a big difference if configure properly. My program keep having timeout issues when not set correctly. When I changed from default 80MB to 2GB, the program never have SQL timeout issue.

  • @arifinshamsul4427
    @arifinshamsul44275 жыл бұрын

    Please publish more videos :)

  • @abdmaster
    @abdmaster7 жыл бұрын

    Hey nice tutorial. Great help. I recently saw mysql 8.0 is available. Whats your recommendation on using that?

  • @AurimasMikalauskasPlus

    @AurimasMikalauskasPlus

    7 жыл бұрын

    MySQL 8.0 will be a great release. It's not GA yet. Here's a few things I'm personally looking forward to (but there will be more, I'm sure) - www.speedemy.com/new-in-mysql-8-0-dr/

  • @kesogonzaga2671
    @kesogonzaga26713 жыл бұрын

    Hi, can the same config be used for mysql 8 ?

  • @Gehrman-qz4ii
    @Gehrman-qz4ii Жыл бұрын

    Is there Part 2 of this video?

  • @osamaa.h.altameemi5592
    @osamaa.h.altameemi55925 жыл бұрын

    fantastic, can you do a similar video for mysql8 :)

  • @zee-trekking-trails
    @zee-trekking-trails3 жыл бұрын

    your website is down. can you share alternative link.

  • @sqldbavijay9802
    @sqldbavijay98024 жыл бұрын

    can you share your PPT slides please

  • @himalthapa3469
    @himalthapa34693 жыл бұрын

    Great Content. Thank you. But the links are not working.

  • @AngryPacman111
    @AngryPacman1113 жыл бұрын

    I read at Percona's blog high innodb_io_capacity values can be bad for SSD. Also Letsencrypt server on 24 M.2 enterprise SSD still has innodb_io_capacity set to like 1000 to avoid frequent flushing. They say SSD will wear much faster with values set to 50-75% of actual IOPS. So maybe we should be careful using high innodb_io_capacity without good reason.

  • @vitalyRodero
    @vitalyRodero2 жыл бұрын

    Guys, Anyone have the my.cnf files. It seems the website is no longer active. Please, share the file with me.

  • @nickwuk1
    @nickwuk17 жыл бұрын

    Should it be query_cache_type =OFF or query_cache_type=0

  • @Speedemy

    @Speedemy

    7 жыл бұрын

    Whichever you prefer. Both map to the same constant internally.

  • @user-yc6xj1jd5y
    @user-yc6xj1jd5y8 жыл бұрын

    i like the ppt in this video,can u share it ?

  • @Speedemy

    @Speedemy

    8 жыл бұрын

    Sure, it's available here: www.slideshare.net/inner/mysql-performance-tuning-part-1-mysql-configuration-includes-mysql-57

  • @user-yc6xj1jd5y

    @user-yc6xj1jd5y

    8 жыл бұрын

    thank you!!!!!!!

  • @rogernevez5187
    @rogernevez51875 жыл бұрын

    where is part 2????

  • @Speedemy

    @Speedemy

    5 жыл бұрын

    Consider this a part 2: kzread.info/dash/bejne/oKN60JSsl7TPfto.html

  • @vitalyRodero
    @vitalyRodero2 жыл бұрын

    Hello? Guys. Anyone?