How to increase socket-lease-time to improve performance in VMware GemFire
search cancel

How to increase socket-lease-time to improve performance in VMware GemFire

book

Article ID: 294422

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

This article covers how to improve get and put times if you are seeing degradation in performance.

In the gemfire.properties file, there is a socket-lease-time setting. This setting controls how long to keep idle peer to peer (P2P) connections alive before cleaning them up.

The default amount of time for this setting is 60000 or 60 seconds.   

It is possible you see worse performance of get or put commands when upgrading to VMware GemFire 9.10.x. This could be due to some GemFire product changes made to improve security with SSL.

With these changes, the cost of establishing connections may have increased sufficiently, such that if we are tearing down and re-establishing connections frequently enough, it leads to worse performance.

Environment

Product Version: 9.10

Resolution

The maximum value for socket-lease-time is 10 minutes, or 600000 ms. Changing the socket-lease-time to the maximum value means a connection will need to remain idle for a much longer period of time before getting torn down.

It is possible also, to completely eliminate the tearing down of P2P connections, by setting socket-lease-time=0. This means that any connections established never get cleaned up. In this situation, you need to make sure that you are not having any resource issues, or lack thereof, in your environment.

The recommendation is to set socket-lease-time to 600000 ms, and then reassess your performance.

There is a statistic called senderTimeouts that maps directly to how many times we clean up such idle connections. If you observe the stats and see a great decrease of senderTimeouts per second when you have increased the socket-lease-time to 600000 ms, you have definitely improved your behavior.