Book Image

Mastering MariaDB

By : Federico Razzoli
Book Image

Mastering MariaDB

By: Federico Razzoli

Overview of this book

Table of Contents (19 chapters)
Mastering MariaDB
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The table open cache


When a thread needs to access a table's physical file, a file descriptor is needed. To speed up the file access, MariaDB caches the file descriptors that are cached into the table open cache. This is even more useful if many MyISAM tables are contained in the same database. However, keep in mind that searching a file descriptor in this cache has a cost. If the cache cannot be big enough to contain all the needed descriptors, it could be better to disable it. A DBA may want to perform some tests to check whether table open cache is useful for a specific workload.

The table_open_cache server variable determines how many file descriptors are cached. This value should not exceed the maximum number of file descriptors allowed by the operating system, or the server may start to refuse new connections. On Unix systems, this number can be obtained with the following command:

ulimit -n

On other systems, if the ulimit command is not available, the system's documentation should be...