From owner-freebsd-hackers Mon Mar 19 11:43:42 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 14A5237B71E for ; Mon, 19 Mar 2001 11:43:38 -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 UAA61758 for ; Mon, 19 Mar 2001 20:43:35 +0100 (CET) (envelope-from thierry@herbelot.com) Message-ID: <3AB66167.7DE93AB2@herbelot.com> Date: Mon, 19 Mar 2001 20:43:35 +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: hackers@freebsd.org Subject: scheduling frequency for threaded applications ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. If I want to get rid of this system overhead, one solution is to use threads (all sharing the same address space, thus no more context switching). My question is : how otfen are the threads rescheduled ? (all threads are mainly always blocked until an event arrives, either a timeout with select() or a packet with recevmsg()) I've had a quick look a TFM, but I don't see anything applicable (pthread_setschedparam(3) for example does not speak of scheduling frequency) -- Thierry Herbelot To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message