I have many MySQL write-only processes. They all go to the same MySQL master. I run them sequentially to get a baseline time. I basically chain together several mysql command-line clients, one-after-another. Later, I parallel fire up several mysql clients at the same time to get an experimental time. Why are the times the same?

More facts:

  1. Each client hits a separate schema. This eliminates the possibility of table or row locking contention between clients.
  2. I have tried this on Win32 XP with a couple of cores and 4GB RAM vs. RedHat 5.6 64-bit with 24 virtual cores and 32GB RAM. The baseline vs. experimental is the same on both.
  3. On the RedHat I've tried all TCP clients vs. all SOCKET clients. No difference probably because the server isn't under load.
  • 2
    Probably cause you're I/O bound. If you want higher throughput, try bundling several inserts inside a transaction, if you're using innodb.
    – nos
    Jul 14, 2012 at 1:38
  • What version of mysql are you using ??? Jul 16, 2012 at 15:34
  • What storage engine are you using , InnoDB, MyISAM, or a mixture both ??? Jul 16, 2012 at 15:35

2 Answers 2


Yes, I think you're IO bound and you haven't parallelized the harddrives involved in the writes. There are lots of things that go into insert performance. You can learn more here.

  • I pulled out some tricks to make the file reads for the processes to be as parallel as possible. This shaved the experimental time in half. Thanks! Jul 24, 2012 at 19:33

Not enough info.

What Engine?

Is the Query cache involved?

What are the values of key_buffer_size and innod_buffer_pool_size?

Is it I/O bound? Or CPU bound?

How much "time" are you talking about?

We effectively need to see the queries, then schema, the table sizes, etc, in order to explain what you are seeing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.