Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bloom-beacon!mit-eddie!uw-beaver!rice!sun-spots-request From: sxn@sun.com (Stephen X. Nahm) Newsgroups: comp.sys.sun Subject: Re: Poor implementation of TCP/IP or RPC on a SUN3/60 running SUNOS-4.0? Keywords: SunOS Message-ID: <3718@kalliope.rice.edu> Date: 6 Jun 89 22:42:34 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 56 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 18, message 5 of 14 In article <8905101313.AA04157@iesd.dk> in Sun-Spots-Digest: Volume 7, Issue 304, ruseng@iesd.dk (Carsten Ruseng Jakobsen) writes: >While evaluating the performance of SUN-RPC, I detected the TCP protocol >slowing dramatical down when sending packets with sizes close to the >magical 4096 and 8192 bytes. I've emailed Carsten previously, but I'm posting here for the information of those reading this list. The performance anomalies reported are a result of the default buffer sizes used by the RPC library. The buffer sizes can be changed by the user as described below: ----- Begin Included Message ----- >From sxn Wed May 17 12:04:07 1989 To: ruseng@iesd.dk Subject: Re: Elbows in RPC/TCP performance You can fix things by setting the "send_buf_size" and/or "recv_buf_size" parameters of clnttcp_create() and svctcp_create(). For your example, where the client sends big packets and gets back small acks, use: remote = clnttcp_create(&sin, YOURPROG, YOURVERS, &sock, 24000, 0); (where sock can be RPC_ANYSOCK, and sin is set correctly.) For the server side, which is receiving big packets and sending back small acks, use: transp = svctcp_create(RPC_ANYSOCK, 0, 24000); I set up an RPC program that repeated your scenario. Before I made the above changes, I got similar results as you got. After I adjusted the appropriate parameters correctly (and without any setsockopt manipulation), I got: Size: 0 time: 0.94 Seconds Size: 512 time: 0.97 Seconds Size: 1024 time: 1.16 seconds Size: 2048 time: 1.50 Seconds Size: 4000 time: 1.99 Seconds Size: 4096 time: 2.28 seconds Size: 8000 time: 3.37 Seconds Size: 8192 time: 3.81 seconds Size: 8300 time: 3.70 seconds Size: 16300 time: 6.30 Seconds Size: 16392 time: 8.72 seconds Size: 16400 time: 10.54 seconds See rpc(3) in the SunOS manual, or in the RPCSRC 4.0 man directory. Steve Nahm ----- End Included Message ----- -- Steve Nahm sxn@sun.COM or sun!sxn