Date: Mon, 23 Feb 1998 14:26:01 -0800 From: Iyer Mahadevan <iyer@internetdevices.com> To: java@FreeBSD.ORG, iyer@internetdevices.com, saurabh@internetdevices.com, freebsd-java@FreeBSD.ORG, java-port@FreeBSD.ORG Subject: Socket IO problems using Java Sockets on FreeBSD Message-ID: <34F1F777.BEC2F180@internetdevices.com>
next in thread | raw e-mail | index | archive | help
I noticed some serious performance problems with Java Socket I/O. 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 133 MH 64 MB FreeBSD 2.2-STABLE Request read time = Time request read by server - Time request sent by client Reply read time = Time reply read by client - Time reply sent by server Total time = Time received reply - Time connected to server Server Client Request read time Reply read time Total Time C C 194 2 200 Java C 400 Java Java 191 199 400 Next I decided to take a look at the corresponding performance on a Sparc 4 70 MH 64 MB SunOS Release 5.4 Server Client Request read time Reply read time Total Time 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 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 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?34F1F777.BEC2F180>