From owner-freebsd-current@FreeBSD.ORG Sat May 6 14:20:53 2006 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FFEA16A401; Sat, 6 May 2006 14:20:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id A919E43D60; Sat, 6 May 2006 14:20:52 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5605246C36; Sat, 6 May 2006 10:20:52 -0400 (EDT) Date: Sat, 6 May 2006 15:20:52 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: current@FreeBSD.org In-Reply-To: <20060506150622.C17611@fledge.watson.org> Message-ID: <20060506152016.I17611@fledge.watson.org> References: <20060506150622.C17611@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: performance@FreeBSD.org Subject: Re: Fine-grained locking for POSIX local sockets (UNIX domain sockets) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 May 2006 14:20:53 -0000 On Sat, 6 May 2006, Robert Watson wrote: > Attached, please find a patch implementing more fine-grained locking for the > POSIX local socket subsystem (UNIX domain socket subsystem). In the current > implementation, we use a single global subsystem lock to protect all local > IPC over the PF_LOCAL socket type. This has low overhead, but can result in > significant contention, especially for workloads like MySQL which push a > great deal of data through UNIX domain sockets, and involve many parties. > The hope is that by improving granularity, we can reduce contention > sufficiently to overcome the added cost of increased locking overhead (a > side-effect of greater granularity). At a high level, here are the changes > made: FYI, you can download a copy unmangled by my and your mail systems at the following URL: http://www.watson.org/~robert/freebsd/netperf/20060506a-uds-fine-grain.diff Robert N M Watson