Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering MariaDB

You're reading from   Mastering MariaDB Debug, secure, and back up your data for optimum server performance with MariaDB

Arrow left icon
Product type Paperback
Published in Sep 2014
Publisher
ISBN-13 9781783981540
Length 384 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Federico Razzoli Federico Razzoli
Author Profile Icon Federico Razzoli
Federico Razzoli
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Understanding the Essentials of MariaDB FREE CHAPTER 2. Debugging 3. Optimizing Queries 4. Transactions and Locks 5. Users and Connections 6. Caches 7. InnoDB Compressed Tables 8. Backup and Disaster Recovery 9. Replication 10. Table Partitioning 11. Data Sharding 12. MariaDB Galera Cluster Index

MariaDB caches

MariaDB has several caches that can be adjusted using system variables and start-up options to adapt them to the specific workload. Usually, only a few caches should be regulated. By changing just a few options, the overall performances might greatly change. Other caches solve more specific problems.

The InnoDB buffer pool is usually the most important cache. It contains the data and keys of the InnoDB tables. On a dedicated server, usually the buffer pool should be at least 70 percent of the available RAM. Of course, this percentage is purely indicative: the optimal value depends on a wide variety of factors. The buffer pool has two sublists: the new list and the old list. It is possible to set the sublist sizes, as well as a minimum age the data pages must have before populating the new list. These settings determine how often a recent read data populates the new list, or remains in the old list until it is evicted. To improve concurrency, more instances of the buffer pool can be used. Different instances never contain the same data.

The change buffer, an area of the buffer pool, stores the data changes that are not yet flushed to disks. For write-intensive workloads, the percentage of the buffer pool occupied by the change buffer can be increased; for read-heavy workloads, the change buffer can be decreased or even disabled. It can also be configured to store only some types of changes, which is useful for some workloads.

MyISAM uses a buffer called key cache. It does not store data; it stores only indexes. More instances of the key cache can be created and individually configured.

Aria uses a cache called page cache that is similar to MyISAM's key cache. The Aria page cache is faster for data of a fixed length. Currently, Aria does not support multiple instances of this cache.

If MyISAM or Aria is mainly used, the key cache or the page cache should ideally be as large as your frequently accessed indexed data.

The table opens the cache and stores the handles for the physical table files. MyISAM and Aria use two files for each table (because indexes and data are stored separately). This cache reduces the file access overhead.

The host cache contains the association between the IP addresses and the hostnames of the clients that are connected to the server, and when the account is blocked.

You have been reading a chapter from
Mastering MariaDB
Published in: Sep 2014
Publisher:
ISBN-13: 9781783981540
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime