Fine-grained locking for POSIX local sockets (UNIX domain sockets)

Robert Watson rwatson at
Sat May 6 20:50:36 UTC 2006

On Sat, 6 May 2006, Attila Nagy wrote:

> On 2006. 05. 06. 16:16, Robert Watson wrote:
>> In local measurements, I have observed a 0% change in MySQL performance on 
>> uniprocessor systems, and on a dual-processor system I have observed a 
>> 4%-5% performance improvement with two client MySQL threads.
> Just a quick, nowhere correct test: 
> The machine is a quad core Xeon LV server, the client side is sysbench, 
> accessing mysql 4.1.8 on a socket. Heap table, simple test.

Which threading library is that with, btw?  If libpthread, could you run the 
same test with libthr, and vice versa?

I've noticed that libpthread has the interesting property that it greatly 
improves contention issues on certain locks when those locks are contended on 
within a process.  The reason is that it avoids having threads within the 
process compete with themselves.  The big locks threaded processes hit when 
contending with themselves are the file descriptor array lock and signal 
delivery related locks.

Robert N M Watson

More information about the freebsd-performance mailing list