Re: My performance problems with 0.7.6.1

Tim Anderson <[email protected]> Fri, 15 Dec 2006 23:04:58 +1100
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
You're absolutely right. There should be a call to 
Socket.setTcpNoDelay(true) in the socket creation code.

-Tim

Steve Condas wrote:
> All,
>
> This is my final message for the night.  I said that the performance 
> problem happened for both the TCP and RMI connectors, but in fact, it 
> does not happen with the RMI connector.  I had a configuration error 
> where I was using RMI for JNDI, but TCP/IP for the actual data.  With 
> RMI correctly configured I am now getting more than 700 messages per 
> second.
>
> Steve
>
> ----- Original Message ----
> From: Steve Condas <scondas-/[email protected]>
> To: [email protected]
> Sent: Wednesday, December 13, 2006 12:23:58 AM
> Subject: Re: My performance problems with 0.7.6.1
>
> I have been analyzing network stack traces using the TCP/IP connector 
> and I believe the problem may be related to a one byte (of data) 
> message that gets sent server->subscriber and then later 
> subscriber->server for each JMS message sent.  After these messages 
> are sent there is a .04 second pause waiting for a TCP ACK from the 
> other side.  I believe these ACKs are delayed due to Nagle's algorithm 
> in the RedHat TCP/IP stack, which is waiting for user data to combine 
> with the ACK to minimize the number of packets sent.  This data never 
> comes, so the TCP/IP stack sends the ACK after a .04 second timeout. 
>
> Windows is smart enough to realize that on connections to/from the 
> same machine you don't need to implement Nagel's algorithm, thus the 
> performance on Windows is good.  According to "Microsoft Windows 2000 
> TCP/IP Implementation Details", "The Nagle algorithm is not applied to 
> loopback TCP connections for performance reasons."  Question for Tim 
> Anderson, do you develop on Windows by any chance?
>
> Does anyone know why these one byte messages (always 0x00) are being 
> sent?  If they are required, then perhaps the sockets can be opened 
> with Socket.setTcpNoDelay() to remove the delay when using OpenJMS.  
> Given that there are two of these pauses for every message, it is not 
> possible to get more than 1 message / .08 sec  = 12.5 messages/second. 
>
> Regards,
> Steve Condas
>
> ----- Original Message ----
> From: Steve Condas <scondas-/[email protected]>
> To: [email protected]
> Sent: Tuesday, December 12, 2006 11:00:13 PM
> Subject: My performance problems with 0.7.6.1
>
> I have OpenJMS 0.7.6.1 running on a RedHat system, and the best 
> consuming rates I can get are on the order of 10 messages/sec.   This 
> is with non persistent messages, auto_ack, no durable subscribers, and 
> the publisher and subscriber on the same computer.   It does not 
> matter if I use TCP or RMI, I still get the same rates (publishing 
> flies, it just the receiving that's a problem).  My CPU utilization is 
> < 5%.  While looking through the archives, I have seen other users 
> with the same question but without any suggested resolution.  Is there 
> anyone using Linux that is getting higher performance than I am?  If 
> so, would you be willing to share your system configuration and 
> Publisher/Subscriber code?
>
> Thanks,
> Steve Condas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV