From owner-freebsd-java Mon Feb 23 21:50:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA10192 for freebsd-java-outgoing; Mon, 23 Feb 1998 21:50:20 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from bangkok.office.cdsnet.net (bangkok.office.cdsnet.net [204.118.245.49]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA10166; Mon, 23 Feb 1998 21:50:18 -0800 (PST) (envelope-from cts@bangkok.office.cdsnet.net) Received: (from cts@localhost) by bangkok.office.cdsnet.net (8.8.8/8.8.5) id VAA11911; Mon, 23 Feb 1998 21:49:51 -0800 (PST) Date: Mon, 23 Feb 1998 21:49:51 -0800 (PST) Message-Id: <199802240549.VAA11911@bangkok.office.cdsnet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Craig Spannring To: Iyer Mahadevan Cc: java@FreeBSD.ORG, freebsd-java@FreeBSD.ORG, saurabh@internetdevices.com Subject: Re: IO Performace problems using Java Sockets on FreeBSD In-Reply-To: <34F20247.DCFAF718@internetdevices.com> References: <34F20247.DCFAF718@internetdevices.com> X-Mailer: VM 6.31 under Emacs 19.34.1 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It would be nice to have a bit more info to go on, but my first guess is that you're getting Nagle'd (See RFC 896). (Helpful information would have been things like what type of socket, size of the packets, description of the protocol including any type of lock-step, units of time in the benchmark numbers, and possibly source code.) If the protocol between client and server is over a TCP socket and it sends small packets and each packet must be acknowledged before the next packet is sent then you might be should probably use the TCP_NODELAY option on the connection. Iyer Mahadevan writes: > Iyer Mahadevan wrote: > > > There were some problems with the formatting on my previous mail. > > So I am sending the mail again > > > > I set up en echo server that echoes the request back to the client. > > I found that there were serious performance problems when data was being > > written to the socket and read at the other end > > > > R1 = Time request read by server - Time request sent by client > > R2 = Time reply read by client - Time reply sent by server > > Total = Time received reply - Time connected to server > > > > 133 MH 64 MB > > FreeBSD 2.2-STABLE > > ----------------- > > > > Server Client R1 R2 Total > > > > C C 194 2 200 > > Java C - - 400 > > Java Java 191 199 400 > > > > =========================== > > > > 70 MH 64 MB > > SunOS Release 5.4 > > -------------- > > > > Server Client R1 R2 Total > > > > C C 41 49 98 > > Java C - - 103 > > Java Java 44 46 111 > > > > =========================== > > > > Note: > > > > 1. I took 5 samples for each case > > 2. Both client and server were running on the same machine (used > > localhost to connect) > > > > Questions > > > > When compared to the Solaris numbers ........ > > > > 1. Do you understand why the socket I/O is twice as expensive on FreeBSD > > for(C Server - C Client) > > 2. Do you understand why the socket I/O is 4 times as expensive on > > FreeBSD for (Java Server - C Client) > > > > PS : Let me know if you need any code, any generic Java/C socket code > > should do > > -- ======================================================================= Life is short. | Craig Spannring Ski hard, Bike fast. | cts@cdsnet.net --------------------------------+------------------------------------ Any sufficiently perverted technology is indistinguishable from Perl. ======================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message