Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 1998 21:49:51 -0800 (PST)
From:      Craig Spannring <cts@cdsnet.net>
To:        Iyer Mahadevan <iyer@internetdevices.com>
Cc:        java@FreeBSD.ORG, freebsd-java@FreeBSD.ORG, saurabh@internetdevices.com
Subject:   Re: IO Performace problems using Java Sockets on FreeBSD
Message-ID:  <199802240549.VAA11911@bangkok.office.cdsnet.net>
In-Reply-To: <34F20247.DCFAF718@internetdevices.com>
References:  <34F20247.DCFAF718@internetdevices.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802240549.VAA11911>