Search code examples
push-diffusion

PUSH-000086: Requested output buffer size could not be allocated


I am using Diffusion 5.8.0 and have increased the input-buffer-size and output-buffer-size of the Client Connector to 1024k.

When a client connects to the server using this connector the following log messages are output to the server console:

2016-07-12 10:42:51.997|INFO|Diffusion: InboundThreadPool Thread_0|PUSH-000086|Client Connector: Requested output buffer size could not be allocated, requested: 1M allocated: 208K.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2016-07-12 10:42:51.997|INFO|Diffusion: InboundThreadPool Thread_0|PUSH-000085|Connector Client Connector: Requested input buffer size could not be allocated, requested: '1M' allocated: '208K'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl

Sending and receiving messages greater than the allocated buffer size works so I am wondering if this is something that I need to worry about...

Are there performance implications? If so, how can I successfully allocate a bigger buffer size?


Solution

  • From the Buffer Sizing page of the Diffusion documentation.

    When you increase an input-buffer-size/output-buffer-size this configures two buffers; one is in the client multiplexer and will be of the configured size, the other is a socket buffer which is managed by the Operating System. As has happened in your case the Operating System may not provide you with a socket buffer of the specified size and you may be allocated a smaller one.

    This has performance implications as illustrated in the diagram below:

    enter image description here

    In figure 1 the message being sent over the wire, the socket buffer, and the buffer in the client multiplexer are the same size. In this case the message can go directly from the wire into the socket buffer, and directly from the socket buffer to the client multiplexer.

    In figure 2 the message being sent over the wire and the buffer in the client multiplexer are the same size. However, the OS has allocated a smaller socket buffer which will need to be copied in multiple iterations before the full message is transported to the client multiplexer. Each iteration is going to cause a context switch which will have an impact on performance.

    How to allocate a bigger socket buffer will depend upon your Operating System. In the case of Linux you can execute the following command to see socket buffer sizes: sysctl -a | grep mem

    In my case, the result of executing this command includes:

    net.core.rmem_default = 212992
    net.core.rmem_max = 212992
    net.core.wmem_default = 212992
    net.core.wmem_max = 212992
    

    These are the OS bound input and output buffer sizes and can be configured using the sysctl -w command.