From owner-freebsd-threads@FreeBSD.ORG Sun Nov 30 06:10:12 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 8397116A4CE; Sun, 30 Nov 2003 06:10:12 -0800 (PST) Received: from maxwell.syr.edu (maxwell.syr.edu [128.230.129.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47A7543F85; Sun, 30 Nov 2003 06:10:11 -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 hAUEA9o2000703; Sun, 30 Nov 2003 09:10:09 -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:10:10 -0500 Message-ID: <32A8B2CB12BFC84D8D11D872C787AA9A515DB1@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: AcO3CEv0fETnxaVfRteW3OuPklomtAAQlGfI From: "Christopher M. Sedore" To: 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:10:12 -0000 =20 ________________________________ From: Daniel Eischen [mailto:eischen@vigrid.com] On Sat, 29 Nov 2003, Christopher M. Sedore wrote: [...] >> 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 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. > >Define what you think is degradation. Process scope threads run in the >same KSEG. They are all kept in the same priority-based run-queue. >If you have other threads that have equal or higher priority than >the network threads in question, they will/may run before those >threads. All it takes is one thread that doesn't block (CPU-bound) >to eat away at the time allotment for your other threads. > >If a remote host is down and a thread can't connect to it, that thread >should block allowing other threads to run. Are you using blocking >or non-blocking connects? I'm using blocking connects. Degradation is I should be moving = ~5-7MB/sec (and I do if I don't try to connect to any hosts that are = down). Once I do, I see fluctuations from ~15-20KB/sec (note: KB) to = 3-5MB/sec, somewhat associated with when the connects happen. Running = libthr, I move 6-7MB/sec consistently (until everything hangs up showing = sigwait as the status in top, anyway). System scope threads turn in = numbers from 5-6MB/sec. (Note I don't have any hang problems under KSE, = only libthr.) =20 On Monday I'm going to try David Xu's suggestion of trying v1.18 of = thr_spinlock.c to see if that helps. -Chris