mysql引數之innodb_buffer_pool_size大小設定
mysql> show global variables like 'innodb_buffer_pool_size';
+-------------------------+-----------+
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 134217728 |
+-------------------------+-----------+
1 row in set (0.00 sec)
那麼如何設定該引數大小呢?首先檢視執行時buffer pool相關資料指標:
mysql> show global status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 314 |
+-------------------------------+-------+
1 row in set (0.00 sec)
mysql> show global status like 'Innodb_buffer_pool_pages_total';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| Innodb_buffer_pool_pages_total | 8191 |
+--------------------------------+-------+
1 row in set (0.00 sec)
mysql> show global status like 'Innodb_page_size';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| Innodb_page_size | 16384 |
+------------------+-------+
1 row in set (0.00 sec)
上述三項指標的含義如下:
Innodb_buffer_pool_pages_data
The number of pages in the InnoDB buffer pool containing data. The number includes both dirty and
clean pages.
Innodb_buffer_pool_pages_total
The total size of the InnoDB buffer pool, in pages.
Innodb_page_size
InnoDB page size (default 16KB). Many values are counted in pages; the page size enables them to be
easily converted to bytes
計算Innodb_buffer_pool_pages_data/Innodb_buffer_pool_pages_total*100%
當結果 > 95% 則增加 innodb_buffer_pool_size, 建議使用實體記憶體的 75%
當結果 < 95% 則減少 innodb_buffer_pool_size,
| Variable_name | Value |
+-------------------------+-----------+
| innodb_buffer_pool_size | 134217728 |
+-------------------------+-----------+
1 row in set (0.00 sec)
那麼如何設定該引數大小呢?首先檢視執行時buffer pool相關資料指標:
mysql> show global status like 'Innodb_buffer_pool_pages_data';
+-------------------------------+-------+
| Variable_name | Value |
+-------------------------------+-------+
| Innodb_buffer_pool_pages_data | 314 |
+-------------------------------+-------+
1 row in set (0.00 sec)
mysql> show global status like 'Innodb_buffer_pool_pages_total';
+--------------------------------+-------+
| Variable_name | Value |
+--------------------------------+-------+
| Innodb_buffer_pool_pages_total | 8191 |
+--------------------------------+-------+
1 row in set (0.00 sec)
mysql> show global status like 'Innodb_page_size';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| Innodb_page_size | 16384 |
+------------------+-------+
1 row in set (0.00 sec)
上述三項指標的含義如下:
Innodb_buffer_pool_pages_data
The number of pages in the InnoDB buffer pool containing data. The number includes both dirty and
clean pages.
Innodb_buffer_pool_pages_total
The total size of the InnoDB buffer pool, in pages.
Innodb_page_size
InnoDB page size (default 16KB). Many values are counted in pages; the page size enables them to be
easily converted to bytes
計算Innodb_buffer_pool_pages_data/Innodb_buffer_pool_pages_total*100%
當結果 > 95% 則增加 innodb_buffer_pool_size, 建議使用實體記憶體的 75%
當結果 < 95% 則減少 innodb_buffer_pool_size,
建議設定大小為: Innodb_buffer_pool_pages_data* Innodb_page_size * 1.05 / (1024*1024*1024)
命令如:SET GLOBAL innodb_buffer_pool_size= 32423423:單位kb
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29654823/viewspace-2142449/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MySQL服務端innodb_buffer_pool_size配置引數MySql服務端
- 【引數】DB_nK_CACHE_SIZE引數設定與資料庫預設塊大小之間的限制資料庫
- MySQL innodb_buffer_pool_size 變數MySql變數
- Mysql 5.5 設定資料庫引數MySql資料庫
- Data Guard 學習之引數設定
- 初識oracle SGA之引數設定Oracle
- MySQL的配置檔案的引數設定MySql
- MySQL 關於表名大小寫的引數MySql
- MySQL不區分大小寫設定MySql
- mysql binlog_do_db引數設定的坑MySql
- 設定MYSQL不區分表大小寫MySql
- vsftpd設定引數FTP
- RAC 特定引數設定
- 兩個引數設定
- 【MySQL】MySQL 5.6 引數之 extra_portMySql
- Metasploit設定LHOST引數技巧
- Metasploit設定VERBOSE引數技巧
- pandas引數設定小技巧
- Metasploit設定HttpTrace引數技巧HTTP
- tomcat vm 引數設定Tomcat
- JVM常見引數設定JVM
- JVM引數設定大氣JVM
- SAP系統引數設定
- SAP 系統引數設定
- ORACLE JOB INTERVAL引數設定Oracle
- chrome啟動引數設定Chrome
- 設定NLS_LANG引數
- 幾個和MySQL InnoDB相關的引數設定說明MySql
- Swift語言中為外部引數設定預設值可變引數常量引數變數引數輸入輸出引數Swift變數
- Oracle CSS的引數設定 心跳時間設定OracleCSS
- 【SQL 效能優化】引數設定SQL優化
- SAP 系統引數設定(zt)
- DBReplicator設定setpath.bat引數BAT
- 6. MySQL Galera Cluster全解析 Part 6 Galera Cluster引數設定MySql
- javascript為函式設定預設引數JavaScript函式
- AIX7.1 VMO 引數預設設定AI
- Mysql 引數MySql
- MySQL表名不區分大小寫的設定方法MySql