From owner-freebsd-threads@FreeBSD.ORG Sat Oct 11 17:28:37 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 AFE4C16A4B3; Sat, 11 Oct 2003 17:28:37 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13EC643F85; Sat, 11 Oct 2003 17:28:37 -0700 (PDT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h9C0SZFY069350; Sat, 11 Oct 2003 17:28:36 -0700 (PDT) (envelope-from davidxu@freebsd.org) Message-ID: <3F88A2BA.3070503@freebsd.org> Date: Sun, 12 Oct 2003 08:39:22 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031004 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Christopher M. Sedore" References: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> In-Reply-To: <32A8B2CB12BFC84D8D11D872C787AA9A515CD3@EXCHANGE.forest.maxwell.syr.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: odd problem(s) with libthr and libkse 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, 12 Oct 2003 00:28:37 -0000 Christopher M. Sedore wrote: >I have a multithreaded program that I've built to run under libc_r, libthr, and libkse. I use the libc_r build for debugging and the others for actual work (the program is disk/network io intensive and I want the disk io concurrency from thr or kse). > >Anyway, here is the issue I'm seeing. It may be the same or a related problem for both, or may not be. > >When running under libthr, everything works fine for an indeterminate period, usually between 10 seconds and 30 minutes. Eventually, all program function stops. If I watch in top, threads get stuck in "sigwai". First one, then a couple, then all. > >When running under kse, the program pauses periodically. I have one thread that prints out a heartbeat once per second, and prints debug info. I get pauses of up to 5 seconds between my heartbeat: > >8 per sec (40/5) - 3739 total, 6047 pce active >6 per sec (32/5) - 3722 total >timer 1065864344 >timer 1065864347 >timer 1065864348 >7 per sec (38/5) - 3777 total, 6034 pce active >7 per sec (39/5) - 3761 total >timer 1065864350 >timer 1065864351 >accepted on 14 >accepted on 15 >timer 1065864353 >4 per sec (20/5) - 3797 total, 6058 pce active >6 per sec (30/5) - 3791 total >timer 1065864354 >timer 1065864355 >timer 1065864357 > >(note skips from 1065864348 to 350, 351 to 353, 355 to 357) > >When the pauses occur, network traffic dips to nearly nothing: Overall program performance with libkse is about 25-50% of what it is under libthr (when working) or ~30-60% of libc_r. > >I have no problems when running under libc_r. Any suggestions to debug this? > >I'm running 5.1-CURRENT-20030917-JPSNAP. > > Can you tell me how many threads in your process ? Make sure you didn't hit the hard limits in kernel : #sysctl -a |grep kern.threads kern.threads.debug: 0 kern.threads.max_threads_per_proc: 150 kern.threads.max_groups_per_proc: 50 kern.threads.max_threads_hits: 0 kern.threads.virtual_cpu: 1 > >Thanks, > >-Chris > >_______________________________________________ >freebsd-threads@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-threads >To unsubscribe, send any mail to "freebsd-threads-unsubscribe@freebsd.org" > > >