Want to subscribe to topics you're interested in?
Become a Member

Nice article for faster restarts

Discussion in 'MariaDB & General MySQL news & discussions' started by pamamolf, Mar 12, 2019.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,310
    318
    83
    May 31, 2014
    Ratings:
    +589
    Local Time:
    9:02 AM
    Nginx-1.13.x
    MariaDB 10.1.x
    Hello

    As i already posted on the forums on my big forum with a db around 50gb i am not able to use the restart option as it takes so long and sometimes timeouts :(

    So i am using stop and then start and is not the best way but at least it works...

    I came across this article that may help:

    How To Speed Up MySQL Restart (hint: just like before, but this time for real) - Speedemy

    Maybe we can have at Centminmod the:

    Code:
    innodb_max_dirty_pages_pct = 0
    Is it a good idea or not?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,322
    8,930
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,753
    Local Time:
    4:02 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    That is a known proper method for faster restarts that I use as well. But you can't automatically set that permanently in /etc/my.cnf - doing so is bad for 24/7 so read up on what innodb_max_dirty_pages_pct does. It's a end user manually on the fly task you deploy and using your knowledge of mysql (outlined in that link above) to determine when it's most appropriate to do the restart by inspecting the mysql server statistics/counters in real time. There's ways to assist making it a bit easier with scripting somewhat if you know how - I like to script it to monitor and read percentage of dirty pages in realtime after setting in realtime innodb_max_dirty_pages_pct=0 etc. But still generally involves some human eyeballs on the process.

    Be careful improper stop/restarts of mysql can corrupt your mysql data !!!
     
    • Informative Informative x 1
..