Help for this page

Select Code to Download


  1. or download this
    sub repl
    {
    ...
                          print "</tr>\n"
    }
    print "</tbody></table>\n";
    
  2. or download this
    #!/usr/bin/perl
    # Check the health of a mysql server.
    ...
    print "The hit rate should be as close to 100% as possible. You can ca
    +lculate your hit ratio by dividing the threads_created status variabl
    +e by the Connections status variable:100 - ((Threads_created / Connec
    +tions) * 100).If hitrate is very low like 1% then almost every mysql 
    +connection was causing a new thread to be created, and a lot of threa
    +ds were being created, thus creating a lot of unnecessary overhead.Th
    +e cause of the problem was that 'thread_cache_size' was set to 0. Thr
    +ead_cache_size determines how many threads MySQL will hold open in me
    +mory to handle new connections.To determine what you should set 'thre
    +ad_cache_size' to, pay close attention to the 'threads_created' statu
    +s variable. If it keeps going up it means your 'thread_cache_size' is
    + set too low. Just keep bumping up 'thread_cache_size' until 'threads
    +_created' no longer increments.\n";
    }