From owner-freebsd-threads@FreeBSD.ORG Sun Apr 18 12:34:43 2004 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 BD1D316A4CE; Sun, 18 Apr 2004 12:34:43 -0700 (PDT) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E42F43D46; Sun, 18 Apr 2004 12:34:43 -0700 (PDT) (envelope-from ivoras@geri.cc.fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.107]) by geri.cc.fer.hr (8.12.9p2/8.12.8) with ESMTP id i3IJYK1m000764; Sun, 18 Apr 2004 21:34:21 +0200 (CEST) (envelope-from ivoras@geri.cc.fer.hr) Message-ID: <4082D84C.2010001@geri.cc.fer.hr> Date: Sun, 18 Apr 2004 21:34:36 +0200 From: Ivan Voras User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: In-Reply-To: X-Enigmail-Version: 0.83.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@FreeBSD.org cc: freebsd-threads@FreeBSD.org Subject: Re: siege and libpthread 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, 18 Apr 2004 19:34:44 -0000 Robert Watson wrote: > (1) libthr.so substituition via libmap.conf. > (2) linuxthreads substitution -- not sure if that can be done with > libmap.conf. I don't think linuxthreads can be done with libmap, and even if it does, I can't do it for another couple of weeks... With libthr it's the same. During the test I noticed in 'top' somewhat strange differences in time spent in the 'system' mode. Running under /usr/bin/time confirms that: ============= libthr: alfredo:~> /usr/bin/time -hlp siege -c20 -t1m -d1 -f web_list ** Siege 2.59 ** Preparing 20 concurrent users for battle. The server is now under siege...time: command terminated abnormally real 19.88 user 0.76 sys 1.65 3700 maximum resident set size 55 average shared memory size 997 average unshared data size 137 average unshared stack size 700 page reclaims 0 page faults 0 swaps 1 block input operations 4 block output operations 501 messages sent 7463 messages received 0 signals received 3261 voluntary context switches 13445 involuntary context switches Segmentation fault ============= libpthread: alfredo:~> /usr/bin/time -hlp siege -c20 -t1m -d1 -f web_list ** Siege 2.59 ** Preparing 20 concurrent users for battle. The server is now under siege...time: command terminated abnormally real 32.79 user 0.95 sys 0.66 4340 maximum resident set size 59 average shared memory size 1406 average unshared data size 145 average unshared stack size 902 page reclaims 0 page faults 0 swaps 33 block input operations 34 block output operations 995 messages sent 25512 messages received 0 signals received 25287 voluntary context switches 5625 involuntary context switches Segmentation fault ============= libc_r: alfredo:~> /usr/bin/time -hlp siege -c20 -t1m -d1 -f web_list ** Siege 2.59 ** Preparing 20 concurrent users for battle. The server is now under siege... Lifting the server siege... done. Transactions: 1804 hits Availability: 100.00 % Elapsed time: 59.74 secs Data transferred: 68221721 bytes Response time: 0.14 secs Transaction rate: 30.20 trans/sec Throughput: 1141935.44 bytes/sec Concurrency: 4.11 Successful transactions: 1804 Failed transactions: 0 real 59.78 user 1.40 sys 1.94 3884 maximum resident set size 50 average shared memory size 1031 average unshared data size 123 average unshared stack size 693 page reclaims 0 page faults 0 swaps 0 block input operations 0 block output operations 1808 messages sent 47267 messages received 311 signals received 44678 voluntary context switches 9919 involuntary context switches But then again, those probably doesn't mean anything, because the measurements are taken for different time periods. -- C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void.