Oracle 5.0 Reference Manual page 479

Table of Contents

Advertisement

The maximum permissible setting for
MySQL 5.0.52, values larger than 4GB are permitted for 64-bit platforms (except 64-bit Windows,
for which large values are truncated to 4GB with a warning). The effective maximum size might
be less, depending on your available physical RAM and per-process RAM limits imposed by your
operating system or hardware platform. The value of this variable indicates the amount of memory
requested. Internally, the server allocates as much memory as possible up to this amount, but the
actual allocation might be less.
You can increase the value to get better index handling for all reads and multiple writes; on a system
whose primary function is to run MySQL using the
total memory is an acceptable value for this variable. However, you should be aware that, if you
make the value too large (for example, more than 50% of the machine's total memory), your system
might start to page and become extremely slow. This is because MySQL relies on the operating
system to perform file system caching for data reads, so you must leave some room for the file
system cache. You should also consider the memory requirements of any other storage engines that
you may be using in addition to MyISAM.
For even more speed when writing many rows at the same time, use
Section 8.3.2.1, "Speed of
You can check the performance of the key buffer by issuing a
examining the
Key_read_requests
and
[529]
Key_writes
Key_reads/Key_read_requests
Key_write_requests
be much smaller if you tend to do updates that affect many rows at the same time or if you are using
the
DELAY_KEY_WRITE
The fraction of the key buffer in use can be determined using
conjunction with the
Key_blocks_unused
available from the
key_cache_block_size
1 - ((Key_blocks_unused * key_cache_block_size) / key_buffer_size)
This value is an approximation because some space in the key buffer is allocated internally for
administrative structures. Factors that influence the amount of overhead for these structures
include block size and pointer size. As block size increases, the percentage of the key buffer lost to
overhead tends to decrease. Larger blocks results in a smaller number of read operations (because
more keys are obtained per read), but conversely an increase in reads of keys that are not examined
(if not all keys in a block are relevant to a query).
It is possible to create multiple
individually, not as a group. See
key_cache_age_threshold
Command-Line Format
Option-File Format
Option Sets Variable
Variable Name
Variable Scope
Dynamic Variable
Server System Variables
key_buffer_size
Statements".
INSERT
[529],
Key_reads
status variables. (See
Section 13.7.5,
ratio should normally be less than 0.01. The
ratio is usually near 1 if you are using mostly updates and deletes, but might
table option.
[529]
[460]
key caches. The size limit of 4GB applies to each cache
MyISAM
Section 8.6.1, "The
[459]
--key_cache_age_threshold=#
key_cache_age_threshold
Yes,
key_cache_age_threshold
key_cache_age_threshold
Global
Yes
Permitted Values
Platform
32
Bit Size
459
[458]
is 4GB on 32-bit platforms. As of
storage engine, 25% of the machine's
MyISAM
LOCK
SHOW STATUS
[529],
Key_write_requests
"SHOW
Syntax".) The
key_buffer_size
status variable and the buffer block size, which is
system variable:
Key
Cache".
MyISAM
[459]
TABLES. See
statement and
[529],
Key_writes/
[458]
in

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents