本記事では、Spotfire製品の標準機能を利用して、Web PlayerやAutomation Servicesインスタンスのメモリ使用量を確認する方法を紹介します。
※分析ファイルごとのメモリ使用量を確認する方法については、本記事の対象外となります。
動作環境
本記事は、以下の環境にて動作確認を行ったうえで作成しています。
- Spotfire Server 14.0 LTS
- Spotfire Web Player 14.0 LTS
- Spotfire Automation Services 14.0 LTS
Web管理画面「Monitoring&Diagnostics」での確認
Web管理画面「Monitoring&Diagnostics」では、各Web PlayerやAutomation Servicesインスタンスのメモリ使用量をリアルタイムに確認できます。
確認手順
1.「Instances」ページにて、対象Web PlayerまたはAutomation Servicesインスタンスを選択します。
下図は、Automation Servicesの確認画面の例です。
2.画面右側の「Performance counters」エリアにある、以下の項目からメモリ使用量を確認します。
| No. | 項目 | 説明 |
|---|---|---|
| 1 | Available memory | OS全体の物理メモリの空き容量(単位:MB) |
| 2 | Available memory % | OS全体の物理メモリの空き割合(%) |
| 3 | Process Private memory | 他のプロセスと共有できない、対象プロセスに割り当てられたメモリ容量(単位:MB) インスタンスの総メモリ使用量(物理メモリ+ページファイル)です。 ※Windowsの「コミット サイズ」に相当します。 |
| 4 | % Committed Bytes In Use | OS全体の「コミット サイズ」のうち、実際に使用されている領域の割合(%) |
| 5 | Total working memory / Web Player total working memory |
インスタンスが使用している物理メモリの容量(単位:MB) ※Windowsの「ワーキング セット(メモリ)」に相当します。 |
| 6 | Data engine memory | データエンジンのメモリ使用量(単位:MB) |
| 7 | Data engine query cache memory | データエンジンにおいて、計算結果のキャッシュに使用されているメモリ容量(単位:MB) ※この値は「Data engine memory(データエンジンのメモリ使用量)」の内数として含まれます。 |
| 8 | Data engine paged out memory | ページアウトされたメモリの累積容量(単位:MB) ※Spotfire独自の仕組みによってページアウトされます。 |
| 9 | Data engine paged in memory | メモリにページインされた累積容量(単位:MB) ※Spotfire独自の仕組みによってページインされます。 |
| 10 | Memory in all .NET heaps | すべての .NET ヒープのメモリ使用量(単位:MB) |
一部のパフォーマンスカウンターは、Windowsのタスクマネージャーでも確認できます。主な例は以下の通りです。
・% Committed Bytes In Use
・Process Private memory、Total working memory / Web Player total working memory
パフォーマンスカウンターログによる確認
各Web PlayerやAutomation Servicesインスタンスごとに、デフォルト設定で出力されるパフォーマンスカウンターログをSpotfireで解析することで、過去のメモリ使用量の推移を確認できます。
確認手順
1.ログファイルの確認
デフォルト設定では、以下のパスにログファイルが出力されます。
C:\spotfire\nodemanager\14.0.13\nm\logs\PerformanceCounterLog.<WP/ASインスタンスID>.txt※「14.0.13」などのパッチバージョン部分は環境に合わせて読み替えてください。
2.Spotfireへの取り込み
上記のファイルをSpotfireへドラッグアンドドロップして取り込みます。カラム構成は自動的に識別されます。
3.データの可視化
ラインチャートなどを作成し、時間推移を確認できます。
主な確認対象カウンター
ログからメモリ使用量の推移を確認する際は、主に以下のカウンターを分析します。
| No. | CounterCategory | CounterName | 説明 |
|---|---|---|---|
| 1 | Memory | Available Bytes | OS全体の物理メモリの空き容量(単位:Byte) |
| Spotfire Webplayer | Available MB memory | OS全体の物理メモリの空き容量(単位:MB) | |
| 2 | Spotfire Webplayer | Available memory % | OS全体の物理メモリの空き割合(%) |
| 3 | Process | Private Bytes | 他のプロセスと共有できない、対象プロセスに割り当てられたメモリ容量(単位:Byte) インスタンスの総メモリ使用量(物理メモリ+ページファイル)です。 ※Windowsの「コミット サイズ」に相当します。 |
| 4 | Memory | % Committed Bytes In Use | OS全体の「コミット サイズ」のうち、実際に使用されている領域の割合(%) |
| 5 | Spotfire Webplayer | Web Player MB Working Set Size | インスタンスが使用している物理メモリの容量(単位:MB) ※Windowsの「ワーキング セット(メモリ)」に相当します。 |
| Process | Working Set | インスタンスが使用している物理メモリの容量(単位:Byte) ※Windowsの「ワーキング セット(メモリ)」に相当します。 |
|
| 6 | Spotfire Data Engine | system allocated | データエンジンのメモリ使用量(単位:Byte) |
| 7 | query cache memory | データエンジンにおいて、計算結果のキャッシュに使用されているメモリ容量(単位:Byte) ※この値は「system allocated(データエンジンのメモリ使用量)」の内数として含まれます。 |
|
| 8 | paged out bytes | ページアウトされたメモリの累積容量(単位:Byte) ※Spotfire独自の仕組みによってページアウトされます。 |
|
| 9 | paged in bytes | メモリにページインされた累積容量(単位:Byte) ※Spotfire独自の仕組みによってページインされます。 |
|
| 10 | NET Counters | # Bytes in all Heaps | すべての .NET ヒープのメモリ使用量(単位:Byte) |
なお、「CounterCategory」が「.NET Counters」のカウンター(例:# Bytes in all Heaps)は、「CounterInstance」にOS全体の「_Global_」や、各Web Player・Automation Servicesインスタンスの「Spotfire.Dxp.Worker.Host」が出力されることがあります。インスタンス単位のパフォーマンスカウンターを正確に解析するため、解析対象から「_Global_」は除外してください。
メモリ使用量推移の解析例を下図に示します。
補足
- OS全体のメモリ使用率が85%を超えると、Spotfire独自の仕組みによりデータエンジン内のデータがページアウトされます。
- ページファイルの格納先:C:\Users\<OSユーザー>\AppData\Local\Temp\Spotfire\14.0\DataStorage\
- Web管理画面の「Monitoring & Diagnostics」>「Instance」ページにある「Run a full GC(2)」ボタンをクリックすることで、Spotfireが使用しているメモリのうち、.NET Heap領域を解放できます。なお、データエンジンはこのGCの処理対象外です。
- GCの手動実行は原則として非推奨です。システムが必要に応じて自動的に実施するため、通常は手動での実行を避けてください。
注意事項
Web PlayerおよびAutomation Servicesのサービス設定内には、ログへ出力するパフォーマンスカウンターが指定されています。このパフォーマンスカウンターの名前や数は、Spotfireのバージョンアップによって変更されることがあります。そのため、旧バージョンからアップグレードした環境において、旧バージョンのサービス設定を引き継いで使用している場合、新バージョンの環境では目的のパフォーマンスカウンターがログに出力されない可能性があります。
パフォーマンスカウンターは、以下のサービス設定内にある「counters」項目で指定されています。主に以下のカウンターが対象となります。
- Windows標準のパフォーマンスカウンター
- Spotfire独自のパフォーマンスカウンター
・Spotfire.Dxp.Worker.Web.config
<!-- Enable performance counter logging. Add logger and appender to log4net.config to log the values. -->
<!-- The name of the logger is WebLogger.PerformanceCounterLog. -->
<!-- The list of counters is a comma separated list of triples (group, counter, instance) -->
<!-- where each part is separated by semicolon. Each item should therefore contain exactly two semicolons. -->
<!-- Other items will be skipped. Empty strings (for counter or instance) are interpreted as wildcards. -->
<!-- cpuAverageTimeSpan indicates the time span in seconds used to calculate "Web Player average processor %"-->
<!-- The instance name worker is a placeholder for the current service instance process. -->
<performanceCounterLogging
enabled="true"
cpuAverageTimeSpan="30"
logInterval="120"
logForcedInterval="600"
logWcfCounters="false"
dontLogRepeatedValues="true"
readProcessCountersUsingWmi="true"
logThreadStats="false"
counters="
System.Runtime;;,
TCPv4;Connections Established;,
TCPv4;Connection Failures;,
.NET CLR LocksAndThreads;Contention Rate / sec;worker,
.NET CLR Memory;# Bytes in all Heaps;worker,
・・・省略
Memory;Available Bytes;,
Memory;Committed Bytes;,
Memory;Commit Limit;,
Memory;% Committed Bytes In Use;,
Process;Private bytes;worker,
Processor;% Processor Time;_Total,
Processor;% Privileged Time;_Total,
Spotfire Application;dispose tracker finalizations;,
Spotfire Application;Active dispose trackers;,
・・・省略
Spotfire Data Engine;query cache memory;"
debugLogInterval="15"
debugCounters="
Spotfire Automation Services;;,
・・・省略
System;;"/>
対処方法として、以下の手順に従って新バージョンのサービス設定を利用するように変更し、パフォーマンスカウンターが正しくログ出力されるようにしてください。
1.旧バージョンのサービス設定から、独自の変更箇所を特定します。
2.新バージョンのデフォルトのサービス設定をエクスポートし、上記で特定した変更箇所を適用します。これにより、新バージョンで追加・変更された最新のパフォーマンスカウンターが正しくログに出力されるようになります。
Web PlayerやAutomation Servicesのサービス設定をエクスポート・変更する手順については、後述の「参考資料」をご参照ください。
参考として、Spotfire 14.0と14.6におけるパフォーマンスカウンターの設定の違いを下図に示します。
参考資料
- Web Player service performance counters
- Automation Services instance performance counters
- Performance troubleshooting
- Web Playerサービス設定変更手順
- Automation Servicesサービス設定変更手順
-
TIBCO Spotfire Web Player Paging Behavior
- 抜粋:When the RAM utilization hits 85% on the Node Manager, the Spotfire data engine will begin paging out blocks according to a least recently used algorithm.
- How to capture performance counters using the Windows Performance Monitor (PerfMon)
- TIBCO Spotfire Web Player Performance Counters.
- Troubleshooting Performance issues on TIBCO Spotfire Web Player