> Seems like either dropping swap to a reasonable level, or pinning
> buildd-slave into ram would solve this.
I'm guessing you mean "dropping swap usage", and yes, that would be really
nice. OTOH, I don't see distro doing that, nor can we make it a requirement.
At best, it's a workaround (that's not realizable in the general case - some
of the swaphogs are simply linking oo.o/other-phat binaries, etc.)
> I favour the pinning initially so we can eliminate one theory at least.
See the capabilities(7) man page, CAP_IPC_LOCK, and the mlockall(2) manpage.
Obviously, we'd need to grant the buildd user CAP_IPC_LOCK at the same time
as we deploy the code change.
We probably don't want to do that on all architectures, and should have a way
to disable it trivially.