CpuAffinityMask

231 views
Skip to first unread message

Tim Crawford

unread,
Nov 5, 2021, 1:20:56 PM11/5/21
to firebird...@googlegroups.com
I remember looking into this some time ago,
and not finding what I thought was reliable information.

Can someone point me to a good documentation/resources
regarding the CpuAffinityMask, specifically for 2.5
but also > 2.5 if things have changed

Thanks

Karol Bieniaszewski

unread,
Nov 5, 2021, 2:59:09 PM11/5/21
to firebird...@googlegroups.com

This settings work nonly for superserver if i remember corectly.

If you leave it commented in config then Firebird will usee all available cores.

For FB3 it is ok, for FB2.5 FB should use max one CPU.

 

CpuAffinityMask as a name tell is simple bit mask. Numer of bits set to 1 then this core is used by FB.

 

Regards,

Karol Bieniaszewski

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/b373f5e6-b8a2-9fdc-c593-30d769edc8dd%40ckmHealthcare.com.

 

Tim Crawford

unread,
Nov 5, 2021, 6:26:35 PM11/5/21
to firebird...@googlegroups.com, Karol Bieniaszewski
Thanks for taking the time to reply, but I was looking for
a link to some documentation or something official.

For 2.5 Windows default is single CPU but it can be set, but
after reviewing my notes on this the last time I looked at it
I realized this is only of any value if you are running multiple
database on the server, a single database runs on one CPU only.

I prefer to use multiple FB instances for multiple production databases
anyway so I bring then down/up separately, and they run end up running
on separate CPUs anyway I think
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/4Hm8tb3cwCzlgB8k%40smtp.poczta.onet.pl.

--
Tim Crawford | ckmHEALTHCARE | Senior Consultant | Cell: 289-619-3032 | Support: 1.800.279.8926

"Affordable, Comprehensive, Easy To Use" 

Notice of Confidentiality:
The information transmitted is intended only for the person or entity to which it is addressed, and may contain confidential and/or privileged material.
Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. If you received this in error, please contact the sender immediately by return electronic transmission,
and then immediately delete this transmission including all attachments without copying distributing or disclosing same.

Avis de confidentialité:
L’information transmise est strictement réservée à la personne ou à l’organisme auquel elle est adressée et peut être de nature confidentielle.
Toute lecture retransmission divulgation ou autre utilisation de cette information ou toute action prise sur la foi de cette information par des
personnes ou organismes autres que son destinataire est interdite.  Si vous avez reçu cette information par erreur veuillez contacter son
expéditeur immédiatement par retour du courrier électronique puis supprimer cette information y compris toutes pièces jointes sans en
avoir copié divulgué ou diffusé le contenu.


Mark Rotteveel

unread,
Nov 10, 2021, 5:33:06 AM11/10/21
to firebird...@googlegroups.com
On 05-11-2021 23:26, Tim Crawford wrote:
> Thanks for taking the time to reply, but I was looking for
> a link to some documentation or something official.

Most of the documentation is in the (default) firebird.conf itself.

> For 2.5 Windows default is single CPU but it can be set, but
> after reviewing my notes on this the last time I looked at it
> I realized this is only of any value if you are running multiple
> database on the server, a single database runs on one CPU only.
>
> I prefer to use multiple FB instances for multiple production databases
> anyway so I bring then down/up separately, and they run end up running
> on separate CPUs anyway I think

Not if they all have the same CpuAffinityMask. In any case, if you want
to bring individual databases down, you can also do that with a single
engine, by shutting down the database and bring it back online (e.g.
using gfix).

In any case, for Firebird 2.5, it is actually more complicated than what
Karol described, see the Firebird 2.5 release notes, section New
Threading Architecture[1]

"""
In a multiple database environment, Superserver threads for each
database are allotted evenly to available processors.

Note

The default CpuAffinity setting still binds SuperServer to a single
processor only. In order to take advantage of this improvement when
working with multiple databases, this setting should be changed in
firebird.conf.
"""

In other words, for the SuperServer model, each database has a thread,
and the threads are scheduled on the processor cores specified in the
CpuAffinityMask setting.

In Firebird 2.5, the default setting schedules on the first core, in
Firebird 3.0, the default setting schedules on all cores.

[1]:
https://www.firebirdsql.org/file/documentation/release_notes/html/en/2_5/rnfb25-engine.html#rnfb25-engine-threading

--
Mark Rotteveel
Reply all
Reply to author
Forward
0 new messages