Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2005Q1 Administration Guide 

Chapter 19
Tuning the Portal Server

This chapter describes the configuration parameters for optimizing the performance and capacity of the Sun Java™ System Portal Server. The perftune script (in PortalServer-base/SUNWps/bin directory), bundled with Portal Server, automates most of the tuning process discussed in this chapter.

Updates to the perftune script for this release include:


Introduction

The perftune script:


Tuning Instructions

To run the perftune script:

  1. Log in to the machine and become super user.
  2. You need root access to run this script.

  3. Change directories to PortalServer-base/SUNWps/bin.
  4. Enter:
  5. ./perftune.

The perftune script performs start and stop operation of servers during tuning process. It creates backup copies of modified files in filename-orig-date-pid format. Reboot the system after running the script to take effect tuning changes.

Solaris Tuning

Kernel Tuning

To the /etc/system file, the script appends the following setters:

The original file (/etc/system) will be copied to a file of the format:

/etc/system-orig-’$DATE+%y%m%d’-$$


Note

Most of the files get backed up. The script creates backup copies of modified files in respective directories in the following format: filename-orig-date-pid


TCP Parameters Tuning

Changes to TCP parameters (shown within parenthesis) in /dev/tcp include:

In order to execute the ndd commands automatically when the system is rebooted, the perftune script copies the S99ndds_tcp file into /etc/rc2.d/ directory.

Sun Java System Access Manager Tuning

Directory Server Connection Pool

Changes made to the /etc/opt/SUNWam/config/serverconfig.xml file are as follows:

LDAP Authentication Service

Sun Java System Access Manager Services Configuration Parameters

Changes are made to the /etc/opt/SUNWam/config/AMConfig.properties file as follows:

Polling mode is enabled if Access Manager and Portal Server are installed on separate machines. Polling mode provides the following options:

The following threadpool properties in the /opt/SUNWam/lib/AMConfig.properties file are exposed in Portal Server 6:

Sun Java System Directory Server Tuning

If the Sun Java™ System Directory Server is shared by other applications, you may need to verify that those parameters are not conflicting with the other application’s parameters tuning.

Enough virtual memory space must be provisioned for /tmp/slapd-DSinstance1 and the total amount of used memory, including the allocated for database caching, should not exceed the size of physical memory to avoid paging. In any events, the cumulative values of nsslapd-dbcachesize + nsslapd-cachememsize + fixed memory used for slapd process itself cannot exceed the 4 GB of process address space. Nsslapd is a 32-bit application.

With regard to the sizing of resources pooling (connections and threads), Sun Java System Directory Server provides best performance with a concurrency level of around 15 for search type of operations.

The perftune script tunes ns-slapd threading, db cache and database file system mapping in the /var/opt/mps/serverroot/slapd-hostname/config/dse.ldif file as follows:

Sun Java System Web Server 6.1 Tuning

The following describe the JVM tuning offered by the perftune script to help tune Sun Java™ System Web Server for Portal Server performance.

  1. Specifies the following in magnus.conf located at WebServer-base/SUNWwbsvr/https-hostname/config
    • RqThrottle 256
    • RqThrottleMin 128
    • StackSize 393216
    • ThreadIncrement 20
    • ConnQueueSize 4096
    • ListenQ 4096

    • Note

      The WebServer-base/SUNWwbsvr/https-hostname/config/
      magnus.conf
      file is backed up in the format:

      filename-orig-date-pid


  2. Specifies the following in server.xml file at WebServer-base//https-hostname//config for JVM Tuning:
    • -Xms3G (This value is set to 3G if memory is available, otherwise, by default, the Xms value is set to 128)
    • -Xmx3G (This value is set to 3G if memory is available, otherwise, by default, the Xmx value is set to 128)
    • -Xss128K
    • -Xloggc:/var/opt/SUNWappserver7/domains/domain1/
      server1/logs/gclog
    • -XX:NewSize=384M
    • -XX:MaxNewSize=384M
    • -XX:MaxPermSize=64M
    • -XX:PermSize=64M
    • -XX:+UseParNewGC
    • -XX:+UseConcMarkSweepGC
    • -XX:MaxTenuringThreshold=1
    • -XX:SoftRefLRUPolicyMSPerMB=1
    • -XX:+CMSClassUnloadingEnabled
    • -XX:+CMSPermGenSweepingEnabled
    • -XX:+PrintGCTimeStamps
    • -XX:+ShowMessageBoxOnError
    • -XX:+OverrideDefaultLibthread
    • -XX:+DisableExplicitGC
    • -XX:+PrintGCDetails
    • -XX:+PrintClassHistogram

