Type |
Task
|
Priority |
Normal
|
Assignee | |
Version |
tigase-server-8.3.0
|
Spent time |
5h
|
Related
-
tigase-private/TigaseTeam#2555 You are not authorized to access this issue
Issue Votes (0)
Watchers (0)
Currently, the only option to adjust TCP socket buffer size is by settings the
net-buffer
property on the instance ofConnectionManager
using the Tigase configuration file. However, this not only increases the TCP socket buffer size used by the operating system but also increases internal TCP buffers which are used for processing data from the socket, and forces them not to scale to smaller values thannet-buffer
value.While this allows best performance, it causes significant memory usage when a lot of connections are being used., ie. changing
net-buffer
from 2KB to 4KB increase memory usage by a single connection from 12KB to 24KB. On the other hand, with long round trip times, it would be better to have bigger TCP socket buffers to speed up reading/sending batch of data over the network and we do not need to keep bigger internal buffers all the time as we do not need (or want) to increase performance of those connections.The best would be to create a new variable named
socket-buffer
which wouldn't be set by default (null
) and in this case,net-buffer
size would be used. However, if it would be set, it's value would be used as TCP socket buffer size.