Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.
share|improve this question

migrated from stackoverflow.com Jul 16 '12 at 2:42

This question came from our site for professional and enthusiast programmers.

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 '12 at 1:38
    
What version of mysql are you using ??? –  RolandoMySQLDBA Jul 16 '12 at 15:34
    
What storage engine are you using , InnoDB, MyISAM, or a mixture both ??? –  RolandoMySQLDBA Jul 16 '12 at 15:35

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
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! –  Toddius Zho Jul 24 '12 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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