# MariaDB Optimization for MySQL Users

MariaDB contains many new options and optimizations which, for\
compatibility or other reasons, are not enabled in the default install.\
Enabling them helps you gain extra performance from the same hardware\
when upgrading from MySQL to MariaDB. This article contains information\
on options and settings which you should enable, or at least look in\
to, when making the switch.

```
aria-pagecache-buffer-size=##
```

If you are using a log of on-disk temporary tables, increase the above to as much as you can afford. See [Aria Storage Engine](https://mariadb.com/docs/server/server-usage/storage-engines/aria/aria-storage-engine) for more details.

```
key-cache-segments=8
```

If you use/have a lot of MyISAM files, increase the above to 4 or 8. See [Segmented Key Cache](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/system-variables/segmented-key-cache) and [Segmented Key Cache Performance](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/system-variables/broken-reference) for more information.

```
thread-handling=pool-of-threads
```

Threadpool is a great way to increase performance in situations where queries are relatively short and the load is CPU bound (e.g. OLTP workloads). To enable it, add the above to your my.cnf file. See [Threadpool in 5.5](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/buffers-caches-and-threads/thread-pool/thread-pool-in-mariadb) for more information.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/system-variables/mariadb-optimization-for-mysql-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
