From owner-freebsd-hackers Sun Dec 2 21:54: 3 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 0493B37B405 for ; Sun, 2 Dec 2001 21:54:00 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id fB35rxg95155; Sun, 2 Dec 2001 21:53:59 -0800 (PST) (envelope-from dillon) Date: Sun, 2 Dec 2001 21:53:59 -0800 (PST) From: Matthew Dillon Message-Id: <200112030553.fB35rxg95155@apollo.backplane.com> To: "Anjali Kulkarni" Cc: Subject: Re: TCP graph References: <003901c17bba$210e66d0$0a00a8c0@indranet> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :Hello, : :On the subject of tcp performance graphs, I have taken a few tcpdumps of = :some pages, to understand the entire process in more minute detail, and = :to co-relate the theory with the graphs in practice. I have plotted a = :graph of cumulative data received at the client side vs. time required = :to fetch it, and I find that for the data received by client, the first = :2 packets arrive within a time of 0.212 sec. of each other, whereas the = :3rd. packet takes another 0.5 secs. Thereafter, all packets take 0.212 = :sec.(relative to the previous packet) Is this the slow start algorithm I = :am observing(The 0.5 sec. difference)? :I have attached the graph here, if anybody wants to take a look... The = :first 2 points are there for SYN &SYN-ACK. : :Thanks, :Anjali Well, I'm guessing that you have not turned on TCP_NODELAY for the connection, so writes will be buffered for approximately that long (at least at connection startup) before being pushed out. This is a feature that allows TCP to combine small writes together into a single packet before sending it over the network. Programs which want their write()s to a socket to be pushed out immediately have to set the TCP_NODELAY socket option on the socket. Like this: #include ... int on = 1; setsockopt(socket_fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(int)); TCP_NODELAY is different from delayed-acks. Delayed acks are controlled via a sysctl and typically should be left enabled. :Content-Type: application/vnd.ms-excel; : name="tcp_algo.xls" :... Unfortunately I can't process '.xls' files... sounds like a MS Windows thing. I recommend posting a URL that points to a web page containing the graph as a graphic instead of posting the whole graph to the list ( which generates an unnecssary load on the list server ). -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message