From owner-freebsd-current@FreeBSD.ORG Sat Jun 3 15:10:24 2006 Return-Path: X-Original-To: freebsd-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 E6CB616A479; Sat, 3 Jun 2006 15:10:24 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D58C43D48; Sat, 3 Jun 2006 15:10:24 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 3FF9A1A3C1F; Sat, 3 Jun 2006 08:10:24 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 9C0965134C; Sat, 3 Jun 2006 11:10:23 -0400 (EDT) Date: Sat, 3 Jun 2006 11:10:23 -0400 From: Kris Kennaway To: Sven Petai Message-ID: <20060603151023.GA341@xor.obsecurity.org> References: <20060506150622.C17611@fledge.watson.org> <20060507230430.GA6872@xor.obsecurity.org> <20060508065207.GA20386@xor.obsecurity.org> <200605142221.46093.hadara@bsd.ee> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <200605142221.46093.hadara@bsd.ee> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org, Robert Watson , Kris Kennaway 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, 03 Jun 2006 15:10:25 -0000 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 14, 2006 at 10:21:45PM +0300, Sven Petai wrote: > > int > > chgsbsize(uip, hiwat, to, max) > > struct uidinfo *uip; > > u_int *hiwat; > > u_int to; > > rlim_t max; > > { > > rlim_t new; > > > > UIDINFO_LOCK(uip); > > > > So the next question is how can that be optimized? > > > > Kris >=20 > hi >=20 > on the 8 core machine this lock was the top contended one with rwatsons p= atch,=20 > with over 8 million failed acquire attempts. > Originally the unp lock had only ~3 million of those, so this explains th= e=20 > sharp drop with larger number of threads I suppose. >=20 > I feel like I'm missing some very obvious reason, but wouldn't the simple= st=20 > workaround be just to return 1 right away if limit is set to infinity, wh= ich=20 > is almost always the case since it's the default, and document on the=20 > login.conf manpage that you might take performance hit with this type of= =20 > workloads when you set sbsize limits. I tried removing the locking here but did not see a performance change, so I concluded that it's not actually a bottleneck. FYI, I have been working on the locking profiling tools quite a bit lately, and also have started profiling on a 32-thread sun4v system. I hope to have the patches ready to send out soon (they fix a serious design error in mutex profiling that makes some of the profiling stats meaningless, substantially fix performance (20%-25% cost at the moment instead of >80%), and I also have an implementation of spinlock profiling using ktr that seems to be extremely cheap). All of my other large MP systems are offline though, so the only machines I have for profiling right now are a dual p4 xeon and Kip Macy's 32-way T1 :-) > I wonder if I should set up automatic&periodic performance testing > system, that would run all the tests for example once a week, with > latest current and stable, so that it would be easier for developers > to see how changes affect different workloads. >=20 > If you guys think it would be worthwile, what would be the bechmarks > you would like to see in addition to mysql+supersmack ? This kind of thing might be a bit tricky to set up, but it would be well worth it! Kris --PEIAKu/WMn1b1Hv9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEgaZfWry0BWjoQKURAhvHAKDwtO2+rnyrUjk+AMCvwVb6BXaf3wCgtE4F XuLbXHe2C0ie+Z7QW8larcU= =iqLk -----END PGP SIGNATURE----- --PEIAKu/WMn1b1Hv9--