Mysql – Why are parallel writes in MySQL as slow as sequential writes

MySQLperformance

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.

Best Answer

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.