Aria page cache

Aria caches the index pages in a data structure called the page cache. It is very similar to the MyISAM key cache but has fewer features.

Note

All the ideas behind the page cache and the key cache will not be explained in this section, so the reader needs to read the previous section first.

This section explains the differences between the two data structures and how to use the page cache.

Similar to MyISAM, Aria indexes are organized in blocks. The size of the blocks is determined by the aria_block_size server variable. This variable affects both the index files and the page cache, because all blocks must have the same size. If this variable is changed, all Aria tables need to be recreated. The steps to change this value are as follows:

  1. Dump existing Aria tables (as explained in Chapter 8, Backup and Disaster Recovery).
  2. Stop the server.
  3. Set the new value in the configuration file.
  4. Restart the server.
  5. Drop or empty all Aria tables.
  6. Restore the dumped data.

The Aria page cache always has only one instance and cannot be segmented. All other MyISAM key cache features are supported in the Aria page cache and are configured using variables that have slightly different names.

The page cache size can be configured using the aria_pagecache_buffer_size variable. If no Aria tables are used, this value can be set to 0. However, remember that, by default, Aria is used for internal temporary tables (as in the --aria-used-for-temp-tables startup option).

The LRU mechanism can be configured using the aria_pagecache_division_limit and aria_pagecache_age_threshold variables that correspond to the MyISAM key_cache_division_limit and key_cache_age_threshold variables, respectively.

Since the Aria key cache does not support multiple instances or segmentation, there is no need to store usage statistics in a table such as KEY_CACHES (it would have only one row). Instead, statistics are stored in the status variables that are returned using the following query:

SHOW STATUS LIKE 'aria_page%';

The following table shows which variables are returned and which KEY_CACHES columns they match with. See the description of KEY_CACHES in the previous section that explain the meanings of these values.

Aria status variable

KEY_CACHES column

Aria_pagecache_blocks_not_flushed

DIRTY_BLOCKS

Aria_pagecache_blocks_unused

UNUSED_BLOCKS

Aria_pagecache_blocks_used

USED_BLOCKS

Aria_pagecache_read_requests

READ_REQUESTS

Aria_pagecache_reads

READS

Aria_pagecache_write_requests

WRITE_REQUESTS

Aria_pagecache_writes

WRITES

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.191.134