Customer Service Center
Home
Knowledge Base
Contact Support
License Activation
|
Contact Support
|
License Activation
|
Spirent KB Article
Doc ID: SOL14581
Printer Friendly
Email Article Link
Gateway: How to increase the memory available to the Inventory Gateways and SpirentWebTest.
Objective/Summary
Provide steps to increase the memory available to the InventoryGateways and SpirentWebTest.
Environment/Versions
SpirentWebTest
Tomcat based Inventory Gateways including but not limited to:
GraniteInventory
OewGcpGateway
SamGateway
SareaGateway
SSCInventoryGateway
Procedure
To increase the memory available to the Gateway you update the Tomcat 'setclasspath.sh' script.
Identify the "bin" directory of the Tomcat instance:
cd /spirent/CenteropGateway/
GATEWAY
Where:
GATEWAY
is the name of the Gateway or SpirentWebTest.
Example:
cd /spirent/CenterOpGateway/SSCInventoryGateway
ls -l start stop
The result will show links to the Tomcat startup and shutdown scripts similar to this:
=> ls -l start stop
lrwxrwxrwx. 1 smartsys staff 60 May 26 2020 start -> /spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/startup.sh
lrwxrwxrwx. 1 smartsys staff 61 May 26 2020 stop -> /spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/shutdown.sh
Navigate to the bin directory noted by the link. In the above case:
cd /spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/
Update the "setclasspath.sh" script with the new memory settings:
cp setclasspath.sh setclasspath.sh.old
vi setclasspath.sh
Near the top of the file will be a "JAVA_OPTS" setting that includes "-XmsAAAm -XmxBBBm" Where "AAAm" and "BBBm" is the amount of memory for the process in megabytes. The -XmsAAAm setting controls the minimum amount of memory the process will allocate. The "-XmxBBBm" setting controls the Maximum amount of memory the process can allocate in megabytes.
Example:
export JAVA_OPTS="-Xms128m -Xmx512m -Djava.util.Arrays.useLegacyMergeSort=true"
In this example the process will initially allocated 128MB of memory and can reach a maximum of 512MB of memory.
Modify the "-Xmx" setting with the new maximum amount of memory the process can allocate.
Example - changing above from 512MB max to 1024MB max:
export JAVA_OPTS="-Xms128m -Xmx1024m -Djava.util.Arrays.useLegacyMergeSort=true"
Stop and start the Gateway/Tomcat process
cd /spirent/CenteropGateway/
GATEWAY
Where:
GATEWAY
is the name of the Gateway or SpirentWebTest
./stop
Wait for the process to stop by issuing a ps statement for the tomcat path. It will take a few minutes for the process to stop:
ps -ef | grep "the tomcat path to bin" | grep -v grep
Where "the tomcat path to bin" is the path to tomcat bin as noted in the stop and start links.
Example:
ps -ef | grep "/spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/" | grep -v grep
Once the process has stopped, start the Gateway by issuing:
./start
Verify the tomcat process is running with the new memory value using the ps statement from step 4 and checking the -Xmx setting.
ps -ef | grep "the tomcat path to bin" | grep -v grep
Example:
ps -ef | grep "/spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/" | grep -v grep
smartsys 16159 1 99 13:38 pts/0 00:00:12 /spirent/cots/java/1.8/jre/bin/java -Djava.util.logging.config.file=/spirent/CenterOpGateway/apache-tomcat/6.0.53/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Xms128m -Xmx1024m
-Djava.util.Arrays.useLegacyMergeSort=true -Djdk.tls.ephemeralDHKeySize=2048 -Djava.endorsed.dirs=/spirent/CenterOpGateway/apache-tomcat/6.0.53/endorsed -classpath /spirent/CenterOpGateway/apache-tomcat/6.0.53/bin/bootstrap.jar -Dcatalina.base=/spirent/CenterOpGateway/apache-tomcat/6.0.53 -Dcatalina.home=/spirent/CenterOpGateway/apache-tomcat/6.0.53 -Djava.io.tmpdir=/spirent/CenterOpGateway/apache-tomcat/6.0.53/temp org.apache.catalina.startup.Bootstrap start
Version
2.0
Publish Date
2021-06-14
Categories
Product : TEST PORTAL,GRANITE,Gateway
Related Articles