From owner-freebsd-current@FreeBSD.ORG Wed Dec 22 06:24:08 2004 Return-Path: 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 1E0E116A4CE; Wed, 22 Dec 2004 06:24:08 +0000 (GMT) Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD45843D3F; Wed, 22 Dec 2004 06:24:05 +0000 (GMT) (envelope-from jinmei@isl.rdc.toshiba.co.jp) Received: from ocean.jinmei.org (unknown [3ffe:501:100f:1048:b956:5497:3d80:eed6]) by shuttle.wide.toshiba.co.jp (Postfix) with ESMTP id 3E07115210; Wed, 22 Dec 2004 15:24:04 +0900 (JST) Date: Wed, 22 Dec 2004 15:24:21 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: Scott Long In-Reply-To: <41C8BD1C.9090507@freebsd.org> References: <41C8BD1C.9090507@freebsd.org> User-Agent: Wanderlust/2.10.1 (Watching The Wheels) Emacs/21.3 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII cc: current@freebsd.org Subject: Re: BIND9 performance issues with SMP X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 22 Dec 2004 06:24:08 -0000 >>>>> On Tue, 21 Dec 2004 17:17:32 -0700, >>>>> Scott Long said: >> 4. mutex contentions are VERY expensive (looks like much much more >> expensive than other OSes), while trying to get a lock without a >> contention is reasonably cheap. (Almost) whenever a user thread >> blocks due to a lock contention, it is suspended with a system >> call (kse_release), probably causing context switch. (I'm not >> really sure if the system call overhead is the main reason of the >> performance penalty though.) > This might be related to what I said above. Where you observing this > with process scope or system scope threads? Again, if scheduling > decisions are not cheap in the UTS then there really is no point to > SA/KSE. I observed this with system scope threads. Note that "BIND+" I showed in my previous message was modified so that it would specify PTHREAD_SCOPE_SYSTEM. Yet this version ran slower as we increased worker threads. >> 6. at least so far, the ULE scheduler doesn't help improve the >> performance (it even performs worse than the normal 4BSD >> scheduler). > With both types of threads? Yes. Here are some results that were not contained in my previous message: #of process system threads scope scope 1 3014 3090 2 3121 3179 3 2254 1922 4 1869 1405 (the tests were on FreeBSD 5.3 beta 7 w/ ULE + Xeon 700MHz x 4) One remarkable difference is that ULE *relatively* improved the results for process scope threads. However, the BIND server still slowed down with multiple threads. That's why I said "ULE doesn't help improve the performance". > Have you tried Jeff's recent fixes to ULE? I'm not sure. My experience with ULE was limited to the beta7 version of FreeBSD 5.3, and I just gave up using it at that stage, having seen everyone in this list said "ULE is broken, don't use it." If beta7 did not contain the fixes you mentioned, I didn't try them. JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp