[bf1942] 64bit linux BF2 performance stats

Andreas Fredriksson deplinenoise at gmail.com
Wed Jul 20 06:46:23 EDT 2005

On 7/20/05, James Gurney <james at globalmegacorp.org> wrote:
> Yep, that tallies with what I remember finding before. I just tried it
> and it appears to work. One question though.. and maybe an Andreas can
> answer this.. Is there any point setting it on the child threads?
> Setting it on the top level thread doesn't propagate down to the child
> threads. Since they appear to use relatively little cpu time, I'm
> assuming there's no point locking them down as well..

The other threads do very little work, except for the network I/O
thread which might appear to be blocking a lot but is really fetching
packets as fast as possible, it will usually wake up from select once
every timeslice and then go back to sleep again so most schedulers
aren't accurate enough to display the real walltime consumed.

I would recommend against setting the CPU affinity of all threads to
the same CPU as it could potentially worsen the network latency on an
SMP box. The only price you pay for CPU migration of a thread is some
added migration overhead in the kernel which amounts to very little
time compared to the 10ms (standard) timeslice of most kernels. IIRC
it amounts to little more than setting the LDT/GDT tables and
synchronizing the writeback caches.

Kinds of like disabling the air conditioner in a GT car to save one
horsepower :-)

// Andreas (the first)

And I hate redundancy, and having different functions for the same thing.
        - Linus Torvalds on linux-kernel

More information about the Bf1942 mailing list