2013-04-04 93 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來確認。