From owner-freebsd-performance@FreeBSD.ORG Mon Nov 3 11:15:27 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F5AB1065690 for ; Mon, 3 Nov 2008 11:15:27 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id B49988FC12 for ; Mon, 3 Nov 2008 11:15:26 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 4B027CCCB; Mon, 3 Nov 2008 13:15:23 +0200 (EET) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15640-08; Mon, 3 Nov 2008 13:15:22 +0200 (EET) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 4D4F6CCA2; Mon, 3 Nov 2008 13:15:22 +0200 (EET) Message-ID: <490EDD49.5070902@bulinfo.net> Date: Mon, 03 Nov 2008 13:15:21 +0200 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.14 (X11/20080616) MIME-Version: 1.0 To: Julian Elischer References: <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> <490AB477.2080001@bulinfo.net> <490AB750.9040505@elischer.org> In-Reply-To: <490AB750.9040505@elischer.org> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-performance@freebsd.org, Sam Xia Subject: Re: 1. thread switching time? (Krassimir Slavchev) X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2008 11:15:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Julian Elischer wrote: > Krassimir Slavchev wrote: > >> >> Also, I am able to set HZ=100000 but the thread switching time is still >> ~1ms. > > You must be talking about the time that a thread can run before it is > pushed out by other threads? I know I've seem many x 10,000 context > switches in some cases, i.e. look at very high interrupt rates > etc. so I guess I'm not sure what you are measuring.. > > at one time the scheduling quantum was independent of Hz. > I am not sure how true that is now.. > The scheduling quantum is independent of Hz for Hz > 1000. usr/src/sys/kern_tc.c: ... if (hz > 1000) tc_tick = (hz + 500) / 1000; else tc_tick = 1; ... I am not sure whether setting Hz > 1000 impact on performance or not, e.g using polling(4). Removing this limitation and setting kern.hz=10000 give 100usec quantum. Thanks for the point. Best Regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFJDt1JxJBWvpalMpkRAnWCAJ9z5Z7JYDC/3AdsJe+Cn7+dg6y3HwCdHPZA 6sK5dec43n41/QcbiluJoeA= =8u2E -----END PGP SIGNATURE----- From owner-freebsd-performance@FreeBSD.ORG Tue Nov 4 03:05:34 2008 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CD2C106564A for ; Tue, 4 Nov 2008 03:05:34 +0000 (UTC) (envelope-from xiazhongqi@huawei.com) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [119.145.14.67]) by mx1.freebsd.org (Postfix) with ESMTP id E4C9F8FC12 for ; Tue, 4 Nov 2008 03:05:33 +0000 (UTC) (envelope-from xiazhongqi@huawei.com) Received: from huawei.com (szxga04-in [172.24.2.12]) by szxga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K9S00GXEGKJCP@szxga04-in.huawei.com> for freebsd-performance@freebsd.org; Tue, 04 Nov 2008 11:05:07 +0800 (CST) Received: from huawei.com ([172.24.1.12]) by szxga04-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0K9S004VSGKITW@szxga04-in.huawei.com> for freebsd-performance@freebsd.org; Tue, 04 Nov 2008 11:05:07 +0800 (CST) Received: from x49105 ([10.111.9.47]) by szxml05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0K9S00HYEGKIZE@szxml05-in.huawei.com> for freebsd-performance@freebsd.org; Tue, 04 Nov 2008 11:05:06 +0800 (CST) Date: Tue, 04 Nov 2008 11:05:06 +0800 From: Sam Xia In-reply-to: <20081103120020.5188D106579C@hub.freebsd.org> To: freebsd-performance@freebsd.org Message-id: <000001c93e2a$23db4150$2f096f0a@china.huawei.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Mailer: Microsoft Office Outlook 11 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Thread-index: Ack9q9PdKl8/o54RRGO7MASfecvwXAAfe3bA Cc: 'Krassimir Slavchev' Subject: RE: freebsd-performance Digest, Vol 69, Issue 2 X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 03:05:34 -0000 if you modify file subr_param.c as follows: void init_param1(void) { hz = HZ; ===> hz=HZ*4 . . . } you will get what you want. i have tested.it works well. Best Regards, Sam Xia > -----Original Message----- > From: owner-freebsd-performance@freebsd.org > [mailto:owner-freebsd-performance@freebsd.org] On Behalf Of > freebsd-performance-request@freebsd.org > Sent: Monday, November 03, 2008 8:00 PM > To: freebsd-performance@freebsd.org > Subject: freebsd-performance Digest, Vol 69, Issue 2 > > Send freebsd-performance mailing list submissions to > freebsd-performance@freebsd.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > or, via email, send a message with subject or body 'help' to > freebsd-performance-request@freebsd.org > > You can reach the person managing the list at > freebsd-performance-owner@freebsd.org > > When replying, please edit your Subject line so it is more > specific than "Re: Contents of freebsd-performance digest..." > > > Today's Topics: > > 1. Re: 1. thread switching time? (Krassimir Slavchev) > (Krassimir Slavchev) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 03 Nov 2008 13:15:21 +0200 > From: Krassimir Slavchev > Subject: Re: 1. thread switching time? (Krassimir Slavchev) > To: Julian Elischer > Cc: freebsd-performance@freebsd.org, Sam Xia > Message-ID: <490EDD49.5070902@bulinfo.net> > Content-Type: text/plain; charset=ISO-8859-1 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Julian Elischer wrote: > > Krassimir Slavchev wrote: > > > >> > >> Also, I am able to set HZ=100000 but the thread switching time is > >> still ~1ms. > > > > You must be talking about the time that a thread can run > before it is > > pushed out by other threads? I know I've seem many x > 10,000 context > > switches in some cases, i.e. look at very high interrupt > rates etc. so > > I guess I'm not sure what you are measuring.. > > > > at one time the scheduling quantum was independent of Hz. > > I am not sure how true that is now.. > > > > The scheduling quantum is independent of Hz for Hz > 1000. > > usr/src/sys/kern_tc.c: > ... > if (hz > 1000) > tc_tick = (hz + 500) / 1000; > else > tc_tick = 1; > ... > > I am not sure whether setting Hz > 1000 impact on performance > or not, e.g using polling(4). > Removing this limitation and setting kern.hz=10000 give > 100usec quantum. > > Thanks for the point. > > Best Regards > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (FreeBSD) > > iD8DBQFJDt1JxJBWvpalMpkRAnWCAJ9z5Z7JYDC/3AdsJe+Cn7+dg6y3HwCdHPZA > 6sK5dec43n41/QcbiluJoeA= > =8u2E > -----END PGP SIGNATURE----- > > > ------------------------------ > > _______________________________________________ > freebsd-performance@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-performance > To unsubscribe, send any mail to > "freebsd-performance-unsubscribe@freebsd.org" > > End of freebsd-performance Digest, Vol 69, Issue 2 > ************************************************** >