Re: udp sockets !!

Kevin M. Joyce (joycek@rl.af.mil)
Fri, 30 Oct 1998 08:12:41 -0500

This is a multi-part message in MIME format.
--------------51A53E8C8F84F9E4D6356DC6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Bob,
These settings will change TCP. Martin was looking for increasing the
socket rate for UDP.

Bob Felderman wrote:
>
> => From: Martin Koyabe <koyabe@erg.abdn.ac.uk>
> => Does someone out there know how I can increase the socket rate in =
> => Solaris 2.X ? I will really appreciate !! I have a tool that sends UPD =
> => packets from one machine to another and I am benchmarking the throughput =
> => gain over a 100Mbps FastEthernet link via 100Mbps Cisco-Switch !!
>
> #! /bin/sh
>
> # winsize 64 k (Make sure to include a space betw. 64 and k.)
> # This changes the TCP window size to 64 KB from the default of 8K.
>
> usage()
> {
> echo usage: winsize [size [k]]
> exit
> }
>
> display()
> {
> /usr/ucb/echo -n "tcp_cwnd_max = "
> /usr/sbin/ndd /dev/tcp tcp_cwnd_max
> /usr/ucb/echo -n "tcp_xmit_hiwat = "
> /usr/sbin/ndd /dev/tcp tcp_xmit_hiwat
> /usr/ucb/echo -n "tcp_recv_hiwat = "
> /usr/sbin/ndd /dev/tcp tcp_recv_hiwat
>
> echo " "
> /usr/ucb/echo -n "udp_recv_hiwat = "
> /usr/sbin/ndd /dev/udp udp_recv_hiwat
> /usr/ucb/echo -n "udp_max_buf = "
> /usr/sbin/ndd /dev/udp udp_max_buf
> }
>
> modify()
> {
> if [ $tcp_win_size -lt 32768 ] ; then
> tcp_cwnd_max=32768
> elif [ $tcp_win_size -gt 65535 ] ; then
> tcp_cwnd_max=`expr $tcp_win_size - 1`
> else
> tcp_cwnd_max=`expr $tcp_win_size`
> fi
> /usr/sbin/ndd -set /dev/tcp tcp_cwnd_max $tcp_cwnd_max
> /usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat $tcp_win_size
> /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat $tcp_win_size
>
> /usr/sbin/ndd -set /dev/udp udp_recv_hiwat $tcp_win_size
> /usr/sbin/ndd -set /dev/udp udp_max_buf 1048576
> }
>
> case $# in
> 0)
> display;
> ;;
> 1)
> tcp_win_size=$1
> modify
> display
> ;;
> 2)
> if [ $2 != 'k' -a $2 != 'K' ]; then
> usage;
> fi
> tcp_win_size=`expr $1 \* 1024`
> modify
> display
> ;;
> *)
> usage
> ;;
> esac

-- 
Kevin M. Joyce
Network Analyst 
Rome Research Corporation

Email: joycek@rl.af.mil Phone: (315) 330-7928 --------------51A53E8C8F84F9E4D6356DC6 Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Kevin M. Joyce Content-Disposition: attachment; filename="vcard.vcf"

begin: vcard fn: Kevin M. Joyce n: M. Joyce;Kevin org: Rome Research Corporation adr: Rome Research Corporation Room 4003;;525 Brooks Road;Rome;NY;13441;USA email;internet: joycek@rl.af.mil title: Network Analyst tel;work: (315) 330-7928 tel;fax: (315) 339-0238 x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard

--------------51A53E8C8F84F9E4D6356DC6--