Add ability to disable default receive buffer size in websocket server#1406
Conversation
Signed-off-by: pwangryn <pawel.wangryn@icsec.pl>
|
@PhilipRoman We try also this before, but only when |
|
@Vangreen that is really strange, could you please verify with your setup that even doing socket.setReceiveBufferSize(socket.getReceiveBufferSize());here: https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/java/org/java_websocket/server/WebSocketServer.java#L581 causes the slowdown? (and maybe post the value of On a side note, the websocket default buffer size of 16K seems too low and causes slowdowns in my testing compared to the system default 64K. |
|
@PhilipRoman setting up the 'real' socket buffer this way somehow blocks the system a memory management. Since there is only one value |
|
Fixed with #1407 |
|
@dushabella the behaviour you expect is now turned on by default (no explicit set buffer size). I didn't separate the socket and application buffer sizes since there is no point in having read buffer bigger than socket buffer, but also the socket buffer can easily be saturated on a fast connection, so also not a good idea to have it smaller than socket buffer (just extra syscall overhead). |

Description
In our project we encountered performance drops in websocket connection over vpn. During debugging we find out that when
socket.setReceiveBufferSize(WebSocketImpl.RCVBUF);is not set the performance increases (RRT is smaller and more packets per second are ingested)Motivation and Context
Improve performance
How Has This Been Tested?
Types of changes
Checklist: