Tuning JBoss Data Grid / Infinispan TCP connection

If you are struggling to extract performance from JBoss Data Grid / Infinispan, there is a simple task that you can do to boost the TCP connection by increasing the tcp buffer.

In the JBoss Data Grid host, edit the /etc/sysctl.conf file:

$ vim /etc/sysctl.conf

and add the following content in the end of file:

 net.core.rmem_max=26214400
 net.core.wmem_max=1048576
Now apply the changes
$  sysctl -p
and confirm the changes by running the commands:
 sysctl -a | grep net.core.rmem_max
 sysctl -a | grep net.core.wmem_max
Now, edit the jgroups subsystem on JBoss Data Grid server  by running the following commands. First, open the command line interface:
% $JDG_HOME/bin/cli.sh --connect=localhost:9999
Edit the send_buf_size property from tcp stack:
 /subsystem=jgroups/stack=tcp/transport=TRANSPORT/property=send_buf_size:add(value=640000)
and edit the send_buf_size property from tcp stack:
/subsystem=jgroups/stack=tcp/transport=TRANSPORT/property=recv_buf_size:add(value=25000000)
 Restart the server. Just that! 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s