BenchmarkHierarchicalClient example is an interactive C# program that uses Microsoft .NET Framework 2.0 to access the GemFire C++ API for benchmarking performance between a client and a server.
Microsoft .NET Framework 2.0 must be installed before running this example. For information about installing the .NET Framework, see the GemFire Enterprise Native Client Guide.
BenchmarkHierarchicalClient measures the time it takes for a
put operation to return in a hierarchical cache configuration. In this test, the client does the
put and its BridgeWriter automatically forwards the
put to the server. Consequently, the measurement includes the time required to send the data to the server.
To run the server and client on separate machines, you need to modify the client configuration file,
BenchmarkHierarchicalClient.xml, changing the two occurrences of the endpoints parameter string,
localhost, to the name of the server's machine.
Examples that interact with a Java cache server require specific environment configurations so the Java cache server will run properly. Follow the configuration steps listed below that apply to your operating system:
GF_JAVA_HOMEenvironment variables to your installed Java JRE or JDK. See the Installation chapter of the GemFire Enterprise System Administrator's Guide for the versions of Java that are compatible with GemFire Enterprise. The
JAVA_HOMEsetting is for your applications, and
GF_JAVA_HOMEis for the GemFire scripts. You must have a compatible Java JRE or JDK installed and you must set
GF_JAVA_HOMEto point to it.
$JAVA_HOME/binto the start of your
The following is a list of the environment configuration commands for the
BenchmarkHierarchicalClient example. Choose the set of commands that are appropriate for your operating system. The text that you type is shown in bold.
These configurations only need to be performed for the sessions that invoke the Java cache server.
Bourne and Korn shells (sh, ksh, bash)
% cd GemFireInstallDirectory
% CLASSPATH=$CLASSPATH:$GEMFIRE/quickstart/classes; export CLASSPATH
% cd $GEMFIRE/quickstart
% JAVA_HOME=<installed JRE PATH>; export JAVA_HOME
% GF_JAVA_HOME=$JAVA_HOME; export GF_JAVA_HOME
% PATH=$JAVA_HOME/bin:$PATH; export PATH
> cd GemFireInstallDirectory
> set CLASSPATH=%GEMFIRE%\quickstart\classes;%CLASSPATH%
> cd %GEMFIRE%\quickstart
> set JAVA_HOME=<installed JRE PATH>
> set GF_JAVA_HOME=%JAVA_HOME%
> set PATH=%JAVA_HOME%\bin;%PATH%
To start the
BenchmarkHierarchicalClient example, create a session from the GemFire Enterprise product installation directory and complete the following steps. Throughout this example, when you're prompted to enter the native client directory, replace the
NativeClient_xxxx with the actual four-digit product version number.
This first session starts the Java cache server.
Configure the session environment according to the steps listed in Configuring the Environment.
In the client session
The benchmarking tests may take several moments to finish. After the benchmarking is complete, the following statistical categories are reported in the client session:
Benchmark Averages (Mean)
Best Benchmark Results
When you have finished reviewing the benchmarking results, press
Enterto end the
BenchmarkHierarchicalClientapplication. Next, type
Exitto close the session.
In the server session
Enterto end the cache server, then type
Exitto close the session.
This product ships configured to run with default system properties. If you need to run in a non-default configuration, GemFire also takes a system-level configuration file. To configure a .NET client, rename any
gfcpp.properties file currently in the example directory, then copy
gfcpp.properties file into your
cli_BenchmarkHierarchicalClient directory from the
defaultSystem directory. Edit the
gfcpp.properties file in your
cli_BenchmarkHierarchicalClient directory, as needed.
If you also need to make a non-default configuration for the Java cache server, rename any
gemfire.properties file currently in the
%GEMFIRE%/quickstart, then copy
gemfire.properties into the
/quickstart directory from the
%GEMFIRE%/defaultConfigs directory and edit it. For example, to change the name of the
cache.xml file, uncomment this line and change the file name:
When you're done with the example, delete your edited versions of
gfcpp.properties, then restore the renamed original versions to their original names so other examples can use the unedited files.
Copyright © 2005-2008 by GemStone Systems, Inc. All rights reserved. GemStone®, GemFire®, and the GemStone logo are trademarks or registered trademarks of GemStone Systems, Inc. All other trade names or trademarks are the property of their respective owners. Information in this document is subject to change without notice.