From owner-freebsd-threads@FreeBSD.ORG Sun May 23 13:11:48 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A64D316A4CE for ; Sun, 23 May 2004 13:11:48 -0700 (PDT) Received: from rms04.rommon.net (rms04.rommon.net [212.54.2.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0DAC43D2F for ; Sun, 23 May 2004 13:11:47 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (h91.vuokselantie10.fi [193.64.42.145]) by rms04.rommon.net (8.12.10/8.12.9) with ESMTP id i4NKAd3v028733; Sun, 23 May 2004 23:10:40 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <40B1053F.6080604@he.iki.fi> Date: Sun, 23 May 2004 23:10:39 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit cc: freebsd-threads@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 20:11:48 -0000 Julian Elischer wrote: >you might also lile to run a profiled app and a profiled kernel >and use gprof and kgmon to get results. > > > I think profiling the application would be more useful. Is there a counter for syscalls per process? I know there is a context switch counter. >There is obviously a bottleneck, but it's very hard to tell what it is.. >My guess is that the scheduler(s) are not doing a very good job. and the >fact that GIANT is not removed from the kernel yet says that generally >syscalls will be a bottleneck. > > > While watching the top output, I saw a "logjam" to appear from time to time where all processes/threads were waiting for Giant. However I donīt feel that causes the large impact, it might contribute 10-20% but it does not feel frequent enough to cause 50% difference. >ULE should be able to do a better job at scheduling with >multiple CPUs but it is a work in progress. If threads all hit a GIANT >based logjam, there is not a lot the scheduler can do about it.. > > > I find it hard to believe that the threading stuff would be seriously broken since we do large processing with libkse and donīt have issues with the performance. However Iīm observing about 50000 context switches but only 5000 syscalls a second. (I know itīs a different application but also for 1500 queries a second 70000 syscalls sounds excessive). Pete