2

I've configured my i7 64gb ssd server with centos7 with the following my.cnf

[mysqld]
key_buffer = 12M
max_allowed_packet = 16M
table_cache = 4096
table_open_cache = 4096
table_definition_cache = 4096
sort_buffer_size = 48M
read_buffer_size = 32M
read_rnd_buffer_size = 104M
myisam_sort_buffer_size = 100M
myisam_max_sort_file_size = 1024m
#myisam_max_extra_sort_file_size = 1024m
myisam_repair_threads = 1
thread_cache_size = 32
query_cache_type = 1
query_cache_size = 512M
query_cache_limit = 8M
max_connections=50
wait_timeout=60
tmp_table_size = 256M
max_heap_table_size = 64M
#innodb_io_capacity = 400
#innodb_read_io_threads = 8
#innodb_write_io_threads = 8
#innodb_buffer_pool_instances = 8
innodb_buffer_pool_size = 3G
innodb_additional_mem_pool_size = 24M

But when i run mysql_tuner.pl i still get

TABLE CACHE
Current table_open_cache = 482 tables
Current table_definition_cache = 4096 tables
You have a total of 1027 tables
You have 482 open tables.
Current table_cache hit rate is 15%
, while 100% of your table cache is in use
You should probably increase your table_cache

Of course i restarted my mariadb instance. but i have no clue. Search turned up empty as well.

Hope someone could help out Cheers.

Rick James
80.7k5 gold badges52 silver badges119 bronze badges
asked Mar 25, 2015 at 6:54
1
  • Do you see Opened_table incrementing as time passes? You could check with mysqladmin -r -i 5 extended-status | grep Opened. What is max number of file descriptors that mysqld user can opend? You could check with ulimit -a | grep files. Commented Mar 25, 2015 at 10:57

1 Answer 1

1

The operating system has a low limit. In Unix, see ulimit -n, and change it. Some versions have an unnecessarily low limit of 1024.

Most, but not all, things set by my.cnf (my.ini) stay set. table_open_cache is one that is changed based on the environment. Use SHOW VARIABLES to see the real values. Or SHOW VARIABLES LIKE 'table_open_cache' to see the one setting.

answered Mar 25, 2015 at 17:08

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.