Re: MySQL on an SMP system - exploiting it

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Fri, 26 May 2017 11:13:09 -0400
Message-ID: <og9gfh$9op$1_at_jstuckle.eternal-september.org>


On 5/26/2017 9:13 AM, bit-naughty_at_hotmail.com wrote:
> Guys... what I'm asking is, if I add in another chip, will it increase the performance of my server - it's a simple question really...? (MySQL and other things included, but naturally, in THIS group, it's MySQL I'm concerned about!). I mean, why else would someone purchase an SMP system?? Right?
>
> When MySQL goes to do a SELECT, can it TELL that the core it's trying to do it on is overloaded, and switch to a different core? - I guess that's the question I'm trying to ask.....
>

First of all, you need to understand how SMP systems work. There is no such thing as an "overloaded core". A core is either executing code or it is idle.

To (greatly) simplify how it works: when an interrupt comes in, the OS determines which is the next thread to be executed. The OS then looks for a free core. If there is one, the OS assigns the thread to that core. If not, the OS picks a core, interrupts the thread running and starts the new thread.

Any thread can be executing on any core at any time. It is not assigned a particular core; when it's ready to run it just gets whatever is available. The advantage to SMP systems is you can have multiple threads running simultaneously. It won't speed up the execution of a single thread, but does make more resources available so that thread may not wait for processor time as long.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Fri May 26 2017 - 17:13:09 CEST

Original text of this message