Set the QuerySurge™ Application Server’s Memory Allocation (Linux)
1) Make sure all users are out of the system and that no Scenarios are executing.
2) Log into the QuerySurge Application Server as Administrator.
3) On your QuerySurge Application server, stop your QuerySurge Agent, Statsmon and Tomcat services with following commands (not all of these may be installed on your App server):
service QuerySurge stop agent
service QuerySurge stop statsmon
service QuerySurge stop tomcat
4) Navigate to the QuerySurge /tomcat/scripts directory, which is found at:
/<QuerySurge Install Dir>/QuerySurge/tomcat/scripts
Using the default install location, this is at:
/opt/QuerySurge/tomcat/scripts/
5) Make a copy of the file ctl.sh:
cp ctl.sh ctl.sh.orig
6) Edit the ctl.sh file using a text editor. Change the Xmx values in the java launch lines to your chosen value. Be sure to make no accidental changes to the file other than these values.
The defaults are 768m (768 MB):
start_tomcat() {
export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=512m -Xms128m -Xmx768m -Dcom.sun.management.jmxremote"
and
daemon_tomcat() {
export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=512m -Xms128m -Xmx768m -Dcom.sun.management.jmxremote"
7) If we edited these lines to use 2000 MB, they would look like:
start_tomcat() {
export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=512m -Xms128m –Xmx2000m -Dcom.sun.management.jmxremote"
and
daemon_tomcat() {
export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=512m -Xms128m –Xmx2000m -Dcom.sun.management.jmxremote"
8) Save the file.
Start the QuerySurge services:
service QuerySurge start tomcat
service QuerySurge start statsmon
service QuerySurge start agent
9) If you have other QuerySurge Agents deployed on other boxes, they will need a re-start as well.