How to decrease many opened files by MySQL in "lsof" command?

226 views Asked by At

There are large number of MySQL tables, it's more than thousands tables.

A few tables is accessed in short time, a large number of tables is accessed in long time. And it's shown many files opened a few hours ago in result of "lsof" command.

# lsof|grep mysql
mysqld    17986 18438 mysql  438uW  REG 259,1 147456  994052683 /var/lib/mysql/?????_db/wp_terms.ibd
...
# lsof|grep mysql|wc -l
85430 -> Many

It's not shown "Too many open files" error in MySQL.

Then I had changed the following MySQL parameters. However I can't decrease opened files in "lsof".

/etc/my.cnf

  • open_files_limit, table_open_cache, table_definition_cache, innodb_open_files

/usr/lib/systemd/system/mysqld.service

  • LimitNOFILE

Please tell me how to decrease many opened files by MySQL in "lsof" command? Or Should I ignore this result of "lsof" command?

Versions: MySQL - 8.0.21, lsof - 4.87

0

There are 0 answers