*BSD News Article 74221


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!inquo!nntp.uio.no!nntp-oslo.UNINETT.no!nntp-trd.UNINETT.no!not-for-mail
From: sthaug@nethelp.no (Steinar Haug)
Newsgroups: comp.os.linux.networking,comp.unix.bsd.netbsd.misc,comp.unix.bsd.freebsd.misc
Subject: Re: TCP latency
Followup-To: comp.os.linux.networking,comp.unix.bsd.netbsd.misc,comp.unix.bsd.freebsd.misc
Date: 19 Jul 1996 20:13:03 GMT
Organization: Nethelp Consulting, Trondheim, Norway
Lines: 36
Message-ID: <4soq8f$5mt@verdi.nethelp.no>
References: <4paedl$4bm@engnews2.Eng.Sun.COM> <4sadde$qsv@linux.cs.Helsinki.FI>
	<31E9E3A7.41C67EA6@dyson.iquest.net> <4sefde$f0l@fido.asd.sgi.com>
	<4socfr$3ot@dworkin.wustl.edu>
NNTP-Posting-Host: trane.uninett.no
In-reply-to: chuck@ccrc.wustl.edu's message of 19 Jul 1996 11:18:03 -0500
Xref: euryale.cc.adfa.oz.au comp.os.linux.networking:45865 comp.unix.bsd.netbsd.misc:4123 comp.unix.bsd.freebsd.misc:24023

[Chuck Cranor]

|   I took Larry's lat_syscall.c and a few of J Wunsch's suggestion for 
|   different system calls to try and ran a few tests.    Here are the results:
|   
|   [note: sparc 2 is running SunOS 4.1.3_U1 (48MB RAM), P5-133MHz is running
|    NetBSD/i386 (32MB RAM) ... both systems unloaded.   all numbers are
|    microseconds]
|   
|   program		description		Sparc2		P5-133MHz
|   lat_syscall	write 1 to /dev/null	61 		6	
|   lat_gettime	gettimeofday(&tv,0)	27		5
|   lat_kill	kill(1,0)		23		2
|   lat_umask	umask(0)		19		2
|   lat_getppid	getppid()		17		1
|   
|   Given that data, it seems like lat_syscall's writing 1 byte to /dev/null
|   is indeed a poor measurement of "Null syscall."

Here is an extension of the same table - measurements done for both FreeBSD
and Linux on the same machine (AMD 5x86-133 overclocked to 160 MHz, FreeBSD
2.2-960612-SNAP or Linux-2.0, default compilation options for both FreeBSD
and Linux).

program         description            Sparc2  P5-133  5x86/FreeBSD 5x86/Linux
------------------------------------------------------------------------------
lat_syscall     write 1 to /dev/null   61      6	 8	      3
lat_gettime     gettimeofday(&tv,0)    27      5	10	     13
lat_kill        kill(1,0)              23      2	 4	      3
lat_umask       umask(0)               19      2	 3	      2
lat_getppid     getppid()              17      1	 3	      2

My results would seem to support your thesis that writing 1 byte to
/dev/null may not be the most representative "Null syscall".

Steinar Haug, Nethelp consulting, sthaug@nethelp.no