performance - difference between opened files and open files in mysql -


in below status have opened files count '95349'. value increasing rapidly.

mysql> show global status 'open_%';

open_files = 721

open_streams = 0

open_table_definitions = 706

open_tables = 741

opened_files = 95349

opened_table_definitions = 701

opened_tables = 2851

also see this.

mysql>show variables '%open%';

have_openssl = disabled

innodb_open_files = 300

open_files_limit = 8502

table_open_cache = 4096

and

max_connection = 300

is there relation open files , opened files. there performance issues because of increasing opened_files value. server of 8 gd ram , 500 gb hardisk processor: intel(r) xeon(r) cpu e3-1220 v2 @ 3.10ghz. dedicated mysql server.

here command

ulimit -n;

1024 count

the server hanging often. using online tools have optimised parameters already. need know else should optimized ? in case opened files count reduce? necessary opened files count should in limit. if how find appropriate limit server. if not clear please me asking more questions.

opened_files counter of how many times have opened table since last time restarted mysqld (see status variable uptime number of seconds since last restart).

open_files not counter; it's current number of open files.

if opened_files counter increasing rapidly, may able gain improvement performance increasing size of table_open_cache.

for tips on performance implications of variable (and cautions setting high), see:


re comments:

you misunderstand purpose of counter. increases. counts number of times particular operation has occurred since last restart of mysqld. in case, opening file table.

having high value in counter isn't problem. mean mysqld has been running many days or weeks without restart. have @ number compared uptime (that is, mysql status variable uptime, not linux uptime).

what more meaningful rate of increase of counter, how fast grow in given interval of time. indicate re-opening tables rapidly.

normally, mysql shouldn't have re-open tables, because retains open table handle each table. can have finite number of those. that's table_open_cache for. in case, mysql instance can "remember" has opened 4096 tables @ time. if need table opened, closes 1 of file descriptors , opens table requested.

so if have many thousands of tables (or partitions of tables) , access wide variety of them rapidly, see lot of turnover in table open cache. indicated counter opened_tables increasing rapidly.

therefore sizing table_open_cache higher means mysql can retain more open table handles, , possibly decrease rate of turnover.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -