Subject Re[3]: [firebird-support] Firebird performance on Dual Core machine
Author Helen Borrie
At 06:06 AM 4/01/2006 +0700, you wrote:
>Hello Helen,
>On Monday, January 2, 2006, 7:02:57, You wrote:
> > At 06:44 AM 2/01/2006 +0700, you wrote:
> >>Hello Helen,
> >>
> >>On Monday, January 2, 2006, 5:53:18, You wrote:
> >>
> >> > Yes, it's true for the Superserver version, but not for Classic.
> >>
> >> > With SS you should keep the CPU affinity to one CPU. By default,
> the value
> >> > (a bitmask) is 1, which sets the affinity to CPU 0. Read the
> release notes
> >> > and the notes in Firebird.conf. The release notes provide the algorithm
> >> > for calculating the CPU affinity bitmask.
> >>
> >> > ./heLen
> >>
> >>If I set the affinity to CPU 0, will the performance to drop? Or it
> >>just make the performance is better than set the affinity to CPU more
> >>then 0?
> > No. As I already told you, the affinity is set by default to CPU 0. You
> > should not try to change it, unless for some reason you want to set it to
> > CPU 1 instead.
> > There should be no performance difference between CPU 0 and CPU 1.
> > Performance will die if you change the affinity mask to two CPUs.
> > ./heLen
>You told that the performance of firebird superserver version will be
>drop on SMP Machine (including dual core and hyperthreading).

YES - *if* you allow the Firebird server's CPU affinity to switch between
multiple CPUs. But NO if you keep (or re-set) the Firebird server's CPU
affinity to ONE SINGLE CPU.

>At the other side, you told that performance will die if I change the affinity
>mask to two CPUs.

Yes, that is correct. I think you have missed the point that the
CPUAffinityMask setting is a bitmask, i.e. the number 1 DOES NOT mean "one
CPU" and the number 2 DOES NOT mean "two CPUs".

>Is that meaning if I leave the default value
>(CPUAffinityMask = 1 or 2) the performance won't be drop?

The default CPUAffinityMask is not "= 1 or 2", it is 1. This mask sets the
CPU affinity of the Firebird server to CPU 0 alone.

>I'm already read the manual, but I can find the answer of my question above.

Read the Firebird 1.5 release notes. If you still don't understand how the
bitmask is calculated, simply leave the default setting as it is.