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

Поділитися
Вставка
  • Опубліковано 20 лип 2024
  • 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

  • @VonderBoob
    @VonderBoob 6 років тому

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

  • @katineko6030
    @katineko6030 6 років тому +1

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

  • @Icedgarr
    @Icedgarr 8 років тому +2

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

  • @dube4real
    @dube4real 4 роки тому +1

    This is simply awesome. Please keep up the great work

  • @salehhoushangi
    @salehhoushangi 4 роки тому

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

  • @jeffherdzina6716
    @jeffherdzina6716 7 років тому +8

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

    • @Speedemy
      @Speedemy  7 років тому +11

      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. ua-cam.com/video/noFn2sgQiNw/v-deo.html
      2. ua-cam.com/video/INovio_FuTU/v-deo.html
      3. ua-cam.com/video/f6fiy_dVYxw/v-deo.html

    • @jeffherdzina6716
      @jeffherdzina6716 7 років тому

      Thanks !!

    • @Darival92
      @Darival92 7 років тому

      pin this comment

  • @edvinhe2603
    @edvinhe2603 6 років тому

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

  • @MrGramita
    @MrGramita 7 років тому

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

    • @Speedemy
      @Speedemy  7 років тому +1

      Thank you so much!

  • @devdeckardCain
    @devdeckardCain 7 років тому +2

    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?

  • @piyushjoshi5345
    @piyushjoshi5345 4 роки тому

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

  • @mrkamranumer
    @mrkamranumer 2 роки тому

    Very helpful and informative. Excellent video tutorial for MySQL DBAs

  • @ZiedALAYA
    @ZiedALAYA 6 років тому

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

  • @bhaskarjadapalli4137
    @bhaskarjadapalli4137 5 років тому +1

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

  • @Salman9blog
    @Salman9blog 7 років тому

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

  • @originaltasan
    @originaltasan 3 роки тому

    Incredibly solid information!

  • @seonwookim5391
    @seonwookim5391 2 роки тому

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

  • @frank007hk
    @frank007hk 6 років тому

    Luckily found this video. It helps me a lot.

  • @dawidpopiela2281
    @dawidpopiela2281 3 роки тому

    Great explained and great speaker! Kudos!

  • @prozacsf84
    @prozacsf84 7 років тому

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

    • @Speedemy
      @Speedemy  7 років тому

      I really appreciate your feedback.

  • @ernestoborges7064
    @ernestoborges7064 5 місяців тому

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

  • @yakuza131
    @yakuza131 7 років тому

    That was a great tutorial !

  • @lky-tech
    @lky-tech Рік тому

    I am looking this video since long time

  • @jonneyjunmu464
    @jonneyjunmu464 4 роки тому

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

  • @BryanChance
    @BryanChance Рік тому

    Priceless... Thank you

  • @marciomcm2736
    @marciomcm2736 2 роки тому +1

    Great video!
    Thank you!

  • @aliciabreucop7474
    @aliciabreucop7474 6 років тому

    Great tutorial very useful

  • @imsanjaya
    @imsanjaya 2 роки тому

    its simply excellent

  • @sathvichet6071
    @sathvichet6071 5 років тому

    This video is very helpful to me

  • @jenko2550
    @jenko2550 Рік тому

    Super clearly.thanks

  • @rvjaws3340
    @rvjaws3340 4 роки тому

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

  • @boseakash
    @boseakash 7 років тому +3

    Thank you sir. :)

  • @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

  • @itedusolution3907
    @itedusolution3907 2 роки тому

    Thanks Sir, worth to watch

  • @mic2199
    @mic2199 3 роки тому

    Thanks that was great :)

  • @soundisfunction
    @soundisfunction 3 роки тому

    Excellent

  • @vitalyRodero
    @vitalyRodero 4 роки тому

    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.

  • @shaileshchile329
    @shaileshchile329 8 років тому

    Its very useful.. Thank you Sir...

    • @Speedemy
      @Speedemy  8 років тому

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

  • @Limpuls
    @Limpuls 6 років тому

    Puikus video!

  • @ranvijaymehta
    @ranvijaymehta 4 роки тому

    Thank you so much

  • @mohammadazizulislamasif4558
    @mohammadazizulislamasif4558 6 років тому

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

  • @ashy77771012
    @ashy77771012 7 років тому

    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.

  • @edonur246
    @edonur246 6 років тому

    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

  • @tongyinwang215
    @tongyinwang215 4 роки тому

    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.

  • @osamaa.h.altameemi5592
    @osamaa.h.altameemi5592 5 років тому +9

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

  • @DevenSitapara
    @DevenSitapara 6 років тому

    Thanks, 👌

  • @abdmaster
    @abdmaster 7 років тому

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

    • @AurimasMikalauskasPlus
      @AurimasMikalauskasPlus 7 років тому +1

      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/

  • @arifinshamsul4427
    @arifinshamsul4427 5 років тому

    Please publish more videos :)

  • @AngryPacman111
    @AngryPacman111 3 роки тому

    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.

  • @kesogonzaga2671
    @kesogonzaga2671 3 роки тому

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

  • @zee-trekking-trails
    @zee-trekking-trails 3 роки тому

    your website is down. can you share alternative link.

  • @Gehrman-qz4ii
    @Gehrman-qz4ii Рік тому

    Is there Part 2 of this video?

  • @sqldbavijay9802
    @sqldbavijay9802 4 роки тому

    can you share your PPT slides
    please

  • @vitalyRodero
    @vitalyRodero 2 роки тому

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

  • @himalthapa3469
    @himalthapa3469 3 роки тому

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

  • @nickwuk1
    @nickwuk1 7 років тому

    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-yc6xj1jd5y 8 років тому

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

    • @Speedemy
      @Speedemy  8 років тому +1

      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
    @rogernevez5187 5 років тому

    where is part 2????

    • @Speedemy
      @Speedemy  5 років тому +1

      Consider this a part 2: ua-cam.com/video/noFn2sgQiNw/v-deo.html

  • @vitalyRodero
    @vitalyRodero 2 роки тому

    Hello? Guys.
    Anyone?