VMware GemFire server request and response time measurement
search cancel

VMware GemFire server request and response time measurement

book

Article ID: 294333

calendar_today

Updated On:

Products

VMware Tanzu Gemfire

Issue/Introduction

In some VMware GemFire use cases, there are needs to set up a way to monitor the request and response times for VMware GemFire server side. VMware GemFire users can write a code or use a tool but they might need a way to do it without affecting the current performance. The options with JMX on VMware GemFire do not have this capability.

1. VMware GemFire does not expose this particular attribute via JMX

2. Server side statistics. The server side stats (.gfs) via VSD tool (though it's not dynamic as we need to use this tool) doesn't have this option for dynamic monitoring.

3. Enabling the time statistics option on the server side might affect performance.

This article presents a workaround to get this information so VMware GemFire users can hook up to any tool or code it for daily (365 days and 24 x 7) monitoring.

Environment

Product Version: 9.5

Resolution

There is a way to parse a gfs file using the org.apache.geode.internal.SystemAdmin class.


1. The following script can be used to get the putAllRequest line:

java -classpath $GEODE/lib/geode-dependencies.jar org.apache.geode.internal.SystemAdmin stats :CacheServerStats.putAllRequests -archive=cacheserver.gfs -nofilter | grep max=

The output will be the following:

putAllRequests operations: samples=732 min=0 max=1000 average=984.53 stddev=118.12 last=1000

2. The following script can be used to get just the putAllRequest max:

java -classpath $GEODE/lib/geode-dependencies.jar org.apache.geode.internal.SystemAdmin stats :CacheServerStats.putAllRequests -archive=cacheserver.gfs -nofilter | grep max= | cut -f7 -d' ' | cut -f2 -d=

The output will be the following:

1000

3. The following script can be used to get the processPutAllTime line:

java -classpath $GEODE/lib/geode-dependencies.jar org.apache.geode.internal.SystemAdmin stats :CacheServerStats.processPutAllTime -archive=cacheserver.gfs -nofilter | grep max=

The output will be the following:

processPutAllTime nanoseconds: samples=818 min=0 max=4229101947 average=4172826713.66 stddev=459746271.4 last=4229101947


The following script can be used to get just the processPutAllTime max:

java -classpath $GEODE/lib/geode-dependencies.jar org.apache.geode.internal.SystemAdmin stats :CacheServerStats.processPutAllTime -archive=cacheserver.gfs -nofilter | grep max= | cut -f7 -d' ' | cut -f2 -d=

The output will be as following:

4229101947

This can be done with these CacheServerStats:

  • putRequests/processPutTime
  • getRequests/processGetTime
  • destroyRequests/processDestroyTime
  • putAllRequests/processPutAllTime
  • getAllRequests/processGetAllTime
  • removeAllRequests/processRemoveAllTime
  • queryRequests/processQueryTime