Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Nov 2008 13:15:21 +0200
From:      Krassimir Slavchev <krassi@bulinfo.net>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-performance@freebsd.org, Sam Xia <xiazhongqi@huawei.com>
Subject:   Re: 1. thread switching time? (Krassimir Slavchev)
Message-ID:  <490EDD49.5070902@bulinfo.net>
In-Reply-To: <490AB750.9040505@elischer.org>
References:  <000001c93b0c$6195e6b0$2f096f0a@china.huawei.com> <490AB477.2080001@bulinfo.net> <490AB750.9040505@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?490EDD49.5070902>