MySQL Forums
Forum List  »  General

Re: Intra-Query Parallelism in MySQL Server
Posted by: Rick James
Date: March 03, 2011 08:16AM

No intra-statement parallelism. Alas.
It is a moderately tough task that is of little use if you have only one CPU. With multi-core boxes would be very useful. PARTITION, is already effectively doing a UNION across the partitions. But it does not do them in parallel. InfoBright, last I heard, also does not have parallelism; their engine could really benefit from parallism.

Do you want to step up to the plate and implement it?

On another side of the issue... Multiple connections mostly run in parallel, and take advantage of multiple cores. In a busy system, this is often more important than how fast a single query runs.

Before parallelism is implemented another inefficiency should be 'fixed'. Currently, there are a number of global "mutexes" that keep one thread from stumbling over another. The downside is that throughput suffers. Most notably:
* key_buffer -- thereby serializing access to MyISAM's INDEX cache
* query_cache -- thereby serializing part of SELECT for all Engines
* Various parts of InnoDB. Version 5.5 and Percona's Xtradb have done a lot to clean this up.

The Mutexes are necessary. In a single-core machine they are not a problem. In a multi-core system, they tend to be applied for too long or too inefficiently, thereby leaving cores idle when they could be doing something useful.

Because of the Mutexes, MySQL performance declines after 4-8 cores. Even with the InnoDB fixes, perf levels off or declines after 16-32 cores.

Options: ReplyQuote


Subject
Written By
Posted
Re: Intra-Query Parallelism in MySQL Server
March 03, 2011 08:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.