チューニングにより、Portal Server のパフォーマンスを向上させることができます。
Portal Server の配備に適用できるチューニングの中で、Web コンテナの JVM チューニングはもっとも重要です。チューニングスクリプトを使用してその設定を適用すること、およびそれらのスクリプトによって加えられた変更を理解することが重要です。それらのスクリプトを実行できるようにするには、設定ファイルを編集する必要があります。
このファイルに含まれるチューニング可能なパラメータは、Portal Server のパフォーマンスにとって非常に重要なものです。それらのパラメータ、特に Web コンテナに割り当てられるメモリーの量を決定するパラメータを、注意深く確認してください。
JVM のスケーラビリティーが大幅に向上することで、Portal アプリケーションも新しい JVM パラメータを活用できるため、結果的にパフォーマンスが向上します。Web コンテナの最適な設定では、2G バイトの Java ヒープを必要とします。Portal Server インスタンスを CPU にバインドすれば、1 つのインスタンスに CPU を 4 つまで拡張できます。複数の Portal Server のインスタンスを使用する場合は、さらに CPU を追加できます。
ポータルの各バージョンは、製品に付属の JVM バージョンでの JVM チューニングのための認定を受けています。認定を受けていない JVM の使用は、サポートも推奨もされていません。すべてのコンポーネント製品も同じサーバーに配備される本稼働環境で Portal Server を配備する場合は、4G バイト以上の RAM を持つマシンを使用することをお勧めします。
システムが、Portal Server のみに使用されていることを前提としています。Access Manager および Directory Server のリソースがほかのアプリケーションによって消費されている場合は、適切なチューニングを検討する必要がある場合があります。
Access Manager のパフォーマンスユーティリティー amtune を使用して、Directory Server、Access Manager、Web コンテナ、およびオペレーティングシステムの設定をチューニングできます。Java Enterprise System ソフトウェアのデフォルトのインストールでは、/opt/SUNWam/bin/amtune/amtune に格納されます。上記のほかに、Portal 製品には、perftune (/opt/SUNWportal/bin/) という名前のユーティリティースクリプトが付属しています。このスクリプトは、Directory Server、Access Manager、Web コンテナ、TCP/IP 設定、カーネル設定、および Portal Server の設定をチューニングします。これらが同じ Web コンテナに配備されている場合、実際には、perftune が amtune を呼び出して、チューニングの前半部分を設定します。Portal Server の管理者は、上記のユーティリティーによって推奨されているチューニングについて理解しておく必要があります。これらのチューニングは、本稼働システムで使用する前に、まず、ステージングおよび品質保証環境で検証する必要があります。
デフォルトでは、amtune は、REVIEW モードで動作するように設定されています。このモードでは、amtune は、チューニングの推奨事項を提示しますが、配備に対する変更は行いません。これは、安全な実行モードです。このパラメータおよびほかのパラメータは、/opt/SUNWam/bin/amtune/amtune-env という名前のファイルで定義されています。amtune スクリプトは、ポータルの適切なチューニングパラメータを定義するための、便利な出発点です。
amtune を呼び出すには、次のコマンドを使用します。
amtune directory-server-admin-password web-server-admin-password
以下が表示されます。
Debug information log can be found in file: /var/opt/SUNWam/debug/amtune-20061124-6300 ############################################################ ./amtune : 11/24/06 18:25:41 ############################################################ Initializing... ------------------------------------------------------------- Checking System Environment... Checking User... Checking Web Server JVM mode (32-bit or 64-bit) for web server 7... -------------------------------------------------------------- amtune Information... -------------------------------------------------------------- amtune Mode : REVIEW OS : true Access Manager : true Directory : true Web Container : true WS Mode : 32-bit --------------------------------------------------------------- Detecting System Environment... --------------------------------------------------------------- Number of CPUs in the system : 2 WS Acceptor Threads : 2 Memory Available (MB) : 2048 Memory to Use (MB) : 1536 There is enough memory. ---------------------------------------------------------------- Calculating Tuning Parameters... ---------------------------------------------------------------- Max heap size (MB) : 1344 Min Heap size (MB) : 1344 Max new size (MB) : 168 Cache Size (MB) : 448 SDK Cache Size (KB) : 298 Number of SDK Cache Entries : 38144 Session Cache Size (KB) : 149 Number of Session Cache Entries : 38144 Maximum Number of Java Threads : 672 Maximum Number of Thread Pool : 280 LDAP Auth Threads : 28 SM LDAP Threads : 28 Notification Threads : 14 Notification Queue Size : 38144 ================================================================= Access Manager Tuning Script ----------------------------------------------------------------- Solaris Tuning Script ----------------------------------------------------------------- Solaris Kernel Tuning... File : /etc/system Parameter tuning : 1. rlim_fd_max Current Value : rlim_fd_max= Recommended Value : rlim_fd_max=65536 2. rlim_fd_cur Current Value : rlim_fd_cur= Recommended Value : rlim_fd_cur=65536 ----------------------------------------------------------------- Solaris TCP Tuning using ndd... File : /etc/rc2.d/S71ndd_tcp Parameter tuning : 1. /dev/tcp tcp_fin_wait_2_flush_interval Current Value : /dev/tcp tcp_fin_wait_2_flush_interval 675000 Recommended Value : /dev/tcp tcp_fin_wait_2_flush_interval 67500 2. /dev/tcp tcp_conn_req_max_q Current Value : /dev/tcp tcp_conn_req_max_q 128 Recommended Value : /dev/tcp tcp_conn_req_max_q 8192 3. /dev/tcp tcp_conn_req_max_q0 Current Value : /dev/tcp tcp_conn_req_max_q0 1024 Recommended Value : /dev/tcp tcp_conn_req_max_q0 8192 4. /dev/tcp tcp_keepalive_interval Current Value : /dev/tcp tcp_keepalive_interval 7200000 Recommended Value : /dev/tcp tcp_keepalive_interval 90000 5. /dev/tcp tcp_smallest_anon_port Current Value : /dev/tcp tcp_smallest_anon_port 32768 Recommended Value : /dev/tcp tcp_smallest_anon_port 1024 6. /dev/tcp tcp_slow_start_initial Current Value : /dev/tcp tcp_slow_start_initial 4 Recommended Value : /dev/tcp tcp_slow_start_initial 2 7. /dev/tcp tcp_xmit_hiwat Current Value : /dev/tcp tcp_xmit_hiwat 49152 Recommended Value : /dev/tcp tcp_xmit_hiwat 65536 8. /dev/tcp tcp_recv_hiwat Current Value : /dev/tcp tcp_recv_hiwat 49152 Recommended Value : /dev/tcp tcp_recv_hiwat 65536 9. /dev/tcp tcp_ip_abort_cinterval Current Value : /dev/tcp tcp_ip_abort_cinterval 180000 Recommended Value : /dev/tcp tcp_ip_abort_cinterval 10000 10. /dev/tcp tcp_deferred_ack_interval Current Value : /dev/tcp tcp_deferred_ack_interval 100 Recommended Value : /dev/tcp tcp_deferred_ack_interval 5 11. /dev/tcp tcp_strong_iss Current Value : /dev/tcp tcp_strong_iss 1 Recommended Value : /dev/tcp tcp_strong_iss 2 ===================================================================== Access Manager - Web Server Tuning Script --------------------------------------------------------------------- Tuning Web Server Instance... File : /var/opt/SUNWwbsvr7/https-xxxxxx.pstest.com/config/ server.xml (using wadm command line tool) Parameter tuning : 1. Minimum Threads Current Value : min-threads=16 Recommended Value : min-threads=10 2. Maximum Threads Current Value : max-threads=128 Recommended Value : max-threads=280 3. Queue Size Current Value : queue-size=1024 Recommended Value : queue-size=8192 4. Native Stack Size Current Value : stack-size=131072 Recommended Value : Use current value 5. Acceptor Threads Current Value : acceptor-threads=1 Recommended Value : acceptor-threads=2 6. Statistic Current Value : enabled=true Recommended Value : enabled=false 7. nativelibrarypathprefix Current Value : nativelibrarypathprefix=<No value set> Recommended Value : Append /usr/lib/lwp to nativelibrarypathprefix (if Solaris 8) 8. Max and Min Heap Size Current Value : Min Heap: -Xms512M Max Heap: -Xmx768M Recommended Value : -Xms1344M -Xmx1344M 9. LogGC Output Current Value : <No value set> Recommended Value : -Xloggc:/var/opt/SUNWwbsvr7/https-xxxxxx.pstest.com/logs/gc.log 10. JVM in Server mode Current Value : <No value set> Recommended Value : -server 11. JVM Stack Size Current Value : -Xss128k Recommended Value : -Xss128k 12. New Size Current Value : -XX:NewSize=168M Recommended Value : -XX:NewSize=168M 13. Max New Size Current Value : -XX:MaxNewSize=168M Recommended Value : -XX:MaxNewSize=168M 14. Disable Explicit GC Current Value : -XX:+DisableExplicitGC Recommended Value : -XX:+DisableExplicitGC 15. Use Parallel GC Current Value : <No value set> Recommended Value : -XX:+UseParNewGC 16. Print Class Histogram Current Value : <No value set> Recommended Value : -XX:+PrintClassHistogram 17. Print GC Time Stamps Current Value : <No value set> Recommended Value : -XX:+PrintGCTimeStamps 18. OverrideDefaultLibthread (if Solaris 8) Current Value : <No value set> Recommended Value : -XX:+OverrideDefaultLibthread 19. Enable Concurrent Mark Sweep GC Current Value : <No value set> Recommended Value : -XX:+UseConcMarkSweepGC ===================================================================== Access Manager - Directory Server Tuner Preparation Script Preparing Directory Server Tuner... --------------------------------------------------------------------- Determining Current Settings... Creating Directory Server Tuner tar file: ./amtune-directory.tar a amtune-directory 29K a amtune-utils 45K Directory Server Tuner tar file: ./amtune-directory.tar Steps to tune directory server: 1. Copy the DS Tuner tar to the DS System 2. Untar the DS Tuner in a temporary location 3. Execute the following script in 'REVIEW' mode : amtune-directory 4. Review carefully the recommended tunings for DS 5. If you are sure of applying these changes to DS, modify the following lines in amtune-directory a. AMTUNE_MODE= These parameters can also be modified or left unchange to use default values b. AMTUNE_LOG_LEVEL= c. AMTUNE_DEBUG_FILE_PREFIX= d. DB_BACKUP_DIR_PREFIX= Its highly recommended to run dsadm backup before running amtune-directory ===================================================================== Access Manager - Access Manager Server Tuning Script --------------------------------------------------------------------- Tuning /etc/opt/SUNWam/config/AMConfig.properties... File : /etc/opt/SUNWam/config/AMConfig.properties Parameter tuning : 1. com.iplanet.am.stats.interval Current Value : com.iplanet.am.stats.interval=60 Recommended Value : com.iplanet.am.stats.interval=60 2. com.iplanet.services.stats.state Current Value : com.iplanet.services.stats.state=file Recommended Value : com.iplanet.services.stats.state=file 3. com.iplanet.services.debug.level Current Value : com.iplanet.services.debug.level=error Recommended Value : com.iplanet.services.debug.level=error 4. com.iplanet.am.sdk.cache.maxSize Current Value : com.iplanet.am.sdk.cache.maxSize=10000 Recommended Value : com.iplanet.am.sdk.cache.maxSize=38144 5. com.iplanet.am.notification.threadpool.size Current Value : com.iplanet.am.notification.threadpool.size=10 Recommended Value : com.iplanet.am.notification.threadpool.size=14 6. com.iplanet.am.notification.threadpool.threshold Current Value : com.iplanet.am.notification.threadpool.threshold=100 Recommended Value : com.iplanet.am.notification.threadpool.threshold=38144 7. com.iplanet.am.session.maxSessions Current Value : com.iplanet.am.session.maxSessions=5000 Recommended Value : com.iplanet.am.session.maxSessions=38144 8. com.iplanet.am.session.httpSession.enabled Current Value : com.iplanet.am.session.httpSession.enabled=true Recommended Value : com.iplanet.am.session.httpSession.enabled=false 9. com.iplanet.am.session.purgedelay Current Value : com.iplanet.am.session.purgedelay=60 Recommended Value : com.iplanet.am.session.purgedelay=1 10. com.iplanet.am.session.invalidsessionmaxtime Current Value : com.iplanet.am.session.invalidsessionmaxtime=10 Recommended Value : com.iplanet.am.session.invalidsessionmaxtime=1 --------------------------------------------------------------------- Tuning /etc/opt/SUNWam/config/serverconfig.xml... File : /etc/opt/SUNWam/config/serverconfig.xml Recomended tuning parameters only. These paramters will not be tuned by the script. You need to modify them manually in /etc/opt/SUNWam/config/serverconfig.xml. The number should depend on number of Access Manager instances and the memory of Directory Server. Please refer to Access Manager Performance Tuning Guide. 1. minConnPool Current Value : minConnPool=1 Recommended Value : minConnPool=1 2. maxConnPool Current Value : maxConnPool=10 Recommended Value : maxConnPool=28 --------------------------------------------------------------------- Tuning LDAP Connection Pool in Global iPlanetAMAuthService... Service : iPlanetAMAuthService SchemaType : global Recomended tuning parameters only. These paramters will not be tuned by the script. If you want to tune these parameters, review data file /tmp/dsame-auth-core-tune.xml and run it with amadmin command. The number should depend on number of Access Manager instances and the memory of Directory Server. Please refer to Access Manager Performance Tuning Guide. 1. iplanet-am-auth-ldap-connection-pool-default-size Recommended Value : iplanet-am-auth-ldap-connection-pool-default-size=28:28 ===================================================================== Tuning Complete ##################################################################### |
perftune スクリプトは、amtune スクリプトを実行しますが、加えて Portal Server もチューニングします。perftune の出力の例を次に示します。
Portal Tuning Script --------------------------------------------------------------------- Tuning /var/opt/SUNWportal/portals/portal1/config/desktopconfig.properties... File : /var/opt/SUNWportal/portals/portal1/config/ desktopconfig.properties Parameter tuning : 1. callerPoolMinSize Current Value : callerPoolMinSize=0 Recommended Value : callerPoolMinSize=128 2. callerPoolMaxSize Current Value : callerPoolMaxSize=0 Recommended Value : callerPoolMaxSize=256 3. callerPoolPartitionSize Current Value : callerPoolPartitionSize=0 Recommended Value : callerPoolPartitionSize=32 4. templateScanInterval Current Value : templateScanInterval=30 Recommended Value : templateScanInterval=3600 --------------------------------------------------------------------- Tuning /var/opt/SUNWportal/portals/portal1/config/PSLogConfig.properties... File : /var/opt/SUNWportal/portals/portal1/config/ PSLogConfig.properties Parameter tuning : 1. debug.com.sun.portal.level Current Value : debug.com.sun.portal.level=SEVERE Recommended Value : debug.com.sun.portal.level=FINE ===================================================================== |
Java 仮想マシン (JVM) は、多数のスレッドの同時実行をサポートしています。パフォーマンスに役立つように、Access Manger と Portal Server は、1 つまたは複数のスレッドプールを維持します。スレッドプールを使用して、特定のタスクに割り当てられるスレッドの合計数を制限できます。上記の perftune の出力で、チューニングパラメータ callerPool の例を確認できます。ブラウザから Web コンテナに要求が渡されると、その要求は、複数のスレッドプールを通過します。スレッドプールには、一連の WorkerThread オブジェクトが含まれています。これらのオブジェクトは、プールを構成している個々のスレッドです。WorkerThread オブジェクトは、作業を受け取ると動作を開始および停止します。存在する WorkerThread 以上の作業が発生した場合、WorkerThread が解放されるまで、作業は保留されます。スレッドプールに割り当てられたスレッドが不足している場合、検出しにくいボトルネックが、システムで発生する場合があります。スレッドプールに割り当てられたスレッドが多すぎる場合も、望ましくはありませんが、重大な問題にはなりません。
RqThrottle — RqThrottle パラメータは、現在の Java Enterprise System Web コンテナが処理できる同時トランザクションの最大数を指定します。同時トランザクションの最大数は、スレッド数の上限と見なされます。
低メモリー状況 — Web コンテナを低メモリー状況で動作させる必要がある場合は、RqThrottle の値を小さくして、スレッド数の上限を最小限にまで減らします。また、 MaxProcs の値を小さくして、プロセスの最大数を減らすこともできます。Java Enterprise System Web Server では、通常、この値は 1 になります。
抑制されたサーバー — サーバーは、スレッド数の上限値を超える数のアクティブスレッドを許可しません。同時要求の数がその制限に達すると、古い接続が解放されるまで、サーバーは新しい接続の処理を停止します。古い接続の解放を待つため、応答時間が増加します。Sun Java Enterprise System の Web コンテナでは、サーバーの RqThrottle のデフォルト値は 128 です。サーバーで、さらに多くの要求を並行して処理する場合は、RqThrottle の値を大きくしてください。抑制されたサーバーの場合、その症状は応答時間が長くなることです。ブラウザから要求を送信した場合、通常、サーバーとの接続は迅速に確立されますが、抑制されたサーバーでは、クライアントに応答が戻るまでに長い時間がかかります。サーバーが抑制されているかどうかを判断する最適な方法は、アクティブセッションの数が RqThrottle で設定されている最大数に近いか、または等しくなっているかを確認することです。
Portal Server は、Access Manager のアイデンティティー管理機能およびポリシー評価機能を利用します。また、Access Manager ソリューションと緊密に統合されています。Portal Server のインストールプロセス時に、管理者は、Access Manager Server のパスワードと資格を求められます。
Access Manager は、Portal アプリケーション用にも適切にチューニングする必要があります。Access Manager で提供されるチューニングスクリプト amtune は、本稼働システムの管理者が必要とするチューニングのほとんどを実行します。また、これらの変更を確認し、それらの適用性を理解しておくことを強くお勧めします。amtune スクリプトの出力は、前のトピックで示されています。このスクリプトは、推奨される変更を、管理者が容易にそれらの変更を見つけ、必要に応じて変更を実行できるようなフォーマットで示します。
Portal Server および Access Manager の両方が、そのスキーマおよびユーザーデータを Directory Server に格納します。Portal Server または Access Manager のユーザーがプロファイルをカスタマイズすると、デスクトッププロファイルは xml として Directory Server に保存されます。ディレクトリをチューニングして、もっとも検索される属性のインデックスを作成して迅速に応答できるようにし、さらに、キャッシュサイズをチューニングして最適なパフォーマンスを実現することが重要です。