*BSD News Article 35195


Return to BSD News archive

Xref: sserve comp.unix.internals:7631 comp.unix.solaris:22124 comp.unix.sys5.r4:8257 comp.unix.bsd:14786
Newsgroups: comp.unix.internals,comp.unix.solaris,comp.unix.sys5.r4,comp.unix.bsd
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!paladin.american.edu!europa.eng.gtefsd.com!howland.reston.ans.net!swrinde!elroy.jpl.nasa.gov!ncar!noao!rstevens
From: rstevens@noao.edu (W. Richard Stevens)
Subject: Re: DLPI Vs BSD Sockets Vs Sys V TLI
Message-ID: <1994Aug25.165610.18709@noao.edu>
Sender: news@noao.edu
Nntp-Posting-Host: gemini.tuc.noao.edu
Organization: National Optical Astronomy Observatories, Tucson, AZ, USA
References: <33ft3u$mn3@news.tamu.edu> <33iecq$leg@crl2.crl.com>
Distribution: inet
Date: Thu, 25 Aug 1994 16:56:10 GMT
Lines: 37

> 3rd, TLI is the layer 4/ transport layer interface stream API.  Functionally
> equivalent to Berkeley Sockets API.  But the sockets API on SVR4.* is 
> implimented as a library translation layer into TLI calls.  SLOW!  Or
> more accurately, slower than calling TLI direcly.

Oh no, not this myth again.

My understanding is that sockets calls are translated into TPI, *not* TLI,
indeed, anyone wanting to access "raw" TCP has to use TPI as that's what
TCP and UDP expect.  I've never seen the source code to the SVR4 sockets
library, but am going by the article:

	%T Implementing Berkeley Sockets in System V Release 4
	%A I. Vessey
	%A G. Skinner
	%J Proceedings of the 1990 Winter USENIX Conference
	%C Washington, D.C.
	%P 177-193
	%D 1990

There have been some SVR4 sockets implementations that actually do translate
socket calls into TLI (Wollongong's rings a bell) but I'm almost positive
Solaris uses the techniques described in the Vessey & Skinner article.
Yes, I'm aware that the mapping of TLI into TPI is much more one-to-one
than the mapping of sockets into TPI, but then I wouldn't really say that
TCP is as easy to map from TPI as the OSI transport layer, for example.

This misconception is continually posted, without one shred of evidence.
Have you ever benchmarked sockets versus TLI on Solaris?  Has anyone?
How about just changing ttcp to use TLI instead of sockets and proving
or disproving this myth?  While you're at it, why not access the stream
head directly using TPI (avoiding both TLI and sockets) with getmsg and
putmsg and see what the inherent limits of the TCP implementation are.
Until someone posts some real numbers, IMHO the gross generalization that
"sockets are slower than TLI" is baloney.

	Rich Stevens