kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject svn commit: r1339944 - /incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
Date Fri, 18 May 2012 01:22:11 GMT
Author: nehanarkhede
Date: Fri May 18 01:22:11 2012
New Revision: 1339944

URL: http://svn.apache.org/viewvc?rev=1339944&view=rev
Log:
Minor fix: Turning on TCP NODELAY in the Simple Consumer. This fix has a significant impact
on single fetch request performance from a latency standpoint

Modified:
    incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala?rev=1339944&r1=1339943&r2=1339944&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/consumer/SimpleConsumer.scala Fri May
18 01:22:11 2012
@@ -45,6 +45,7 @@ class SimpleConsumer(val host: String,
     channel.socket.setReceiveBufferSize(bufferSize)
     channel.socket.setSoTimeout(soTimeout)
     channel.socket.setKeepAlive(true)
+    channel.socket.setTcpNoDelay(true)
     channel.connect(address)
     trace("requested receive buffer size=" + bufferSize + " actual receive buffer size= "
+ channel.socket.getReceiveBufferSize)
     trace("soTimeout=" + soTimeout + " actual soTimeout= " + channel.socket.getSoTimeout)



Mime
View raw message