fcntl spinlock in Linux?

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jan 30 00:32:47 MST 2013


On Tue, Jan 29, 2013 at 05:03:58PM -0500, J. Bruce Fields wrote:
> On Tue, Jan 29, 2013 at 10:51:33PM +0100, Volker Lendecke wrote:
> > On Tue, Jan 29, 2013 at 04:37:03PM -0500, J. Bruce Fields wrote:
> > > It's probably also easiest to fix.
> > 
> > Including deadlock detection? I guess this would have to
> > look at all locks held by a thread, possibly on different
> > inodes.
> 
> As a way of at least testing whether this is your problem, we could rip
> out the deadlock detection entirely.

Depending on the workload, this is partly Samba's problem.
Some real-world workloads imposed upon Samba make thousands
of smbds contend on a single lock.

In the past I had tried to throttle smbds by some ipc
mechanisms, but I could not find a scalable and at the same
time fast way to achieve this. One trick I have tried is to
use a pipe as a token bucket. Whenever an smbd wants to work
on a request, it has to read one byte from one central pipe.
When it's done, it writes that byte back for consumption by
others. This also created a thundering herd, all of the
thousands of blocking readers are woken up when one byte was
written. My creativity stopped there, I could not find
another way to slow down thousands of processes to be nicer
to the kernel.

With best regards,

Volker Lendecke

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

**********************************************************
visit us at CeBIT: March 5th - 9th 2013, hall 6, booth E15
all about SAMBA and verinice, firewalls, Linux and Windows
free tickets available via email here : cebit at sernet.com !
**********************************************************


More information about the samba-technical mailing list