[OpenAFS] Re: Low load on multi core fileserver

Andrew Deason adeason@sinenomine.net
Mon, 3 May 2010 22:35:55 -0500

On Mon, 3 May 2010 23:04:06 -0400
"Brandon S. Allbery KF8NH" <allbery@ece.cmu.edu> wrote:

> On May 3, 2010, at 09:09 , Frank Burkhardt wrote:
> > is the openafs-fileserver supposed to take advantage of multiple
> > cpu cores?

Yes, however, I think most of the cpu-intensive operations are only in
the RX layer (the network transport / RPC layer). And a lot of the RX
code is very serialized, AFAIR. So, you see a lot of usage on just one

It's one of the unfortunate shortcomings of the RX code. Is this
improved at all in 1.5-specific stuff? I don't remember.

> Last I heard, only the database servers were capable of true
> threaded operation (and that possibly only in 1.5); the fileserver
> still uses the old userspace "threads" library, so can't take
> advantage of real threads or multiple CPUs.

I think you have that a bit backwards. The fileserver almost always uses
pthreads, and has for at least as long as 1.4 has been around; I assume
much longer than that. We only do not use pthreads in the fileserver for
platforms where we know doing so causes problems. I don't think any
modern OpenAFS fileservers are in production that are not pthreaded.

The database servers still use the userspace threads library ('LWP') in
1.4, and we're working towards making them use pthreads in 1.5. Or
rather, they can already be compiled to use pthreads, but doing so
introduces a known race condition that will be fixed when gerrit 1546 or
something like it is merged.

Andrew Deason