Administration guide > Tune and performance > Use WebSphere Real Time
WebSphere Real Time in a stand-alone environment
Use WebSphere Real Time with WebSphere eXtreme Scale. By enabling WebSphere Real Time, you can get more predictable garbage collection along with a stable, consistent response time and throughput of transactions in a stand-alone eXtreme Scale environment.
Advantages of WebSphere Real TimeWebSphere eXtreme Scale creates many temporary objects that are associated with each transaction. These temporary objects deal with requests, responses, log sequences, and sessions. Without WebSphere Real Time, transaction response time can go up to hundreds of milliseconds. However, using WebSphere Real Time with WebSphere eXtreme Scale can increase the efficiency of garbage collection and reduce response time to 10% of the stand-alone configuration response time.
Enable WebSphere Real Time
Install WebSphere Real Time and stand-alone WebSphere eXtreme Scale onto the computers on which you plan to run eXtreme Scale. Set the JAVA_HOME environment variable to point to a standard Java™ SE Runtime Environment (JRE).
Set the JAVA_HOME environment variable to point to the installed WebSphere Real Time. Then enable WebSphere Real Time as follows.
- Edit the stand-alone installation objectgridRoot/bin/setupCmdLine.sh | .bat file by removing the comment from the following line.
WXS_REAL_TIME_JAVA="-Xrealtime -Xgcpolicy:metronome -Xgc:targetUtilization=80"
- Save the file.
Now you have enabled WebSphere Real Time.
To disable WebSphere Real Time, you can add the comment back to the same line.
WebSphere Real Time allows eXtreme Scale transactions to have a more predictable response time. Results show that the deviation of an eXtreme Scale transaction's response time improves significantly with WebSphere Real Time compared to standard Java with its default garbage collector. Enabling WebSphere Real Time with eXtreme Scale is optimal if the application's stability and response time are essential.
The best practices described in this section explain how to make WebSphere eXtreme Scale more efficient through tuning and code practices depending on the expected load.
- Set right level of processor usage for the application and garbage collector.
WebSphere Real Time provides capacity to control the processor usage so that garbage collection impact on the application is controlled and minimized. Use the -Xgc:targetUtilization=NN parameter to specify NN percentage of the processor that is used by the application in every 20 seconds. The default for WebSphere eXtreme Scale is 80%, but you can modify the script in objectgridRoot/bin/setupCmdLine.sh file to set different number such as 70, which provides more processor capacity to the garbage collector. Deploy enough servers to maintain processor load under 80% for the applications.
- Set a larger size of heap memory.
WebSphere Real Time uses more memory than regular Java, so plan the WebSphere eXtreme Scale with a large heap memory and set the heap size when you start catalog servers and containers with the –jvmArgs –XmxNNNM parameterin the ogStartServer command. For example, to you might use –jvmArgs –Xmx500M parameter to start catalog servers, and use appropriate memory size to start containers. You can set the memory size to 60-70% of the expected data size per JVM. If you do not set this value, a OutOfMemoryError error could result. Optionally, you also can use the –jvmArgs –Xgc:noSynchronousGCOnOOM parameterto prevent nondeterministic behavior when the JVM runs out of memory.
- Adjust threads for garbage collection.
WebSphere eXtreme Scale creates a lot of temporary objects associated with each transaction and Remote Procedure Call (RPC) threads. Garbage collection has performance benefits if the computer has enough processor cycles. The default number of threads is 1. You can change the number of threads with the –Xgcthreads n argument. The suggested value of this argument is the number of cores that are available with consideration of the number of JVMs per computer.
- Adjust the performance for short-running applications with WebSphere eXtreme Scale.
WebSphere Real Time is tuned for long running applications. Usually run WebSphere eXtreme Scale continuous transactions for two hours to get reliable performance data. Use the –Xquickstart parameter to make the short-running applications perform better. This parameter tells just-in-time (JIT) compiler to use lower level of optimization.
- Minimize WebSphere eXtreme Scale client queue and WebSphere eXtreme Scale client relay.
The main advantage of using WebSphere eXtreme Scale with WebSphere Real Time is to have highly reliable transaction response time, which usually has several times of order magnitude improvements on the deviation of transaction response time. Any queued client requests and client request relay through other software impacts the response time that is beyond the control of WebSphere Real Time and WebSphere eXtreme Scale. You should change the threads and sockets parameters to maintain steady and smooth load without any significant delay and decrease the queue depth.
- Write WebSphere eXtreme Scale applications to use WebSphere Real Time threading.
Without modifying the application, you can get highly reliable WebSphere eXtreme Scale transaction response time with several order magnitude improvements on the deviation of response time. You can further exploit threading advantage of the transactional applications from regular Java thread to RealtimeThread which provides better control on thread priority and scheduling control.
Your application currently includes the following code.
public class WXSCacheAppImpl extends Thread implements WXSCacheAppIF
You can optionally replace this code with the following.
public class WXSCacheAppImpl extends RealtimeThread implements WXSCacheAppIF
Parent topic:Use WebSphere Real Time
WebSphere Real Time in WAS