Sun Java System Application Server 7.0 Tuning

When deploying the Portal Server on the Sun™ Java System Application Server, the minimum and maximum heap size for the application server instance is set to 3 Gbytes.

The perftune script now includes a safeguard that prevents the perftune script from tuning a system that does not allow for a 3 Gbyte heap for the JVM.

The following describe the JVM tuning offered by the perftune script to help tune Sun Java™ System Application Server for Portal Server performance.

  1. Specifies the following in init.conf located at Deplaoy_Domain/Deploy_Instance/config
    • RqThrottle 256
    • RqThrottleMin 128
    • StackSize 393216
    • ThreadIncrement 20
    • ConnQueueSize 4096
    • ListenQ 4096

    • Note

      The Deplaoy_Domain/Deploy_Instance/config/init.conf file is backed up in the format:

      filename-orig-date-pid


  2. Specifies the following JVM parameters in Deplaoy_Domain/Deploy_Instance/config/sever.xml:
  3. -Xms3G (This value is set to 3G if memory is available, otherwise, by default, the Xms value is set to 128)
  4. -Xmx3G (This value is set to 3G if memory is available, otherwise, by default, the Xmx value is set to 128)
  5. -Xss128K
  6. -Xloggc:/var/opt/SUNWappserver7/domains/domain1/server1/logs/gclog
  7. -XX:NewSize=384M
  8. -XX:MaxNewSize=384M
  9. -XX:MaxPermSize=64M
  10. -XX:PermSize=64M
  11. -XX:+UseParNewGC
  12. -XX:+UseConcMarkSweepGC
  13. -XX:MaxTenuringThreshold=1
  14. -XX:SoftRefLRUPolicyMSPerMB=1
  15. -XX:+CMSClassUnloadingEnabled
  16. -XX:+CMSPermGenSweepingEnabled
  17. -XX:+PrintGCTimeStamps
  18. -XX:+ShowMessageBoxOnError
  19. -XX:+OverrideDefaultLibthread
  20. -XX:+DisableExplicitGC
  21. -XX:+PrintGCDetails
  22. -XX:+PrintClassHistogram

  23. Note

    The Deplaoy_Domain/Deploy_Instance/config/server.xml file is backed up in the format:

    filename-orig-date-pid



    Note

    If -Djava.security.policy is present in the file Deplaoy_Domain/Deploy_Instance/config/server.policy, -Djava.security.policy is replaced by -Djava.security.policy=Deplaoy_Domain/Deploy_Instance/config/
    server.policy.NEVERUSED


Setting Additional Sun Java System Application Server Parameters for Gateway Reliability

