From owner-freebsd-hackers Mon Mar 19 11:59:10 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from herbelot.dyndns.org (s014.dhcp212-24.cybercable.fr [212.198.24.14]) by hub.freebsd.org (Postfix) with ESMTP id 8C8A237B718 for ; Mon, 19 Mar 2001 11:59:07 -0800 (PST) (envelope-from thierry@herbelot.com) Received: from herbelot.com (multi.herbelot.nom [192.168.1.2]) by herbelot.dyndns.org (8.9.3/8.9.3) with ESMTP id UAA61771; Mon, 19 Mar 2001 20:58:54 +0100 (CET) (envelope-from thierry@herbelot.com) Message-ID: <3AB664FE.32CD18CD@herbelot.com> Date: Mon, 19 Mar 2001 20:58:54 +0100 From: Thierry Herbelot X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: hackers@FreeBSD.ORG Subject: Re: scheduling frequency for threaded applications ? References: <3AB66167.7DE93AB2@herbelot.com> <20010319114625.Z29888@fw.wintelcom.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > * Thierry Herbelot [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