key_buffer_size

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • steve

    key_buffer_size

    As anyone benchmarked if there is an advantage in setting
    key_buffer_size in startup parameters. In a Linux environment, can
    we not rely on Linux to cache the indecis?

    I would prefer that, since then a large chunck of memory is not
    dedicated to the keys, and mysql+Linux can dynamically decide how to
    allocate memory.,

    --
    http://www.dbForumz.com/ This article was posted by author's request
    Articles individually checked for conformance to usenet standards
    Topic URL: http://www.dbForumz.com/mySQL-key_bu...ict165653.html
    Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=554992
  • Missaka Wijekoon

    #2
    Re: key_buffer_size

    That depends...

    Yes Linux can cache portions the file system (your index) in memory,
    however, MySQL will still have to make system calls to access those
    indices. While the time to access a "cached" file is lower, you incur
    the cost of system calls when the kernel has to mediate the reads on the
    index files.

    If MySQL has a larger key_buffer_size , then presumably it can access
    that same data in userspace and be even faster.

    As far as benchmarks are concerned, it really depends on the following
    parameters (in no particular order):
    1. How your data is indexed and queried.
    2. The speed of your file system.
    3. The layout of your file system - If the index and data files
    are on different disks and/or controllers then it is even
    better.
    4. The amount of memory you have.
    5. The speed and type of processor you have.

    -Misk


    steve wrote:[color=blue]
    > As anyone benchmarked if there is an advantage in setting
    > key_buffer_size in startup parameters. In a Linux environment, can
    > we not rely on Linux to cache the indecis?
    >
    > I would prefer that, since then a large chunck of memory is not
    > dedicated to the keys, and mysql+Linux can dynamically decide how to
    > allocate memory.,
    >[/color]

    Comment

    Working...