From owner-freebsd-sparc64@FreeBSD.ORG Thu Jun 23 10:53:48 2011 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C78C11065670 for ; Thu, 23 Jun 2011 10:53:48 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3090F8FC17 for ; Thu, 23 Jun 2011 10:53:47 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p5NArhGJ038586; Thu, 23 Jun 2011 12:53:43 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p5NArhWi038585; Thu, 23 Jun 2011 12:53:43 +0200 (CEST) (envelope-from marius) Date: Thu, 23 Jun 2011 12:53:43 +0200 From: Marius Strobl To: Peter Jeremy Message-ID: <20110623105343.GA38525@alchemy.franken.de> References: <20110623053051.GL65891@pjdesk.au.alcatel-lucent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110623053051.GL65891@pjdesk.au.alcatel-lucent.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: SPARC64 context switching oddities X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 10:53:48 -0000 On Thu, Jun 23, 2011 at 03:30:51PM +1000, Peter Jeremy wrote: > I have a tool that measures the rate at which a single-byte token can > be passed between two processes via a socketpair and have been running > multiple copies of it on an otherwise idle V890 (16-CPU, 64GB RAM > running -current from about a week ago), capturing 'vmstat -s' output. > In the process, I have found several oddities: > > 1) The number of context switches doesn't match my expectations. > See http://i.imgur.com/TyU3j.jpg > It starts out unexpectedly high (~184k switches/sec) and then drops to > an unrealistically low value as the number of processes increases from > 1 to about 20 pairs. It then very slowly increases. Based on one > process writing a token to a second process requiring one context > switch, I would expect the number of context switches to roughly match > the green (based on token passing rate) or blue (based on syscall > rate) lines. > > 2) The transfer rate dips initially then rises to a peak before tailing off. > See http://i.imgur.com/zVcfu.jpg and http://i.imgur.com/DhMmV.jpg > The red line shows the rate reported by the program and the green line > shows the rate estimated from the syscall rate. I would expect a fairly > flat peak from 1 to about 16 pairs (since there are 16 execution threads > available) that then tailed off as scheduler overheads increased > > Can anyone offer an explanation for this behaviour? > I guess you're better off trying to find someone who knows about the schedulers on arch@. Marius