What defines small medium large and huge on a Virtualmin MySQL installation?

Background

When installing Virtualmin, the system will prompt for small, medium, large and huge. The question is how are these parameters defined? By examining the `feature-mysql.pl` file on the Virtualmin GPL GitHub repository we will see a Perl subroutine list_mysql_size_settings which shows the parameters used. The parameters differ if you’re using myisamchk or the older isamchk.

For example, here are some numbers for myisamchk systems (there are many more!):

  • Small
    • key_buffer_size = 16K
    • sort_buffer_size = 64K
    • read_buffer_size = 256K
    • read_rnd_buffer_size = 256K
    • myisam_sort_buffer_size = [intentionally left blank]
    • thread_cache_size = [intentionally left blank]
  • Medium
    • key_buffer_size = 16M
    • sort_buffer_size = 512K
    • read_buffer_size = 256K
    • read_rnd_buffer_size = 512K
    • myisam_sort_buffer_size = 8M
    • thread_cache_size = [intentionally left blank]
  • Large
    • key_buffer_size = 256M
    • sort_buffer_size = 1M
    • read_buffer_size = 1M
    • read_rnd_buffer_size = 4M
    • myisam_sort_buffer_size = 64M
    • thread_cache_size = 8
  • Huge
    • key_buffer_size = 384M
    • sort_buffer_size = 2M
    • read_buffer_size = 2M
    • read_rnd_buffer_size = 2M
    • myisam_sort_buffer_size = 64M
    • thread_cache_size = 8

The point of this article is that if you’re doing MySQL optimization, you need to take some parameters into consideration. This should be  a good starting point.

 

 

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top