Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 20:58:54 +0100
From:      Thierry Herbelot <thierry@herbelot.com>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: scheduling frequency for threaded applications ?
Message-ID:  <3AB664FE.32CD18CD@herbelot.com>
References:  <3AB66167.7DE93AB2@herbelot.com> <20010319114625.Z29888@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:
> 
> * Thierry Herbelot <thierry@herbelot.com> [010319 11:43] wrote:
> > Hello,
> >
> > I'm developping a network benchmark application ("packet blaster").
> >
> > The current version uses many processes, to send and receive packets,
> > and collate statistics.
> > when I look at top(1), I see most of the time taken is in the "system"
> > category. I assume this is due to the many context switches between the
> > collaborating processes.
> 
> You're incorrect.  System means just about any time spent inside the
> kernel (except interrupts), so basically syscalls count towards this
> meaning that your application is driving the kernel pretty hard.
> 
> This is easy for a team of processes, but nearly impossible with
> a thread based approach.

could you please elaborate ? (indeed, if you could also shed some light
on the first question : how frequently are threads rescheduled ?)

> 
> You don't want to use threads.
> 
> --
> -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]

PS : the TI-RPC commit was a nice one !

-- 
Thierry Herbelot

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AB664FE.32CD18CD>