Book Image

MariaDB High Performance

By : Pierre Mavro
Book Image

MariaDB High Performance

By: Pierre Mavro

Overview of this book

Table of Contents (18 chapters)
MariaDB High Performance
About the Author
About the Reviewers

Performance tuning

The first thing you may have noticed is the slowness involved by the network in a sharding mode. This is absolutely normal, you can't expect to have the same speed compared to one local server if your requests are basic. So how to deal with those problems? Let's see how.

Spider parameters

Spider includes a large set of parameters by default. Like most of the engines, you can change the default parameters to speed up the query time.

The bgs mode

One of the most important settings is spider_bgs_mode. By default, it is disabled to optimize memory usage. However, you can change its value if your Spider servers have enough RAM to support it. If you change the default value, you can perform a read query in parallel when the plan prunes multiple partitions.

To change it, you can do the following on the fly in your current session:

MariaDB [(none)]> set spider_bgs_mode=2;

Otherwise, you can activate it for your all your sessions in your MariaDB configuration file (/etc/mysql/my...