On 01/18/12 07:34, marius adrian popa wrote:
> On linux there is taskset to put the super server on the prefered cpu
> http://forums.devshed.com/firebird-sql-development-61/how-to-configure-cpu-affinity-on-superserver-linux-873311.html
>
> In theory we can unify the cpu affinity flags on Windows and Linux
>
> http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_setaffinity_np.3.html
> http://www.kernel.org/doc/man-pages/online/pages/man2/sched_setaffinity.2.html
>
> I don't know if is worth it implemented but it could be useful to let
> 4 cores from 8 to work on firebird and the rest to be left to the
> webserver for example

To make SS use 4 cores you have to wait for FB3. Or access 4 databases
at the same moment. :)

But getting serious - certainly it's possible to set affinity on linux,
but there is no sense in doing that. Windows make thread 'jump' from one
core to another too often, therefore cache is used not efficiently. As
far as I remember, setting affinity on windows sometimes results in
about 10% performance increase. If you watch the behavior of multi-core
linux machine you can see that active process sometimes also changes
active core, but this happens rarely - once per 5-10 seconds, and
therefore can't affect cache issues. I.e. main reason to prevent kernel
to plan job as it needs is missing.

It's very easy to add affinity settings in linux - but do you really
think that limiting database server to 4 cores and web server to another
4 makes sense? It's quite possible that at one moment one process will
need more resources, at another moment - another one. I.e. I do not see
how can setting affinity make system work better.



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to