setsockopt() and netperf parameters

Federico Pelizza (Federico.Pelizza@ccrle.nec.de)
Fri, 23 Jul 1999 14:46:13 +0100

Hallo everybody,

I'm new on the list and new to netperf.
I asked to subscribe yesterday and I'm not sure that I'm subscribed
already. I had no confirmation.
Anyway I'll check it out with this mail.
So I beg anyone who wanted to answer me, to do it personally as well as
on the list.

I'm going to do performance tests on CLIP (classical ip) for linux.

I had a good look at netperf and I found out that it chooses the
dimension
of the kernel socket buffer exactly like I thought.
It uses setsockopt(..,SOL_SOCKET,SO_SNDBUF/SO_RCVBUF,...) for this.

I also had a deep look at the man pages about setsockopt and I've seen
something interesting about one of the parameter of the function, which
is
level.
level can be equal to SOL_SOCKET as in the example here over, which
means
the buffer size that is manipulated is at socket level.
On my system this size defaults to 0 (zero).
I did a getsockopt(..,SOL_SOCKET,SO_SNDBUF/SO_RCVBUF,...) in CLIP before
bind my ATM socket.
On the other hand level can be equal to various protocols level
(SOL_ATM,SOL_AAL,SOL_UDP,SOL_TCP,SOL_IPV6,etc...)
On my system all of these sizes default to 64kb.
I did a getsockopt(..,SOL_ATM/SOL_TCP/SOL_IPV6,SO_SNDBUF/SO_RCVBUF,...)
in CLIP before bind my ATM socket.

So my question is: has a socket various send buffers and various receive
buffers?
One really for himself (SOL_SOCKET) and furthermore one for every
protocol accessing it?
Can anyone explain me the difference between these various values of
level and their related buffers?

I looked at the old mails archive, to the package documentation and to
the sources.
I have figured out that -s and -S cause
setsockopt(..,SOL_SOCKET,SO_SNDBUF/SO_RCVBUF,...) on the local and
remote system.
I also guess that -m and -M set up the MTU (=message size) on the local
and remote system.
Can anyone confirm or correct these assumptions of mine?

Thanks a lot.
Ciao da FEDE

-- 
----------------------------
Federico Pelizza

homepage: http://cclinf30.polito.it/~s76927

Work: NEC Europe ltd. - Adenauerplatz 6 - 69115 Heidelberg - Germany tel. +49-(0)6221-9051133 fax +49-(0)6221-9051155

Home: Rohrbacherstrasse 126 - 69126 Heidelberg - Germany

Mobile phone: +49-(0)177-4714687 --------------------------------