How to Increase WebApp Client and Server Memory Allocation
search cancel

How to Increase WebApp Client and Server Memory Allocation

book

Article ID: 192748

calendar_today

Updated On: 08-10-2023

Products

Spectrum Network Observability

Issue/Introduction


In larger environments, it may be necessary to increase the memory allocation to the OneClick Webapp Client so that it will perform better and in some cases not crash due to out of memory conditions. This document will show how to increase the Spectrum WebTomcat memory allocation from the default 1024m to the desired amount (ex. 2048m, 3072m ..etc)

Environment

Release : All Supported Releases

 

Resolution


The memory allocation for the OneClick Webapp Client is specified within the WebSwing configuration file webswing.config.  Please note that we do not recommend to assign more than 4GB to the webapp client as it can have negative affects.  In Linux the max memory assigned to each client is reserved when each new client logs in.

There are 2 ways to update the value

1. Manually

           Edit: $SPECROOT/webtomcat/webswing/webswing.config
Search for: "vmArgs"
    Change: -Xmx1024m  -TO-  -Xmx2048m (or higher if needed)

Restart Webtomcat
   cd $SPECROOT/webtomcat/bin
   ./stopWebTomcat.sh
   ./startWebTomcat.sh

 

2. Via the WebSwing Configuration GUI

  • Access the WebSwing gui using the webtomcat port (default: 9443)

    http://<OneClickServer>:9443/spectrum

  • Login using spectrum / spectrum (this is a webswing auth not spectrum)



  • Click on 'Manage'




  • Click the 'Config' Button




  • Under 'Java - Applications' locate the 'JVM Arguments' and adjust the memory value to -Xmx2048m




  • Scroll Up and Click 'Apply' for the changes to be saved




  • Restart Webtomcat

    cd $SPECROOT/webtomcat/bin
    ./stopWebTomcat.sh
    ./startWebTomcat.sh

 

To Increase WebApp Tomcat Server Memory:

below we are setting 8 gb as an example.

For windows :

Go to %SPECROOT%webtomcat/bin> ./tomcat9 //US//SpectrumWebTomcat --JvmMx=8192                    à           Upgrades webtomcat memory to 8GB

 

For Linux:

Edit the $SPECROOT/webtomcat/bin/catalina.sh file and update the value -Xmx=8192                                           à           Upgrades webtomcat memory to 8GB

 

 

Additional Information

Note:

  • Each instance of the Webapp launched runs a separate java instance on the OneClick server.
  • Make sure the Server has enough memory available for the total number of concurrent Webapp instances that will be initiated.