To achieve optimal performance using Secure Remote Access, configure your implementation as follows:

  1. Modify the AccessManager-base/SUNWam/lib/AmConfig.properties file to set the notification threadpool size for the application server. At the top of the file just below the following lines:
  2. Sun, Sun Microsystems, the Sun logo, and iPlanet

    * are trademarks or registered trademarks of Sun Microsystems,

    * Inc. in the United States and other countries.

    add the following lines to set the threadpool size to 200:

    /*Notification Thread Pool Size*/ com.iplanet.am.notification.threadpool.size=200

  3. Log into the Portal Server administration console with the user name amadmin and the passphrase you entered during the installation.
  4. Select Service Management in the View menu.
  5. Select SRA Configuration and then Gateway.
  6. Select the default server and click Edit.
  7. Check the Enable HTTP Connections checkbox.
  8. In the HTTP Port field, type 80 and click Save.
  9. Log in to the Sun Java System Application Server administration console as administrator (admin) by entering http://fullservername:port in your browser’s web address field. The default port is 4848. Use the password you entered at installation.
  10. Select the application server instance where you installed the Access Manager.
  11. Click JVM Settings and then JVM Options.
  12. In the JVM Option field, enter the following string:
  13. -Dhttp.keepAlive=false

  14. Click Add and then Save.
  15. Select the application server instance on which you will install Portal Server.
  16. The right pane shows that the configuration has changed.

  17. Click Apply Changes.
  18. Click Restart.
  19. The application server should automatically restart.
  20. On the server where the gateway is installed, go to the /opt/SUNWps/bin/perf directory and enter the following to run a script that will set tuning parameters for Secure Remote Access:
  21. ./perftune

  22. Modify the AccessManager-base/SUNWam/lib/AmConfig.properties file to set the notification threadpool size for the gateway. At the top of the file just below the following lines:
  23. Sun, Sun Microsystems, the Sun logo, and iPlanet

    * are trademarks or registered trademarks of Sun Microsystems,

    * Inc. in the United States and other countries.

    add the following lines to set the threadpool size to 200:

    /*Notification Thread Pool Size*/ com.iplanet.am.notification.threadpool.size=200

  24. Go to the /opt/SUNWps/bin directory and modify the gateway file to set the -Dhttp.keepAlive option to false and to increase the settings for the -Xms and -Xmx heap size options.
  25. Define the CMD settings options as follows:

  26. Note

    Define the CMD settings as one line.


    CMD="$JAVA_HOME/bin/java -server -Xms3G -Xmx3G -XX:+OverrideDefaultLibthread -Xss128K
    -XX:MaxPermSize=64M -XX:PermSize=64M -XX:MaxNewSize=512M
    -XX:NewSize=512M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
    -XX:MaxTenuringThreshold=1
    -XX:SoftRefLRUPolicyMSPerMB=1
    -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
    -XX:+PrintGCDetails
    -XX:+PrintGCTimeStamps -XX:+PrintClassHistogram
    -XX:+ShowMessageBoxOnError -XX:+DisableExplicitGC
    -Xloggc:/var/opt/SUNWps/debug/gclog.$GW_INSTANCE -classpath $CLASSPATH $DEFINES1 $DEFINES2 $DEFINES3 $DEFINES4 $DEFINES5
    $PROXY_DEFINES $BOOT_CLASSPATH com.sun.portal.netlet.eproxy.EProxy"

  27. Modify the /etc/opt/SUNWps/platform.conf.default file to set the gateway.protocol parameter to http and the gateway.port parameter to port 80 as follows:
  28. gateway.protocol=http

    gateway.port=80

  29. Restart the gateway for the changes to take effect by typing the following command:
  30. PortalServer-base/SUNWps/bin/gateway -n default start

    where default is the default gateway profile created during installation.

Portal Server Desktop Tuning

The caller parameters are used to size the thread pool to render content through the providers. The caller pool is initialized to size 0. Items are added to the pool as they are used and returned. The caller pool can expand to a very large size, however, in the normal case it will only be as big as the number of channels on the user’s Portal Desktop. In cases where there are multiple concurrent threads with the same sid, the pool may expand to an size that is n * m, where n = the number of concurrent same-sid threads and m = the number of channels on the Portal Desktop for the given sid.

The perftune script changes the following parameters for optimizing the Provider Caller Resource Pooling, in the /etc/opt/SUNWps/desktop/desktopconfig.properties file:

To minimize unnecessary memory growth due to spawning of Portal Desktop caller threads when performing long-run tests, these properties (except for templateScanInterval) should be changed back to their original default values.

Make the following changes to these properties:



Previous      Contents      Index      Next     


Copyright 2005 Sun Microsystems, Inc. All rights reserved.