I have a packet log database, which is almost never queried. It just needs to be fast on inserts. I'm using InnoDB because I'd like to maintain ACID compliance, since even losing a single packet could be damaging to our customers. In a performance tuning scenario, I send 1,000,000 packets to the server over multiple DB connections. But no matter what settings I use in my.cnf, I can't get the mysqld process to use more than 900% CPU on a system with 12 cores. (Nothing else is running on the box.)
I've set the following
innodb_file_per_table = 1
innodb_write_io_threads = 64
innodb_read_io_threads = 64
innodb_thread_concurrency = 0
If I use MyISAM, I can get all the packets written in about 6 seconds. But InnoDB takes about 25. Can I make MySQL use the rest of the system resources and insert faster?
Edit: Here's the schema for the table:
+-------+----------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------------------+------+-----+---------+-------+
| t | bigint(20) unsigned | YES | | NULL | |
| a | char(1) | YES | | NULL | |
| sa | int(10) unsigned | YES | | NULL | |
| sb | int(10) unsigned | YES | | NULL | |
| sc | int(10) unsigned | YES | | NULL | |
| sd | int(10) unsigned | YES | | NULL | |
| sp | smallint(5) unsigned | YES | | NULL | |
| da | int(10) unsigned | YES | | NULL | |
| db | int(10) unsigned | YES | | NULL | |
| dc | int(10) unsigned | YES | | NULL | |
| dd | int(10) unsigned | YES | | NULL | |
| dp | smallint(5) unsigned | YES | | NULL | |
+-------+----------------------+------+-----+---------+-------+
edit2: I've batched more inserts together so that a single query is near the maximum length (about 16,000,000 chars). The database now spikes to 1100% for two seconds, then goes down to 100% for the rest of the time. Total time is now 21 seconds, or about 16% faster than when I started.