简体   繁体   English

使用O_DIRECT改善MySQL性能

[英]Improve MySQL performance with O_DIRECT

I want to increase the performance of MySQL. 我想提高MySQL的性能。 So I have done the configuration level changes to MySQL. 因此,我已经完成了对MySQL的配置级别更改。 I used innodb_flush_method = O_DIRECT , but insert rate is not increasing much. 我使用了innodb_flush_method = O_DIRECT ,但是插入率没有增加太多。 Normally, insertion rate is 650 inserts/sec. 通常,插入速率为650插入/秒。 How do I know weather O_DIRECT is working properly. 我怎么知道天气O_DIRECT工作正常。

I am using Ubuntu 14.04.1 server and MySQL v5.6. 我正在使用Ubuntu 14.04.1服务器和MySQL v5.6。 CPU Memory and Disk I/O rates are normal (I use RAID, 16 GB RAM, 8 CPU cores) I use WSO2 CEP for insertion. CPU内存和磁盘I / O速率正常(我使用RAID,16 GB RAM,8个CPU内核),我使用WSO2 CEP进行插入。 I have implement that part and measured using MySQL workbench. 我已经实现了这一部分,并使用MySQL工作台进行了测量。 But I couldn't get much more performance though I increase the insertion rate through wSO2 CEP. 但是,尽管我通过wSO2 CEP提高了插入率,却无法获得更高的性能。

I have used following my.cnf. 我已经使用了my.cnf。

my.cnf my.cnf

[mysqld]
innodb_buffer_pool_size = 9G
query_cache_size = 128M
innodb_log_file_size = 1768M
innodb_flush_log_at_trx_commit = 0 
innodb_io_capacity = 1000
innodb_flush_method = O_DIRECT
max_heap_table_size = 536870912
innodb_lock_wait_timeout = 1
max_connections = 400
sort_buffer_size = 128M 
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
skip-host-cache
skip-name-resolve
event_scheduler=on

在这种情况下,如果您使用的是事件表,则较早的CEP / siddhi版本不会执行批量插入。.这可能是导致上述问题的原因。.在(最新的SNAPSHOT来源(Siddhi)中),我们已修复此问题。下一个版本的好数字。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM