Subject | Re: [firebird-support] Re: Classic vs SS |
---|---|
Author | Ann W. Harrison |
Post date | 2009-12-02T17:39:24Z |
Mark Rotteveel wrote:
a single processor. Each query has a thread and each thread runs for
some period of time (quantum) and then yields the processor to another
waiting thread. This keeps a long complex select from hogging the
server until it completes. That's pretty reasonable technology for
the time it was created ... circa 1993. And it does keep shared objects
from being modified concurrently by different threads.
SS on a multi-processor system. The threads continue to run in series,
one after another, so there's only one active thread at any time. Moving
that thread (and everything associated with it) between processors just
makes the overall performance worse.
Best regards,
Ann
>That's true.
>
> The problem is AFAIK that the code of Firebird is not fully SMP
> capable
>The threading in SuperServer was designed to avoid query starvation on
> (probably missing synchronisation and other thread safety features etc).
a single processor. Each query has a thread and each thread runs for
some period of time (quantum) and then yields the processor to another
waiting thread. This keeps a long complex select from hogging the
server until it completes. That's pretty reasonable technology for
the time it was created ... circa 1993. And it does keep shared objects
from being modified concurrently by different threads.
> In general threads in multi-threaded programs can, if scheduled onRight.
> different CPUs, have different views on shared objects (eg cache).
> This can happen if threads of one program run on different CPUs.Yes, that's a problem, but no, that's not what happens when you run
> These threads can share objects, but those objects could be in the
> local CPU cache or even in the registers of the CPU. Without
> synchronisation it is not guaranteed that threads on different
> CPUs have the same view/version of those objects. That could
> result in all kinds of 'fun' errors, data inconsistency, crashes etc.
SS on a multi-processor system. The threads continue to run in series,
one after another, so there's only one active thread at any time. Moving
that thread (and everything associated with it) between processors just
makes the overall performance worse.
Best regards,
Ann
>
>