From owner-freebsd-hackers Fri Jun 11 7:40:55 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id 45F5714DE8 for ; Fri, 11 Jun 1999 07:40:39 -0700 (PDT) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id KAA70517 for ; Fri, 11 Jun 1999 10:40:38 -0400 (EDT) Message-Id: <199906111440.KAA70517@cs.rpi.edu> To: freebsd-hackers@freebsd.org Subject: High syscall overhead? Date: Fri, 11 Jun 1999 10:40:37 -0400 From: "David E. Cross" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Just doing some performance testing and I noticed something rather disturbing.... Here is the test program: int main (void) { int count=0; for(count=0;count <10000000;++count) getppid(); return 0; } The time on linux for this program is ~5 seconds (linux "time" reports 3.x, but a wall clock clearly shows 5.x, go fig). FreeBSD reports 18.x seconds?!. I have a dual processor system and decided to parallel run them... it took 52!?! seconds, linux on the same was again about 5. Looking through the exception.s it appears that on entry to the kernel an MP lock is obtained... I thought we had splX(); to protect concurancy in the kernel. I am just curious what's the story with this. On some of my other tests it is clear that FreeBSD is handling concurancy much better than linux (by an equal factor actually, and on "real" tasks like real I/O handling). -- David Cross | email: crossd@cs.rpi.edu Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message