RE: freebsd-performance Digest, Vol 69, Issue 2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: freebsd-performance Digest, Vol 69, Issue 2

Sam Xia
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: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> [hidden email]
> Sent: Monday, November 03, 2008 8:00 PM
> To: [hidden email]
> Subject: freebsd-performance Digest, Vol 69, Issue 2
>
> Send freebsd-performance mailing list submissions to
> [hidden email]
>
> 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
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> 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 <[hidden email]>
> Subject: Re: 1. thread switching time? (Krassimir Slavchev)
> To: Julian Elischer <[hidden email]>
> Cc: [hidden email], Sam Xia <[hidden email]>
> Message-ID: <[hidden email]>
> 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-----
>
>
> ------------------------------
>
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-performance
> To unsubscribe, send any mail to
> "[hidden email]"
>
> End of freebsd-performance Digest, Vol 69, Issue 2
> **************************************************
>

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"