Mustafa R
Mustafa R

Reputation: 103

Unable to change Percona tokdb variables running inside docker container

We are unable to change any tokudb variables for my percona server 5.7 running in official docker image. We mounted a physical my.cnf as the config file from the linux host and adding the following line causes the server fail to start.

[mysqld]
tokudb_cache_size=15G

We are getting "unknown variable 'tokudb_cache_size=15G'" from the docker logs. But we have successfully enabled tokudb engine and it's a valid server variable which is getting the default value, which is 50% of system memory.

mysql> show variables like 'tokudb_cache%';
+--------------------------------+-------------+
| Variable_name                  | Value       |
+--------------------------------+-------------+
| tokudb_cache_size              | 33724004352 |
| tokudb_cachetable_pool_threads | 0           |
+--------------------------------+-------------+
2 rows in set (0.01 sec)

We need to reduce that to 15G, instead of 32GB.

We have also tried to pass that particular system variables while running the docker image, but we got the same error. The docker command is given below (last line has the info)

docker run --name percona -p 10.100.201.10:3306:3306 \
--mount type=bind,src=/cdr/telcobright,dst=/telcobright \
--mount type=bind,src=/cdr/telcobright/mysql7/mysqld.cnf,dst=/etc/percona-server.conf.d/mysqld.cnf \
--mount type=bind,src=/cdr/telcobright/mysql7/mysql,dst=/cdr/mysql \
--mount type=bind,src=/cdr/telcobright/mysql7/mysqld.log,dst=/var/log/mysqld.log \
--mount type=bind,src=/cdr/telcobright/mysql7/mysql-slow.log,dst=/var/log/mysql-slow.log \
-e MYSQL_ROOT_PASSWORD='password' -e MYSQL_ROOT_HOST=% \
-e INIT_TOKUDB=yes -e INIT_ROCKSDB=no \
-d percona:ps-5.7 --tokudb_cache_size=15G

This is a very important config for production environment but we are kind of stuck as percona (mysqld) system variable cannot be changed.

Any help would be very much appreciated. Thanks.

Upvotes: 1

Views: 83

Answers (0)

Related Questions