When using storm to process logs, I often encounter the efficiency problem of concurrent insert MySQL, check some information on the Internet, do some notes
Change the table's engine to MyISAM,
Modify MY.CNF Concurrent_insert=2,concurrent_insert can be set to a value of 0 1 2, 2 is fully supported concurrent insert
1) Concurrent _insert =0, regardless of whether the MyISAM table data file exists because of the deletion and left the Russian free space, do not allow concurrent insert.
2 Concurrent_insert = 1 is the concurrent insert from the end of the file when there is no free space in the middle of the MyISAM Storage engine table data file.
3) Concurrent_insert = 2 allows concurrent inserts to be made at the end of the data file, regardless of whether the middle portion of the MyISAM Storage engine's table data file has free space left for deletion.
Restart MySQL:/etc/init.d/mysqld restart
When inserting data, it can also be set to insert delayed: Insert delayed into ' tablename ' ...