incubator-kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Fung (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-200) Support configurable send / receive socket buffer size in server
Date Tue, 13 Dec 2011 20:00:31 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168661#comment-13168661
] 

John Fung commented on KAFKA-200:
---------------------------------

Hi Jay,

The followings are the debug messages from the throughput test and the set values are effective:

1. Kafka log messages at the sending side:
. . .
[2011-12-13 01:54:57,572] INFO Closing socket connection to /172.17.166.122. (kafka.network.Processor)
[2011-12-13 01:54:59,390] INFO #### sendBufferSize : set[1048576] get[1048576] (kafka.network.Acceptor)
[2011-12-13 01:54:59,390] INFO #### sendBufferSize : set[1048576] get[1048576] (kafka.network.Acceptor)
[2011-12-13 01:54:59,391] INFO #### sendBufferSize : set[1048576] get[1048576] (kafka.network.Acceptor)
. . .

The code which prints the messages is from core/src/main/scala/kafka/network/SocketServer.scala:

  def accept(key: SelectionKey, processor: Processor) {
    val socketChannel = key.channel().asInstanceOf[ServerSocketChannel].accept()
    if(logger.isDebugEnabled)
      logger.info("Accepted connection from " + socketChannel.socket.getInetAddress() + "
on " + socketChannel.socket.getLocalSocketAddress)
    socketChannel.configureBlocking(false)
    socketChannel.socket().setTcpNoDelay(true)
    socketChannel.socket().setSendBufferSize(sendBufferSize)
    socketChannel.socket().setReceiveBufferSize(receiveBufferSize)
  
    logger.info("#### sendBufferSize : set[" + sendBufferSize + "] get[" + socketChannel.socket().getSendBufferSize()
+ "]")
   
2. ConsoleConsumer has some debug messages printing from SimpleConsumer at the receiving side:
. . .
[2011-12-13 01:58:15,099] DEBUG Connected to /172.17.166.122:10251 for fetching. (kafka.consumer.SimpleConsumer)

[2011-12-13 01:58:15,160] TRACE requested receive buffer size=512000 actual receive buffer
size= 512000 (kafka.consumer.SimpleConsumer)
. . .

                
> Support configurable send / receive socket buffer size in server
> ----------------------------------------------------------------
>
>                 Key: KAFKA-200
>                 URL: https://issues.apache.org/jira/browse/KAFKA-200
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: John Fung
>             Fix For: 0.8
>
>         Attachments: KAFKA-200.patch
>
>
> * Make the send / receive socket buffer size configurable in server.
> * KafkaConfig.scala already has the following existing variables to support send / receive
buffer:
>     socketSendBuffer
>     socketReceiveBuffer
> * The patch attached to this ticket will read the following existing settings in <kafka>/config/server.properties
and set the corresponding socket buffers
>     . . .
>     # The send buffer (SO_SNDBUF) used by the socket server
>     socket.send.buffer=1048576
>     # The receive buffer (SO_RCVBUF) used by the socket server
>     socket.receive.buffer=1048576

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message