HCL Commerce Version or later

hcl-cache-benchmark utility

The hcl-cache-benchmark utility enables you to benchmark HCL Cache operations, such as Put, Get, Invalidate, and Clears.

This utility gives you a reference for how long each operation takes from the client. The performance of the client, network and Redis server will impact the results.

As there is a network round-trip with each cache operation, the numbers reported represent average responses from the client's perspective, and not the limits of the Redis server. For reference, cache operations such as Gets and Puts should take about a millisecond. The performance of clear and invalidation operations will vary depending on the amount of data in the Redis server and the amount of data being cleared.

When using this tool in a production environment, consider that it can have an impact on the system. Also, depending on the configuration used for number of keys and payload size, the Redis server's memory could be full. By default, the tool will attempt to insert 50,000 keys each with a 2k footprint, leading to a temporary use of Redis memory of up to 100mb.

When working on clustered environments, only one server will be tested. The default cache (RemoteOnlyCache1) is mapped to slot 3205. Other nodes can be used by switching the cache name, as follows:
   3205 {cache-benchmark-services/cache/benchmark/RemoteOnlyCache1}
  15590 {cache-benchmark-services/cache/benchmark/RemoteOnlyCache2}
  11463 {cache-benchmark-services/cache/benchmark/RemoteOnlyCache3}
   7200 {cache-benchmark-services/cache/benchmark/RemoteOnlyCache4}


java -jar hcl-cache-benchmark parameters

Parameter values

-c,--cache Cache Name
Cache name. Defaults to services/cache/benchmark/RemoteOnlyCache1 under benchmark namespace.
Prints this usage information.
-k,--keys Number of Keys
Number of keys to insert. Defaults to 50000.
Do not show the warning and prompt for confirmation before starting the benchmark.
-z,--size Value Size
Value size. Defaults to 2048 bytes.