2013-04-04 45 views
0

如果我有table_open_cache=200000 and max_connections = 20000,我的Opened_files这么大是什么原因?Opened_files非常大

mysql> SHOW STATUS LIKE 'open%'; 
    +--------------------------+---------+ 
    | Variable_name   | Value | 
    +--------------------------+---------+ 
    | Open_files    | 618  | 
    | Open_streams    | 0  | 
    | Open_table_definitions | 668  | 
    | Open_tables    | 1003 | 
    | Opened_files    | 2721799 | 
    | Opened_table_definitions | 0  | 
    | Opened_tables   | 0  | 
    +--------------------------+---------+ 

cat /proc/sys/fs/file-max 
1048576 

limit.conf 
mysql soft nofile 40960 
mysql hard nofile 90240 

mysqld soft nofile 40960 
mysqld hard nofile 90240 

回答

0

如果我没有记错,Opened_files是一样的东西,因为最后的状态刷新创建的文件描述符的计数器。

这里,您当前打开的文件数是618.您可以使用lsof来确认。