From owner-freebsd-threads@FreeBSD.ORG Sun Nov 30 06:43:09 2003 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 6110316A4CE for ; Sun, 30 Nov 2003 06:43:09 -0800 (PST) Received: from maxwell.syr.edu (maxwell.syr.edu [128.230.129.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 272ED43FDF for ; Sun, 30 Nov 2003 06:43:08 -0800 (PST) (envelope-from cmsedore@maxwell.syr.edu) Received: from exchange.maxwell.syr.edu (excluster2.maxwell.syr.edu [128.230.129.231]) by maxwell.syr.edu (8.12.10/8.9.1) with ESMTP id hAUEh5o2001966; Sun, 30 Nov 2003 09:43:05 -0500 (EST) X-MIMEOLE: Produced By Microsoft Exchange V6.5.6944.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Sun, 30 Nov 2003 09:43:05 -0500 Message-ID: <32A8B2CB12BFC84D8D11D872C787AA9A02B1F78F@EXCHANGE.forest.maxwell.syr.edu> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: KSE system scope vs non system scope threads Thread-Index: AcO3Aqh0vQV4KxbwSEGxXvEbfrq+WAASxhyj From: "Christopher M. Sedore" To: "Jeff Roberson" cc: threads@freebsd.org Subject: RE: KSE system scope vs non system scope threads 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, 30 Nov 2003 14:43:09 -0000 From: Jeff Roberson [mailto:jroberson@chesapeake.net] >> I ask this because I'm observing some behavior that I don't expect. = >> When running a threaded program with KSE and non-system-scope=20 >> threads, I see performance degradation in my network traffic when I'm >> attempting to connect to remote hosts that are down. Libthr doesn't >> see this degradation, and KSE with system-scope threads doesn't >> perform as well as libthr, but is much closer. > >Can you describe the threaded application some? For certain types of >tasks thr is likely to remain faster due to its simplicity. I'm mostly >just curious to hear what your observations are. Sure--I'm working on Usenet news transit software. Basically, inbound = connections offering articles to the host and outbound connections = offering the articles to other hosts. Inbound data rates are usually in = the 6-10MB/sec range (much higher if you have a backlog of articles), = outbound rates depend on the number of peers you have. In testing thus = far, I've been pushing 30MB/sec with my current code. Thus far, libthr = is fastest based on external benchmarks. =20 =20 I think libthr may have a bug related to synchronization somewhere, = though. After some random period, threads hang in sigwait (according to = top). From what I've observed, everything is fine, then one thread = hangs, then shortly thereafter the rest do (actually not all the rest, = but any that content for mutexes do). Since I don't see these hangs = with KSE or libc_r, I've blindly assumed that the problem is with libthr = rather than my code. =20 -Chris