From owner-freebsd-performance@FreeBSD.ORG Sat Apr 8 09:44:41 2006 Return-Path: X-Original-To: freebsd-performance@freebsd.org Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 833F316A400 for ; Sat, 8 Apr 2006 09:44:41 +0000 (UTC) (envelope-from mv@roq.com) Received: from p4.roq.com (ns1.ecoms.com [207.44.130.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BA1D43D4C for ; Sat, 8 Apr 2006 09:44:40 +0000 (GMT) (envelope-from mv@roq.com) Received: from p4.roq.com (localhost.roq.com [127.0.0.1]) by p4.roq.com (Postfix) with ESMTP id ACDA14CD18; Sat, 8 Apr 2006 09:45:22 +0000 (GMT) Received: from [192.168.0.6] (ppp157-158.static.internode.on.net [150.101.157.158]) by p4.roq.com (Postfix) with ESMTP id 4ADC44CCCC; Sat, 8 Apr 2006 09:45:21 +0000 (GMT) Message-ID: <44378600.7010004@roq.com> Date: Sat, 08 Apr 2006 19:44:32 +1000 From: Michael Vince User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060213 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <200604041942.18767.hadara@bsd.ee> <021b01c658d2$de254a00$b3db87d4@multiplay.co.uk> <4434DB85.10104@roq.com> <200604081315.29842.yfxu@corp.netease.com> In-Reply-To: <200604081315.29842.yfxu@corp.netease.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Cc: Sven Petai , freebsd-performance@freebsd.org, Steven Hartland Subject: Re: mysql performance on 4 * dualcore opteron X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Apr 2006 09:44:41 -0000 David Xu wrote: >ÔÚ Thursday 06 April 2006 17:12£¬Michael Vince дµÀ£º > > > >>I have also done benchmarking with libthr against Apache using 'ab' and >>found it can deliver an extra amount of megabytes/sec of data (I think >>it was about an extra 2000/requests sec) at the cost of giving the >>server from what I remember almost double the 'average load' according >>to 'top' >>Given that if your machine has nothing else to do but deliver data >>purely from Apache then even libthr is more worth while for Apache as well. >> >>Mike >> >> > >libpthread default uses M:N threads which means a thread may be on >userland scheduler's run queue, and FreeBSD kernel does not know, >so it will be not shown on average load, default system tools are not >very useful here. > >David Xu > > Yeah I figured that, which isn't fair because it makes pthread look better then libthr when its not. I did notice that during the tests that when benchmarking Apache under libthr that when it was giving out the extra megabytes/sec speed that the server did feel equally responsive even though 'top' was reporting higher load. I have also tried putting my Perl under libthr for a single thread log analyzer and to my surprise it even could process logs faster. libthr is also really useful for actually paying attention to tops 'thr' column since it does show actual true thread number activity, under pthread it shows a couple and under libc_r I could have 1000 threads going but top just shows 1. Mike