JP4472944B2 - Request load adjusting apparatus and method, program, and performance data collecting method - Google Patents

Request load adjusting apparatus and method, program, and performance data collecting method Download PDF

Info

Publication number
JP4472944B2
JP4472944B2 JP2003145589A JP2003145589A JP4472944B2 JP 4472944 B2 JP4472944 B2 JP 4472944B2 JP 2003145589 A JP2003145589 A JP 2003145589A JP 2003145589 A JP2003145589 A JP 2003145589A JP 4472944 B2 JP4472944 B2 JP 4472944B2
Authority
JP
Japan
Prior art keywords
request
load
server
computer
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003145589A
Other languages
Japanese (ja)
Other versions
JP2004348491A (en
Inventor
利行 濱
集 手塚
洋介 甲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2003145589A priority Critical patent/JP4472944B2/en
Publication of JP2004348491A publication Critical patent/JP2004348491A/en
Application granted granted Critical
Publication of JP4472944B2 publication Critical patent/JP4472944B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、リクエストによるサーバへの負荷を調整するリクエスト負荷調整装置及び方法、プログラム、並びに、リクエスト負荷調整装置又は方法によってサーバに対し一定の負荷を与えながらサーバの性能に関するデータを収集する性能データ収集方法に関する。
【0002】
【従来の技術】
Webサーバ等が提供するオンライン・サービスの性能を予測的に評価する技術は、人手によらない自己構成、自己最適化等を目指す自律型コンピューティングの実現や、Webサイトのパフォーマンスを向上させるパフォーマンス・サービス等において必要とされる基本技術である。システムモデルに基づく性能評価を行うためには、図6に示すように、対象となるシステムのモデルを作成し(ステップ61)、システムの性能を測定し(ステップ62)、測定データに基づいてモデルにおけるパラメータを推定し(ステップ63)、そして、完成したモデルを待ち行列やシミュレータにより解析する(ステップ64)、という手順を踏む。
【0003】
従来、Webサーバについて、上述の手順におけるような最適なパラメータを見出すサービスが実施されているが、実施に際しては、対象となるWebアプリケーションが実装された実機を用い、サーバ・ソフトウェアの主要なパラメータを変えながら、負荷試験により性能を実測し、その結果に基づいて経験則により最適なパラメータを見つけるようにしている。
【0004】
Webサーバに対する負荷試験を行う技術としては、たとえば、試験対象のWebサーバに対し、これをテストするためのテスト用サーバを接続し、テスト用サーバが異なるポート番号による偽装した多数のセッションを発生させてHTTPリクエスト及びHTTPレスポンスの送受をWebサーバとの間で行うようにしたものが知られている(たとえば特許文献1参照)。この技術においては、レスポンス中にリクエストによって指定したオブジェクトが誤りなく含まれていることや、リクエスト/レスポンスに要する応答時間等の性能が実測される。その際、CGIに与えるための引数等のパラメータを動的に変化させることも可能であるとしている。
【0005】
一方、待ち行列解析や、シミュレーションによるモデルの解析によって、実機を使わずに最適なシステム構成やサーバのパラメータを決定する手法も実用化されつつある。ただしこの場合でも、Webアプリケーションの中身はJava(登録商標)によるプログラムであり、顧客毎に内容も異なるため、パラメータの推定を行い、モデルを完成させるためには、少なくとも一度は実機で測定する必要がある。
【0006】
【特許文献1】
特開2002−7232号公報(段落0035〜0038)
【0007】
【発明が解決しようとする課題】
上述従来技術によれば、Webアプリケーション開発の最終段階で負荷試験を行い、十分な測定データを収集できる場合や、システムが稼動中であってもステージング・サーバ等の余分な実機があるようなテスト環境下での負荷試験により測定データの収集ができる場合には何ら問題はない。ところが、Webアプリケーションの開発に際しては、開発期間が短く、十分な負荷試験を実施せずにアプリケーションのデバッグのための動作確認だけでカット・オーバしてしまう場合が多い。また、ステージング・サーバやバックアップ用サーバ等を用意しているのはごく限られた顧客だけであり、多くの場合は、実稼動中のサーバを開発機として使用し、そのまま実稼動に移行するため、余分な実機を有していない。したがって、十分な負荷試験を実現させるのは難しいのが現状である。このため、システムにおけるパフォーマンス上の問題が運用中に顕在化したときに初めてサービスの依頼を受けることになる。しかしながら、稼動中のシステムを負荷試験のために長時間停止することは、機会損失につながるので、顧客としてはできるだけ避けたいのは言うまでもない。
【0008】
考えられる最も理想的な解決方法としては、実稼働しているシステムの応答時間、資源使用率等の性能データを収集し、そのデータに基づき、解析のためのモデルのパラメータを推定することが考えられる。しかし、実稼働しているWebサーバへのリクエスト量は、一般に、単位時間当りの到着数の分布がかなり複雑で、平均到着数自体が時間的に変動し、かつ種々のリクエストの混合比も時間的に変動するという性質を有する。このような状態にあるシステムの性能データを収集しても、現在の解析技術をもってしてはモデルに関するパラメータの推定にはほとんど役に立たない。
【0009】
本発明の目的は、かかる従来技術の問題点に鑑み、サーバによるサービスを停止させることなく、リクエストによるサーバへの負荷を調整することができる技術を提供することにある。また、サーバによるサービスを停止させることなく、通常の負荷試験の場合と同等の定常的な負荷をサーバに印可することができる技術を提供することにある。
【0010】
【課題を解決するための手段】
この目的を達成するため、本発明に係るリクエスト負荷調整装置及び方法は、サーバに送信されてくるリクエストに対し、擬似的なリクエストを加えることによって、リクエストによるサーバへの負荷を調整するようにしたことを特徴とする。また、本発明に係るプログラムは、コンピュータを、本発明に係るリクエスト負荷調整装置として機能させ、あるいはコンピュータに、本発明に係るリクエスト負荷調整方法を実行させることを特徴とする。また、本発明に係る性能データ収集方法は、本発明に係るリクエスト負荷調整装置又はリクエスト負荷調整方法により、リクエストによるサーバへの負荷を調整しながら、サーバの性能に関するデータを収集することを特徴とする。
【0011】
ここで、サーバとは、各種リクエストに応じ、対応するサービスを提供するシステムやコンピュータを意味する。サーバとしては、たとえばWebサーバが該当する。リクエストとはサーバに対してサービスを要求するためのコマンドやメッセージを意味する。
【0012】
本発明によれば、サーバに送信されてくる本来のリクエストに対し、擬似的なリクエストを加えることにより負荷の調整を行うようにしているため、サーバは本来のリクエストについての処理を行い、通常の場合と同様に稼働しながら、擬似的なリクエストにも応じることにより負荷が調整されることになる。その際、加える擬似的なリクエストの量を調整することにより、変動のない一定量の負荷をサーバに対して与えることができる。したがって、通常の稼働を停止させることなく、一定の負荷を与えながら、サーバの性能に関するデータを取得することができる。
【0013】
本発明の好ましい態様においては、サーバに送信されてくる本来のリクエストに対して擬似的なリクエストを加えながら、各リクエストを一定の到着時間間隔分布で到着するようなタイミングでサーバに転送する。擬似的なリクエストの追加を加減して行えば、本来のリクエストの到着を遅延させることなく、一定の到着時間間隔分布を維持することができる。これによれば、リクエストの到着時間間隔分布が一定であるため、サーバに対して、定常的な負荷を与えることができる。到着時間間隔分布としてはたとえばポアソン分布を用いることができる。
【0014】
この場合、擬似的なリクエストの追加をリクエストの種類毎に行い、かつリクエストの種類毎に独自の到着時間間隔分布となるタイミングでサーバへの転送を行うようにしてもよい。これによれば、リクエストの種類毎に負荷の調整を行うことができる。
【0015】
本発明の他の態様においては、サーバに送信されてくるリクエストを一時的にキューに蓄え、キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は擬似的に発生するリクエストを、順次所定のタイミングでサーバに転送することにより、リクエストによるサーバへの負荷を調整するようにしている。これにより、簡単な構成で、サーバに送信されてくる本来のリクエストに対し、擬似リクエストを追加して、サーバの負荷を調整することができる。
【0016】
この場合、所定のタイミングとして、サーバに転送するリクエストが一定の到着時間間隔分布でサーバに到着するようなタイミングを採用することができる。このようなタイミングは、たとえば所定の確率分布に従って発生される乱数に基づいて決定することができる。
【0017】
本発明の別の態様においては、サーバに送信されてくるリクエストを種類に応じて配分し、種類に応じた分類毎に一時的に複数のリクエスト・キューに蓄え、各リクエスト・キュー毎に別個のタイミングで、各リクエスト・キュー毎に、リクエスト・キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は擬似的に発生させる対応する種類のリクエストを、順次サーバに転送することにより、リクエストによるサーバへの負荷を調整するようにしている。
【0018】
この場合、擬似的にリクエストを発生させるとき、セッション情報を含むことが必要な種類のリクエストについては、予めサーバにリクエストを転送することによって取得したセッション情報を含むものとして、そのリクエストを発生することができる。これにより、セッション情報を必要とするリクエストについても支障なく個別に負荷の調整を行うことができる。
【0019】
セッション情報を含む擬似的リクエストの発生は、たとえば、とり得る各状態において対応する種類のリクエストを発生するスレッドを、複数のスレッド・キューに対し各状態毎に蓄積するとともに、各スレッドにより、リクエストをサーバに転送することによって取得したセッション情報を保持し、該セッション情報を含むリクエストを発信するようにすることによって、行うことができる。
【0020】
【発明の実施の形態】
図1は、本発明の一実施形態に係る負荷調整フィルタのモジュール構成を示すブロック図である。同図に示すように、この負荷調整フィルタ1はWebサーバ2と、インターネット3との間に設けられる。負荷調整フィルタ1はWebサーバ2の性能に関するデータを収集する際に、インターネット3を介してWebサーバ2に送信されてくるリクエストに対し、擬似的なリクエストを加えることにより、リクエストによるWebサーバ2への負荷を調整するものである。
【0021】
負荷調整フィルタ1は、インターネット3を介してサーバ2に送られてくるリクエストを受信し、一時的に蓄える受信キュー4、擬似的なリクエストを発生させる擬似クライアント5、乱数発生器6、及び、乱数発生器6が発生する乱数に応じたタイミングでキュー4又は擬似クライアント5のリクエストをWebサーバ2へ送るゲート7を備える。
【0022】
擬似クライアント5はゲート7からの要求に応じてリクエストを生成するものである。乱数発生器6は与えられた確率分布に従う乱数を、ゲート7からの要求に応じて発生するものである。乱数発生器6として、モンテカルロ・シミュレーション等で使用するサンプリング・アルゴリズムを利用したものを用いれば、ほぼ任意の確率分布に従った乱数を発生させることが可能である。各モジュール4〜7はソフトウェアとハードウェアとが協働したものとして構成することができる。
【0023】
図2は負荷調整フィルタ1のハードウェア構成を示す。同図に示すように、ハードウェア構成としては、プログラムに基づきデータ処理や各部の制御を行うCPU21、プログラムやデータを記憶するためのメモリ22、操作入力を行うための入力手段23、CPU21によるデータ処理結果等に基づく表示を行い、GUI(グラフィック・ユーザ・インタフェース)として機能する表示装置24、Webサーバ2との間の通信やインターネット3を介した通信を行うための通信インタフェース25、これらの各要素間を接続するバス26等を備える。メモリ22はROM、RAM、ハードディスク等で構成され、OS、及び各種アプリケーション・プログラムを格納する。アプリケーション・プログラムには、かかるハードウェア構成を負荷調整フィルタ1として機能させるものが含まれる。
【0024】
Webサーバ2におけるシステムモデルについて性能評価を行うためには、図6に示すように、対象となるシステムモデルを作成し(ステップ61)、システムの性能を測定し(ステップ62)、測定データに基づいてモデルにおけるパラメータを推定し(ステップ63)、完成したモデルを待ち行列やシミュレータにより解析する(ステップ64)という手順を踏むが、負荷調整フィルタ1はこの手順のうちの、システムモデルのパラメータを決定するためのシステム性能測定(ステップ62)に際し、システムモデルに対し、理想的な負荷を与える機能を果すものである。
【0025】
システム性能測定時の理想的な負荷とは、定常的な負荷、つまり単位時間当たりのリクエスト到着数の分布が一定の負荷である。負荷が定常的であるためにはリクエストの到着間隔の時間分布が一定であればよい。たとえば、待ち行列解析でしばしば想定されるポアソン到着は、到着時間間隔分布を指数分布とすることによって得ることができる。ポアソン到着は解析が最も簡単であるが、他の分布であっても定常であれば、解析あるいは人工的に再現が可能である場合も多い。このため、本実施形態では、リクエストの到着時間間隔分布が一定であるという条件を満たせば具体的な分布の形状は問わないこととしている。
【0026】
図3はゲート7による負荷調整処理の手順を示すフローチャートである。乱数発生器6は、以下の処理によってWebサーバ2に到着するリクエストの到着分布が一定の所望の分布となるようにパラメータが予め設定されている。負荷調整処理を開始すると、ゲート7は、まず、ステップ31において、乱数発生器6より乱数を取得する。次に、ステップ32において、取得した乱数に対応する時間待機する。
【0027】
その後、ステップ33において、キュー4を調べ、リクエストが存在するか否かを判定する。リクエストが存在すると判定した場合はステップ34においてそのリクエストをWebサーバ2へ送信し、ステップ37へ進む。リクエストが存在しないと判定した場合はステップ35において擬似クライアント5からリクエストを取得し、ステップ36において、取得したリクエストをWebサーバ2へ送信し、ステップ37へ進む。
【0028】
ステップ37では、負荷調整期間やWebサーバ2についての負荷試験期間が終了したこと等に基づいて負荷調整処理を終了するか否かを判定する。終了しないと判定した場合はステップ31へ戻り、以上の処理を繰り返す。終了すると判定した場合は、負荷調整処理を終了する。
【0029】
ゲート7はこのようにして、乱数発生器4に乱数を要求し、乱数に対応する時間が経過した後に、インターネット3を介して送られてくるリクエストがキュー4にあればそれをWebサーバ2に転送し、なければ擬似クライアント5に要求して得たリクエストをWebサーバ2へ転送するという処理を繰り返す。
【0030】
これによれば、インターネット3からのリクエストがない場合には、代わりに擬似クライアント5からのリクエストが供給されるので、ゲート7が開くタイミングで必ずリクエストをWebサーバ2に送信することができる。したがって、乱数発生器4に与えた確率分布による乱数に対応する到着時間間隔分布に従う負荷をWebサーバ2に与えることができる。
【0031】
インターネット3を介して送信されてくるリクエストの到着率は時間的に変動しているので、負荷調整フィルタ1を介することなく直接的に通常稼働中のWebサーバ2へリクエストを付与する場合の負荷については、定常とみなせるのはごく短時間だけである。これに対し、本実施形態によれば、負荷調整フィルタ1によってWebサーバ2に到着するリクエストの到着時間間隔分布が一定になるように調整されるため、負荷調整処理を行っている期間中、継続的に、定常的な負荷をWebサーバ2に付与することができる。
【0032】
その際、インターネット3からのリクエストは棄却することなくすべて受け入れるので、その平均到着率を下回るような到着率による負荷を付与することはできないが、負荷調整処理を行う期間における最大到着率時の負荷量を上回るものであれば、任意の負荷量を、乱数発生器6のパラメータを調整することによって設定することができる。実際問題として、常に高負荷が印加されるWebサイトは珍しく、明け方等のような1日のある時間帯にはリクエスト数もかなり減り、平均資源使用率が数%となる場合がほとんどであるから、そのような時間帯に負荷調整処理を実施すれば、設定できる負荷の自由度は大きい。
【0033】
したがって、本実施形態によれば、インターネット3からのリクエストに対する処理を中断することなく、所望の定常負荷を印加した状態において、Webサーバ2のシステムモデルに関する性能データを収集する負荷試験を行うことができる。
【0034】
図4は本発明の他の実施形態を示す。リクエストの種類としては一般に複数のものが存在するので、各種類のリクエストによる各ハードウェア資源の使用量を推定するには、各種リクエストの平均到着率やリクエストの混合比を変化させながら複数回の測定を行い、性能データを取得する必要がある。実際に従来の通常の負荷試験により性能データを収集する場合は、各種リクエストによる負荷の混合比を変化させながら、何種類かの性能データを収集するようにしている。そこで本実施形態では、同図に示すように、各種リクエスト毎に負荷調整フィルタ41a〜41dを設け、各種リクエストの到着時間間隔を独立に調整できるようにしている。
【0035】
すなわち、インターネットからのリクエストは、ネットワーク・ディスパッチャ42により、各種リクエストにそれぞれ対応する各負荷調整フィルタ41a〜41dに振り分けて、各負荷調整フィルタ41a〜41d毎のタイミングでWebサーバ40に転送するようにしている。各負荷調整フィルタ41a〜41dは各種リクエストの供給を行うことができるように拡張された1つの擬似クライアント43を共有しており、対応する種類のリクエストを必要に応じて取得することができる。これにより、各種リクエストの混合比が調整可能となっている。
【0036】
図5は負荷調整フィルタ41a〜41dの構成を示す。各負荷調整フィルタ41a〜41dは、インターネットを介してWebサーバ40に送られてくるリクエストのうち、自身に対応する種類のものを、ディスパッチャ42を介して受信し、一時的に蓄える受信キュー51、キュー51が蓄えるリクエストの種類に対応した確率分布による乱数を発生するように設定される乱数発生器52、及び、乱数発生器52が発生する乱数に応じたタイミングでキュー51又は擬似クライアント43のリクエストをWebサーバ40へ送るゲート53を備える。キュー51、乱数発生器52、及びゲート53は図1の負荷調整フィルタ1におけるキュー4、乱数発生器6及びゲート7と同様の構成を有する。
【0037】
各負荷調整フィルタ41a〜41dのゲート53は、各種リクエストの供給を行うことができるように拡張された1つの擬似クライアント43を共有しているが、このような構成を採用したのは、Webサーバ40に転送するリクエストに対し、セッション情報を付与することができるようにするためである。すなわちWebサーバ40におけるシステムモデルを構成するアプリケーション・プログラムによっては、セッションの状態をWebサーバ40側で保持しているものがあり、その場合、リクエストは適切なセッション情報を含んでいる場合にのみ正常に処理される。つまり、不適切なリクエストをやみくもに発信しても意味がない。簡単な例としては、ログアウトのリクエストを、ログイン時に返信されるはずのセッション情報を伴わずに発信しても、そのリクエストについてのWebサーバ40での処理はエラーとなってしまい、通常の処理は行われない。そこで、擬似クライアント43を採用し、各リクエストに対して適切なセッション情報を付与することができるようにしている。
【0038】
擬似クライアント43は、Webサーバ40側での状態遷移に対応する各状態間を遷移する状態遷移グラフに従った状態遷移を定義しており、各状態に対応するキューを備える。各キューにはセッション情報を含むリクエストを発信するスレッドが予め蓄えられる。擬似クライアント43は、各種類のリクエストが要求されたとき、該種類のリクエストを発信するスレッドをキューから取り出して該スレッドによりリクエストを発信し、該スレッドを状態遷移グラフに従い、次の状態のキューに移動させる。
【0039】
具体例として、Webサーバ40におけるシステムモデルが簡単なショッピングサイトのWebアプリケーションで構成される場合について考える。図4に示すように、擬似クライアント43は、状態遷移グラフとして、Webサーバ40側での状態遷移に対応するログイン前の状態44、ログイン中の状態45、及びログアウト後の状態46の各状態間を遷移するものを定義し、各状態44〜46に対応するキュー47〜49を有する。リクエストの種類は、A.ログイン、B.カタログの表示、C.決済、D.ログアウトの4種類である。ログイン前状態44で発信できるリクエストはログイン(A)であり、ログイン中状態45で発信できるリクエストは、カタログ表示(B)、決済(C)、又はログアウト(D)である。ログアウト後の状態46で発信できるリクエストはない。
【0040】
遷移状態グラフ中の各矢印は、遷移前の状態から遷移後の状態へ伸びており、各矢印には、それが示す状態遷移に際してスレッドが発信するリクエストの種類を示す記号A〜Dが添えられている。すなわちログイン前状態44にあるスレッドがログイン・リクエストAを発信した場合、そのスレッドはキュー48に移動される。ログイン中状態45にあるスレッドが、カタログ表示リクエストB又は決済リクエストCを発信した場合には、そのスレッドはキュー48に戻される。また、ログイン中状態45にあるスレッドが、ログアウト・リクエストDを発信した場合には、そのスレッドはキュー49に移動される。
【0041】
キュー47及び48には、予め、負荷調整期間におけるリクエストの要求に対応することができる数のスレッドが用意される。すなわち擬似クライアント43は、キュー47に所定数のスレッドを用意し、そのうちの適当な数のスレッドによりログイン・リクエストAをWebサーバ40に送信してWebサーバ40からセッション情報を取得し、各スレッドをキュー48に移動する。これにより、キュー47にはログイン前状態にある適当な数のスレッドを蓄積し、キュー48にはログイン中状態にある適当数のセッション情報を有するスレッドを蓄積しておく。
【0042】
擬似クライアント43はログイン・リクエストAが要求された場合には、ログイン前状態のキュー47からスレッドを取り出し、該スレッドによりログイン・リクエストAを発信し、該レッドをログイン中状態のキュー48へ移動する。カタログ表示リクエストB又は決済リクエストCが要求された場合には、ログイン中状態のキュー48からスレッドを取り出し、該スレッドによりセッション情報を含むカタログ表示リクエストB又は決済リクエストCを発信し、該スレッドをキュー48に戻す。ログアウト・リクエストDが要求された場合には、ログイン中状態のキュー48からスレッドを取り出し、該スレッドによりセッション情報を含むログアウト・リクエストDを発信し、そして該スレッドをキュー49に移動する。なお、キュー49へ移動されたスレッドは、消去してもいいし、ログイン前状態のキュー47に戻してもよい。
【0043】
なお、状態遷移グラフとしてより複雑なものを用いる場合には、あるリクエストの要求に対し、そのリクエストを発信することができるスレッドの状態が複数存在することもあり得る。その場合には、該複数状態の中からランダムにそのリクエストを発信させる状態を選択すればよい。
【0044】
擬似クライアント43によれば、キュー47及び48中に、予め十分な数のスレッドを必要なセッション情報とともに用意しておくことにより、各種類のリクエスト要求に対し、またセッション情報が必要なリクエストに対しても、対応することができる。したがって、セッションの状態を保持しているWebサーバ40のシステムに対しても、通常の稼働状態を維持させながら、リクエストの種類毎に異なる定常な負荷を印加することができる。
【0045】
キュー47及び48に予め蓄えておくスレッドの数は、対応するログイン前状態及びログイン中状態のそれぞれにおいて発信し得るリクエストA及び各リクエストB、C、Dについて、各負荷調整フィルタ41a〜41dにおいて設定した到着時間間隔分布を考慮して決定することができる。その場合、たとえば、負荷調整期間においてキュー47及び48中のスレッドが枯渇しない確率が90%以上となるように、スレッド数を見積もることができる。その場合、希なケースとして、スレッドがキューから無くなってしまった場合には、対応するリクエストの発信は無視してもかまわない。負荷試験により収集する性能データについては、これに基づいてシステムモデルのパラメータを推定する際に統計処理を行うので、希なケースとして、設定したリクエストの到着時間間隔分布から外れた時間間隔で到着するリクエストが発生するとしても大きな問題ではない。
【0046】
Webサーバ40におけるシステムモデルについての性能データの収集を行うために負荷調整を行うに際しては、それぞれリクエストA〜Dについての所望の到着時間間隔分布に対応する乱数を発生するように、予め、各負荷調整フィルタ41a〜41dにおける乱数発生器52のパラメータが設定される。そして、負荷調整の実施に際しては、各負荷調整フィルタ41a〜41dのゲート53は図3と同様の処理を行う。すなわち、乱数発生器52より乱数を取得し、乱数に対応する時間待機した後、キュー51内にリクエストが存在する場合はそのリクエストをWebサーバ40に転送し、存在しない場合は擬似クライアント43から対応する種類のリクエストA〜Dのいずれかを取得してWebサーバ40に転送するという処理を繰り返す。
【0047】
これにより、各負荷調整フィルタ41a〜41dのゲート53は、インターネットからのリクエストA〜Dに対し、擬似クライアントからのリクエストA〜Dを加え、これを各乱数発生器52における確率分布の設定に応じた到着時間間隔分布で、Webサーバ40に供給することができる。したがって、リクエストの種類毎に負荷量が異なり、かつ定常的な負荷をWebサーバ40に印加することができる。
【0048】
したがって本実施形態によれば、顧客のWebサーバ40におけるシステムモデルについてのパフォーマンスを向上させるサービスに際し、稼働中のシステムを長時間停止して取引機会の損失を招くようなことなく、定常的な負荷を与えながら性能データの収集を行い、システムモデルのパラメータの推定を行うことができる。この結果、取引機会の損失を恐れて二の足を踏んでいる顧客へのパフォーマンス・サービスに対する敷居が低くなるので、サービス・ビジネスを発展させるうえで大きく貢献することができる。
【0049】
また、自律コンピューティングの技術が揃ってきた場合に、本発明に従った負荷調整フィルタは、システムモデルに基づく自律調整機能を稼働中のシステムに導入する際のコストが小さいため、かかる導入を促進することができる。
【0050】
なお、本発明は上述実施形態に限定されることなく適宜変形して実施することができる。たとえば、上述においては、サーバに送信されてくるリクエストを一旦キューに蓄積し、転送する際に擬似的なリクエストを混合することにより負荷を調整するようにしているが、この代わりに、サーバに送信されてくるリクエストをキューに蓄積することなくモニタし、モニタ結果に応じて、擬似的なリクエストを直接サーバに送信することにより、本来のリクエストに対し、擬似的リクエストを加え、負荷の調整を行うようにしてもよい。
【0051】
上述の各実施形態に係る負荷調整フィルタについて、特に想定している応用の場面は、出願人が提供するウェブスフェア(WebSphere)製品群から構成されるWebサーバの性能を解析することにより、Webアプリケーション及び想定されるリクエスト量に対して最適となるサーバ・ソフトウェアのパラメータ(スレッド数、キャッシュサイズ等)を見出すサービスや、サーバ・ソフトウェアのパラメータを動的に調整する自動制御の手法等の場面である。この場合のシステムモデルのパラメータとは、たとえば個々のリクエストに対応するトランザクションが消費するCPU、ディスクI/O、ネットワークI/O等のハードウェア資源の消費量である。典型的な3階層のWebサーバでは、HTTPサーバ、アプリケーション・サーバ、及びデータベースの各階層におけるトランザクションのハードウェア資源消費量を個別に推定し、モデルを完成させる。
【0052】
【発明の効果】
以上説明したように本発明によれば、サーバに送信されてくるリクエストに対し、擬似的なリクエストを加えることによってサーバに印加される負荷の調整を行うようにしたため、サーバによるサービスの提供を停止させることなく調整された負荷をサーバに対して印加することができる。
【0053】
また、サーバに送信されてくるリクエストに対して擬似的なリクエストを加えたものを、所定の到着時間間隔分布で到着するようなタイミングで前記サーバに転送するようにしたため、負荷を定常化させることができる。
【0054】
また、サーバに送信されてくるリクエストに対し、リクエストの種類毎に、擬似的なリクエスト加えたものを、それぞれ独自の所定の到着時間間隔分布で到着するようなタイミングで転送するようにしたため、リクエストの種類毎に負荷を定常化することができる。
【0055】
さらに、セッション情報を含むことが必要な種類の擬似的リクエストについては、予めサーバにリクエストを転送することによって取得したセッション情報を含むものとして、そのリクエストを発生するようにしたため、セッションの状態を保持しているサーバについても、支障なく負荷の調整を行うことができる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る負荷調整フィルタのモジュール構成を示すブロック図である。
【図2】図1の負荷調整フィルタのハードウェア構成を示すブロック図である。
【図3】図1の負荷調整フィルタのゲートによる負荷調整処理手順を示すフローチャートである。
【図4】本発明の他の実施形態を示すブロック図である。
【図5】図4の実施形態における各負荷調整フィルタの構成を示すブロック図である。
【図6】システムモデルに基づく性能評価を行う手順を示す図である。
【符号の説明】
1:負荷調整フィルタ、2:Webサーバ:インターネット、4:受信キュー、5:擬似クライアント、6:乱数発生器、7:ゲート、21:CPU、22:メモリ、23:入力手段、24:ディスプレイ、25:通信インタフェース、26:バス、40:Webサーバ、41a〜41d:負荷調整フィルタ、42:ディスパッチャ、43:擬似クライアント、44:ログイン前状態、45:ログイン中状態、46:ログアウト後状態、47〜49:スレッド・キュー、51:リクエスト・キュー、52:乱数発生器、53:ゲート。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a request load adjusting apparatus and method for adjusting a load on a server due to a request, a program, and performance data for collecting data related to server performance while giving a constant load to the server by the request load adjusting apparatus or method. It relates to the collection method.
[0002]
[Prior art]
The technology that predictively evaluates the performance of online services provided by Web servers, etc. is the realization of autonomous computing aiming at self-configuration, self-optimization, etc. that does not involve humans, and performance that improves website performance. This is a basic technology required for services. In order to perform performance evaluation based on the system model, as shown in FIG. 6, a model of the target system is created (step 61), the performance of the system is measured (step 62), and the model is based on the measurement data. The parameters are estimated (step 63), and the completed model is analyzed by a queue or simulator (step 64).
[0003]
Conventionally, services for finding optimal parameters in the above-described procedure have been implemented for Web servers. However, when implementing services, the main parameters of the server software are set using the actual machine in which the target Web application is installed. While changing, the performance is actually measured by a load test, and the optimum parameter is found by an empirical rule based on the result.
[0004]
As a technique for performing a load test on a Web server, for example, a test server for testing the Web server to be tested is connected, and the test server generates a number of sessions forged with different port numbers. In this case, an HTTP request and an HTTP response are transmitted and received with a Web server (see, for example, Patent Document 1). In this technique, performance such as response time required for request / response and the fact that the object specified by the request is included without error in the response are measured. At that time, parameters such as arguments to be given to the CGI can be dynamically changed.
[0005]
On the other hand, methods for determining an optimal system configuration and server parameters without using an actual machine by queuing analysis and model analysis by simulation are also being put into practical use. However, even in this case, the contents of the Web application are Java (registered trademark) programs, and the contents differ for each customer. Therefore, in order to estimate the parameters and complete the model, it is necessary to measure at least once with the actual machine. There is.
[0006]
[Patent Document 1]
JP 2002-7232 A (paragraphs 0035-0038)
[0007]
[Problems to be solved by the invention]
According to the above-described conventional technology, a load test is performed at the final stage of Web application development, and sufficient measurement data can be collected, or there is an extra actual machine such as a staging server even when the system is in operation. There is no problem if measurement data can be collected by an environmental load test. However, when developing a Web application, the development period is short, and the cut-over is often performed only by checking the operation for debugging the application without performing a sufficient load test. Also, only a limited number of customers have staging servers and backup servers. In many cases, a server that is currently in operation is used as a development machine, so that it can be put into production. Don't have an extra real machine. Therefore, it is difficult to realize a sufficient load test at present. For this reason, a service request is received only when a performance problem in the system becomes apparent during operation. However, stopping a running system for a long time for a load test leads to lost opportunities, and it goes without saying that customers want to avoid it as much as possible.
[0008]
The most ideal solution that can be considered is to collect performance data such as the response time and resource usage of a live system and estimate the model parameters for analysis based on that data. It is done. However, the amount of requests to a Web server that is actually operating generally has a fairly complicated distribution of the number of arrivals per unit time, the average number of arrivals itself varies with time, and the mixing ratio of various requests also varies with time. It has the property of fluctuating. Collecting system performance data in such a state is of little use for estimating parameters for the model with current analysis techniques.
[0009]
An object of the present invention is to provide a technique capable of adjusting a load on a server due to a request without stopping a service by the server in view of the problems of the related art. Another object of the present invention is to provide a technology that can apply a steady load equivalent to that in a normal load test to a server without stopping the service provided by the server.
[0010]
[Means for Solving the Problems]
In order to achieve this object, the request load adjusting apparatus and method according to the present invention adjusts the load on the server due to the request by adding a pseudo request to the request transmitted to the server. It is characterized by that. A program according to the present invention causes a computer to function as a request load adjustment device according to the present invention, or causes a computer to execute the request load adjustment method according to the present invention. Further, the performance data collection method according to the present invention is characterized in that the request load adjustment device or the request load adjustment method according to the present invention collects data related to server performance while adjusting the load on the server due to the request. To do.
[0011]
Here, the server means a system or computer that provides a corresponding service in response to various requests. An example of the server is a web server. A request means a command or message for requesting a service from a server.
[0012]
According to the present invention, since the load is adjusted by adding a pseudo request to the original request transmitted to the server, the server performs processing for the original request, The load is adjusted by responding to a pseudo request while operating as in the case. At that time, by adjusting the amount of pseudo requests to be added, a constant amount of load without fluctuation can be given to the server. Therefore, it is possible to acquire data relating to the performance of the server while applying a certain load without stopping normal operation.
[0013]
In a preferred aspect of the present invention, while adding a pseudo request to the original request transmitted to the server, each request is transferred to the server at a timing such that it arrives with a constant arrival time interval distribution. By adding or subtracting pseudo requests, it is possible to maintain a certain arrival time interval distribution without delaying the arrival of the original request. According to this, since the arrival time interval distribution of requests is constant, a constant load can be given to the server. For example, a Poisson distribution can be used as the arrival time interval distribution.
[0014]
In this case, a pseudo request may be added for each request type, and the transfer to the server may be performed at a timing that has a unique arrival time interval distribution for each request type. According to this, it is possible to adjust the load for each type of request.
[0015]
In another aspect of the present invention, the requests transmitted to the server are temporarily stored in a queue, and if there are requests in the queue, the requests are generated, and if they do not exist, pseudo-generated requests are sequentially By transferring to the server at a predetermined timing, the load on the server due to the request is adjusted. Thereby, it is possible to adjust the server load by adding a pseudo request to the original request transmitted to the server with a simple configuration.
[0016]
In this case, a timing at which a request to be transferred to the server arrives at the server with a constant arrival time interval distribution can be adopted as the predetermined timing. Such timing can be determined based on random numbers generated according to a predetermined probability distribution, for example.
[0017]
In another aspect of the present invention, the requests transmitted to the server are distributed according to the type, temporarily stored in a plurality of request queues for each classification according to the type, and a separate request for each request queue. At each timing, for each request queue, if there is a request in the request queue, if the request does not exist, the corresponding type of request that is generated in a pseudo manner is sequentially transferred to the server. The load on the server is adjusted.
[0018]
In this case, when generating a pseudo-request, for a type of request that needs to include session information, generate the request as including the session information acquired by transferring the request to the server in advance. Can do. As a result, it is possible to individually adjust the load for a request that requires session information without any problem.
[0019]
Generation of a pseudo request including session information, for example, accumulates a thread that generates a corresponding type of request in each possible state for each state in a plurality of thread queues, and requests are received by each thread. This can be done by holding the session information acquired by transferring it to the server and transmitting a request including the session information.
[0020]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a module configuration of a load adjustment filter according to an embodiment of the present invention. As shown in the figure, the load adjustment filter 1 is provided between the Web server 2 and the Internet 3. When the load adjustment filter 1 collects data related to the performance of the Web server 2, the load adjustment filter 1 adds a pseudo request to the request transmitted to the Web server 2 via the Internet 3. This is to adjust the load.
[0021]
The load adjustment filter 1 receives a request sent to the server 2 via the Internet 3 and temporarily stores a reception queue 4, a pseudo client 5 that generates a pseudo request, a random number generator 6, and a random number A gate 7 is provided that sends a request from the queue 4 or the pseudo client 5 to the Web server 2 at a timing according to a random number generated by the generator 6.
[0022]
The pseudo client 5 generates a request in response to a request from the gate 7. The random number generator 6 generates a random number according to a given probability distribution in response to a request from the gate 7. If a random number generator 6 using a sampling algorithm used in Monte Carlo simulation or the like is used, it is possible to generate random numbers according to almost arbitrary probability distribution. Each of the modules 4 to 7 can be configured as a combination of software and hardware.
[0023]
FIG. 2 shows a hardware configuration of the load adjustment filter 1. As shown in the figure, the hardware configuration includes a CPU 21 that performs data processing and control of each unit based on a program, a memory 22 that stores programs and data, an input means 23 that performs operation input, and data by the CPU 21. A display interface 24 that performs display based on the processing result and functions as a GUI (graphic user interface), a communication interface 25 for communication with the Web server 2 and communication via the Internet 3, A bus 26 and the like for connecting the elements are provided. The memory 22 includes a ROM, a RAM, a hard disk, and the like, and stores an OS and various application programs. The application program includes a program that allows the hardware configuration to function as the load adjustment filter 1.
[0024]
In order to evaluate the performance of the system model in the Web server 2, as shown in FIG. 6, a target system model is created (step 61), the system performance is measured (step 62), and the measurement data is used. The parameters in the model are estimated (step 63), and the completed model is analyzed by a queue or simulator (step 64). The load adjustment filter 1 determines the parameters of the system model in this procedure. In performing system performance measurement (step 62), an ideal load is applied to the system model.
[0025]
The ideal load at the time of system performance measurement is a steady load, that is, a load with a constant distribution of the number of request arrivals per unit time. In order for the load to be constant, it is only necessary that the time distribution of request arrival intervals is constant. For example, Poisson arrival often assumed in queuing analysis can be obtained by making the arrival time interval distribution an exponential distribution. Poisson arrival is the simplest to analyze, but it is often possible to analyze or artificially reproduce other distributions if they are stationary. For this reason, in this embodiment, the specific distribution shape is not limited as long as the condition that the request arrival time interval distribution is constant is satisfied.
[0026]
FIG. 3 is a flowchart showing a procedure of load adjustment processing by the gate 7. In the random number generator 6, parameters are set in advance so that the arrival distribution of requests arriving at the Web server 2 is a constant desired distribution by the following processing. When the load adjustment process is started, the gate 7 first acquires a random number from the random number generator 6 in step 31. Next, in step 32, a time corresponding to the acquired random number is waited.
[0027]
Thereafter, in step 33, the queue 4 is examined to determine whether a request exists. If it is determined that the request exists, the request is transmitted to the Web server 2 in step 34, and the process proceeds to step 37. If it is determined that the request does not exist, the request is acquired from the pseudo client 5 in step 35, the acquired request is transmitted to the web server 2 in step 36, and the process proceeds to step 37.
[0028]
In step 37, it is determined whether or not to end the load adjustment process based on the end of the load adjustment period or the load test period for the Web server 2. If it is determined not to end, the process returns to step 31 and the above processing is repeated. If it is determined to end, the load adjustment process ends.
[0029]
In this way, the gate 7 requests a random number from the random number generator 4, and after a time corresponding to the random number has elapsed, if there is a request sent via the Internet 3 in the queue 4, the request is sent to the Web server 2. If not transferred, the process of transferring the request obtained by requesting the pseudo client 5 to the Web server 2 is repeated.
[0030]
According to this, when there is no request from the Internet 3, since the request from the pseudo client 5 is supplied instead, the request can always be transmitted to the Web server 2 when the gate 7 opens. Therefore, it is possible to give the Web server 2 a load according to the arrival time interval distribution corresponding to the random number based on the probability distribution given to the random number generator 4.
[0031]
Since the arrival rate of requests transmitted via the Internet 3 fluctuates with time, the load when a request is given directly to the normally operating Web server 2 without going through the load adjustment filter 1 Can only be considered stationary for a very short time. On the other hand, according to the present embodiment, the load adjustment filter 1 adjusts the arrival time interval distribution of requests arriving at the Web server 2 to be constant, and thus continues during the period of performing the load adjustment process. Therefore, a constant load can be given to the Web server 2.
[0032]
At that time, since all requests from the Internet 3 are accepted without being rejected, a load with an arrival rate lower than the average arrival rate cannot be given, but the load at the maximum arrival rate during the period of load adjustment processing If it exceeds the amount, an arbitrary load amount can be set by adjusting a parameter of the random number generator 6. As a matter of fact, Web sites that are constantly subjected to high loads are rare, and the number of requests decreases considerably during a certain day of the day, such as at dawn, and the average resource usage rate is often several percent. If load adjustment processing is performed during such a time period, the degree of freedom of load that can be set is large.
[0033]
Therefore, according to the present embodiment, it is possible to perform a load test for collecting performance data related to the system model of the Web server 2 in a state where a desired steady load is applied without interrupting processing for a request from the Internet 3. it can.
[0034]
FIG. 4 shows another embodiment of the present invention. In general, there are multiple types of requests, so to estimate the amount of hardware resources used by each type of request, you can change the average arrival rate of various requests and the mix ratio of requests multiple times. It is necessary to measure and acquire performance data. Actually, when collecting performance data by a conventional normal load test, several types of performance data are collected while changing the mixing ratio of loads according to various requests. Therefore, in the present embodiment, as shown in the figure, load adjustment filters 41a to 41d are provided for each of various requests so that the arrival time intervals of the various requests can be adjusted independently.
[0035]
That is, requests from the Internet are distributed to the load adjustment filters 41a to 41d corresponding to the various requests by the network dispatcher 42, and transferred to the Web server 40 at the timing of each load adjustment filter 41a to 41d. ing. Each load adjustment filter 41a to 41d shares one pseudo client 43 extended so that various requests can be supplied, and can acquire a corresponding type of request as needed. Thereby, the mixing ratio of various requests can be adjusted.
[0036]
FIG. 5 shows the configuration of the load adjustment filters 41a to 41d. Each load adjustment filter 41a to 41d receives a request corresponding to itself among requests sent to the Web server 40 via the Internet via the dispatcher 42, and temporarily stores the reception queue 51, A random number generator 52 set to generate a random number with a probability distribution corresponding to the type of request stored in the queue 51, and a request from the queue 51 or the pseudo client 43 at a timing according to the random number generated by the random number generator 52 Is sent to the Web server 40. The queue 51, the random number generator 52, and the gate 53 have the same configuration as the queue 4, the random number generator 6, and the gate 7 in the load adjustment filter 1 of FIG.
[0037]
The gates 53 of the load adjustment filters 41a to 41d share one pseudo client 43 that is expanded so that various requests can be supplied. This is because session information can be given to the request transferred to 40. In other words, depending on the application program that constitutes the system model in the Web server 40, there is one that holds the session state on the Web server 40 side. In this case, the request is normal only when it includes appropriate session information. To be processed. In other words, there is no point in sending an inappropriate request. As a simple example, even if a logout request is sent without the session information that should be returned at the time of login, the processing in the Web server 40 for the request results in an error, and the normal processing is Not done. Therefore, the pseudo client 43 is employed so that appropriate session information can be given to each request.
[0038]
The pseudo client 43 defines a state transition according to a state transition graph that transitions between states corresponding to the state transition on the Web server 40 side, and includes a queue corresponding to each state. In each queue, a thread for transmitting a request including session information is stored in advance. When each type of request is requested, the pseudo client 43 takes out the thread that transmits the request of the type from the queue, transmits the request by the thread, and puts the thread in the queue of the next state according to the state transition graph. Move.
[0039]
As a specific example, consider a case where the system model in the Web server 40 is configured by a Web application of a simple shopping site. As shown in FIG. 4, the pseudo client 43 indicates, as a state transition graph, between each state of the state 44 before login, the state 45 during login, and the state 46 after logout corresponding to the state transition on the Web server 40 side. Are defined, and queues 47 to 49 corresponding to the states 44 to 46 are provided. The type of request is A. Login, B. Catalog display, C.I. Settlement, D. There are four types of logout. The request that can be sent in the pre-login state 44 is login (A), and the request that can be sent in the logged-in state 45 is catalog display (B), settlement (C), or logout (D). There is no request that can be sent in the state 46 after logout.
[0040]
Each arrow in the transition state graph extends from the pre-transition state to the post-transition state, and each arrow is accompanied by a symbol A to D indicating the type of request sent by the thread during the state transition indicated by the arrow. ing. That is, when a thread in the pre-login state 44 issues a login request A, the thread is moved to the queue 48. When a thread in the logged-in state 45 issues a catalog display request B or a settlement request C, the thread is returned to the queue 48. When a thread in the logged-in state 45 issues a logout request D, the thread is moved to the queue 49.
[0041]
In the queues 47 and 48, a number of threads that can respond to request requests during the load adjustment period are prepared in advance. In other words, the pseudo client 43 prepares a predetermined number of threads in the queue 47, transmits a login request A to the Web server 40 using an appropriate number of threads, acquires session information from the Web server 40, and acquires each thread. Move to queue 48. As a result, an appropriate number of threads in the pre-login state are stored in the queue 47, and threads having an appropriate number of session information in the login state are stored in the queue 48.
[0042]
When the login request A is requested, the pseudo client 43 takes out the thread from the queue 47 in the pre-login state, transmits the login request A by the thread, and moves the red to the queue 48 in the login state. . When the catalog display request B or the settlement request C is requested, the thread is taken out from the queue 48 in the login state, the catalog display request B or the settlement request C including the session information is transmitted by the thread, and the thread is queued. Return to 48. When the logout request D is requested, the thread is taken out from the queue 48 in the login state, the logout request D including the session information is transmitted by the thread, and the thread is moved to the queue 49. The thread moved to the queue 49 may be deleted or returned to the queue 47 in the pre-login state.
[0043]
When a more complicated graph is used as the state transition graph, there may be a plurality of thread states that can transmit a request for a request. In that case, a state in which the request is transmitted at random may be selected from the plurality of states.
[0044]
According to the pseudo client 43, a sufficient number of threads are prepared in the queues 47 and 48 together with necessary session information in advance, so that requests for each type of request and requests for which session information is required are provided. But you can respond. Therefore, it is possible to apply a steady load different for each type of request to the system of the Web server 40 holding the session state while maintaining the normal operation state.
[0045]
The number of threads stored in the queues 47 and 48 in advance is set in each load adjustment filter 41a to 41d for the request A and the requests B, C, and D that can be transmitted in the corresponding pre-login state and in-login state. It can be determined in consideration of the distribution of arrival time intervals. In this case, for example, the number of threads can be estimated so that the probability that the threads in the queues 47 and 48 are not exhausted during the load adjustment period is 90% or more. In that case, as a rare case, if a thread disappears from the queue, the transmission of the corresponding request may be ignored. Performance data collected by load tests is statistically processed when estimating system model parameters based on this, so in rare cases, it arrives at a time interval that deviates from the arrival time interval distribution of the set request. Even if a request occurs, it is not a big problem.
[0046]
When performing load adjustment in order to collect performance data on the system model in the Web server 40, each load is previously set so as to generate a random number corresponding to a desired arrival time interval distribution for each of the requests A to D. Parameters of the random number generator 52 in the adjustment filters 41a to 41d are set. When performing the load adjustment, the gate 53 of each of the load adjustment filters 41a to 41d performs the same process as in FIG. That is, after acquiring a random number from the random number generator 52 and waiting for a time corresponding to the random number, if the request exists in the queue 51, the request is transferred to the Web server 40, and if not, the pseudo client 43 responds. The process of acquiring any of the types of requests A to D to be transferred and transferring them to the Web server 40 is repeated.
[0047]
As a result, the gates 53 of the load adjustment filters 41a to 41d add the requests A to D from the pseudo client to the requests A to D from the Internet, and the requests 53 to 41 correspond to the setting of the probability distribution in each random number generator 52. The arrival time interval distribution can be supplied to the Web server 40. Therefore, the load amount differs for each request type, and a steady load can be applied to the Web server 40.
[0048]
Therefore, according to the present embodiment, in the case of a service that improves the performance of the system model in the customer's Web server 40, a steady load can be obtained without stopping the operating system for a long time and causing a loss of transaction opportunities. The performance data can be collected and the parameters of the system model can be estimated. As a result, the threshold for performance services for customers who are afraid of losing business opportunities is lowered, which can greatly contribute to the development of the service business.
[0049]
Also, when autonomous computing technology is available, the load adjustment filter according to the present invention promotes such introduction because the cost of introducing the autonomous adjustment function based on the system model into the operating system is small. can do.
[0050]
Note that the present invention is not limited to the above-described embodiment, and can be appropriately modified and implemented. For example, in the above description, requests sent to the server are temporarily stored in a queue, and the load is adjusted by mixing pseudo requests when transferring the request. Instead, the request is sent to the server. Monitor incoming requests without accumulating them in the queue, and send pseudo requests directly to the server according to the monitoring results, adding pseudo requests to the original requests and adjusting the load. You may do it.
[0051]
With regard to the load adjustment filter according to each of the above-described embodiments, a particularly assumed application scene is that a web application is analyzed by analyzing the performance of a web server composed of a websphere (WebSphere) product group provided by the applicant. In addition, there are scenes of services that find server software parameters (number of threads, cache size, etc.) that are optimal for the expected request volume, and automatic control methods that dynamically adjust server software parameters. . The parameter of the system model in this case is a consumption amount of hardware resources such as a CPU, a disk I / O, and a network I / O consumed by a transaction corresponding to each request. In a typical three-tier Web server, the hardware resource consumption of transactions in the HTTP server, application server, and database tiers are individually estimated to complete the model.
[0052]
【The invention's effect】
As described above, according to the present invention, since the load applied to the server is adjusted by adding a pseudo request to the request transmitted to the server, the service provision by the server is stopped. The adjusted load can be applied to the server without causing it to occur.
[0053]
In addition, since a request in which a pseudo request is added to a request transmitted to a server is transferred to the server at a timing that arrives at a predetermined arrival time interval distribution, the load is made steady. Can do.
[0054]
In addition, for requests sent to the server, for each type of request, a pseudo request is added and transferred at a timing that arrives with its own predetermined arrival time interval distribution. The load can be made steady for each type.
[0055]
In addition, for the types of pseudo requests that need to include session information, the request is generated as including the session information acquired by transferring the request to the server in advance, so the session state is maintained. The load can be adjusted without trouble for the servers that are running.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a module configuration of a load adjustment filter according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a hardware configuration of the load adjustment filter of FIG. 1;
FIG. 3 is a flowchart showing a load adjustment processing procedure by a gate of the load adjustment filter of FIG. 1;
FIG. 4 is a block diagram showing another embodiment of the present invention.
FIG. 5 is a block diagram showing a configuration of each load adjustment filter in the embodiment of FIG. 4;
FIG. 6 is a diagram illustrating a procedure for performing performance evaluation based on a system model.
[Explanation of symbols]
1: load adjustment filter, 2: Web server: Internet, 4: reception queue, 5: pseudo client, 6: random number generator, 7: gate, 21: CPU, 22: memory, 23: input means, 24: display, 25: Communication interface, 26: Bus, 40: Web server, 41a to 41d: Load adjustment filter, 42: Dispatcher, 43: Pseudo client, 44: Pre-login state, 45: Login state, 46: Post logout state, 47 ~ 49: thread queue, 51: request queue, 52: random number generator, 53: gate.

Claims (14)

クエストによるサーバへの負荷を調整するリクエスト負荷調整装置であって、
記サーバに送信されてくるリクエストに対し、擬似的なリクエストを、前記サーバへ到着するリクエストの到着時間間隔が所定の分布となるように加えることにより前記負荷の調整を行う負荷調整手段を備え、
前記負荷調整手段は、
前記サーバに送信されてくるリクエストを一時的に蓄えるキューと、
擬似的にリクエストを発生するリクエスト発生手段と、
前記キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は前記リクエスト発生手段が発生するリクエストを、順次前記到着時間間隔が前記所定の分布となるタイミングで前記サーバに転送する転送手段とを具備することを特徴とするリクエスト負荷調整装置。
A request load adjustment device for adjusting the load on the server by requests,
To request transmitted before Symbol server, a pseudo-request comprises a load adjusting means for adjusting the load by inter-arrival times of requests arriving into the server applies to a predetermined distribution ,
The load adjusting means is
A queue for temporarily storing requests sent to the server;
A request generating means for generating a pseudo request;
A transfer means for sequentially transferring the request generated by the request generation means when there is a request in the queue to the server at a timing when the arrival time interval is the predetermined distribution; request load adjustment device characterized by comprising a.
前記負荷調整手段は、リクエストの種類毎に、前記擬似的なリクエストの追加を行い、異なる前記到着時間間隔分布となるタイミングで前記転送を行うものであることを特徴とする請求項に記載のリクエスト負荷調整装置。The load adjusting means, for each type of request, to add the pseudo-request, according to claim 1, characterized in that for performing the transfer timing to be different from the arrival time distribution Request load adjustment device. 所定の確率分布に従った乱数を発生する乱数発生手段を備え、前記転送手段は前記到着時間間隔が所定の分布となるタイミングを、前記乱数に基づいて決定するものであることを特徴とする請求項に記載のリクエスト負荷調整装置。2. Random number generation means for generating random numbers according to a predetermined probability distribution, wherein the transfer means determines a timing at which the arrival time interval becomes a predetermined distribution based on the random numbers. Item 4. The request load adjustment device according to Item 1 . リクエストによるサーバへの負荷を調整するリクエスト負荷調整装置であって、
前記サーバに送信されてくるリクエストに対し、擬似的なリクエストを、前記サーバへ到着するリクエストの到着時間間隔が所定の分布となるように加えることにより前記負荷の調整を行う負荷調整手段を備え、
前記負荷調整手段は、
前記サーバに送信されてくるリクエストをその種類に応じた分類毎に一時的に蓄える複数のリクエスト・キューと、
前記サーバに送信されてくるリクエストを種類に応じて対応する各リクエスト・キューに配分するディスパッチャと、
要求された種類のリクエストを擬似的に発生するリクエスト発生手段と、
各リクエスト・キューに対応させて設けられた転送手段とを備え、
各転送手段は、独自の前記到着時間間隔が前記所定の分布となるタイミングで、対応するリクエスト・キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は前記リクエスト発生手段に要求して発生させる該リクエスト・キューに対応する種類のリクエストを、順次前記サーバに転送するものであることを特徴とするリクエスト負荷調整装置。
A request load adjusting device that adjusts a load on a server due to a request,
Load adjustment means for adjusting the load by adding a pseudo request to the request transmitted to the server so that the arrival time intervals of the requests arriving at the server have a predetermined distribution,
The load adjusting means is
A plurality of request queues for temporarily storing requests sent to the server for each classification according to the type;
A dispatcher that distributes requests sent to the server to corresponding request queues according to the type;
A request generating means for artificially generating the requested type of request;
And a transfer means provided corresponding to each request queue,
Each transfer means requests the request generation means if the request exists in the corresponding request queue when the unique arrival time interval becomes the predetermined distribution, and if the request does not exist. the type of request corresponding to the request queue to generate, features and be Brighter Quest load adjusting device that is for sequentially transferred to the server.
前記リクエスト発生手段は、セッション情報を含むことが必要な種類のリクエストについては、予め前記サーバにリクエストを転送することによって取得したセッション情報を含むものとして、そのリクエストを発生するものであることを特徴とする請求項に記載のリクエスト負荷調整装置。The request generation means generates a request for a type of request that needs to include session information, including the session information acquired by transferring the request to the server in advance. The request load adjusting device according to claim 4 . 前記リクエスト発生手段は、とり得る各状態において対応する種類のリクエストを発生するスレッドを、各状態毎に蓄積する複数のスレッド・キューを備え、各スレッドはリクエストを前記サーバに転送することによって取得したセッション情報を保持し、該セッション情報を含むリクエストを発信することができるものであることを特徴とする請求項に記載のリクエスト負荷調整装置。The request generation means includes a plurality of thread queues that accumulate, for each state, a thread that generates a corresponding type of request in each possible state, and each thread is acquired by transferring a request to the server. 5. The request load adjusting apparatus according to claim 4 , wherein the request load adjusting apparatus is capable of holding session information and transmitting a request including the session information. コンピュータを、請求項1〜のいずれかのリクエスト負荷調整装置における各手段として機能させることを特徴とするプログラム。A program for causing a computer to function as each means in the request load adjusting device according to any one of claims 1 to 6 . クエストによるサーバへの負荷をコンピュータにより調整するリクエスト負荷調整方法であって、
前記コンピュータが、前記サーバに送信されてくるリクエストに対し、擬似的なリクエストを、前記サーバへ到着するリクエストの到着時間間隔が所定の分布となるように加えることにより前記負荷の調整を行う負荷調整手順を備え、
前記負荷調整手順は、
前記コンピュータが、前記サーバに送信されてくるリクエストを一時的にキューに蓄える手順と、
前記コンピュータが、擬似的にリクエストを発生するリクエスト発生手順と、
前記コンピュータが、前記キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は前記リクエスト発生手順により発生するリクエストを、順次前記到着時間間隔が前記所定の分布となるタイミングで前記サーバに転送する転送手順とを具備することを特徴とするリクエスト負荷調整方法。
A request load adjusting method for adjusting the load on the server by requests by a computer,
The computer, to request transmitted before Symbol server, load the pseudo-request, arrival time of requests arriving into the server to adjust the load by adding to a predetermined distribution With adjustment procedures ,
The load adjustment procedure includes:
A procedure in which the computer temporarily stores a request sent to the server in a queue;
A request generation procedure in which the computer generates a pseudo-request;
If the computer has a request in the queue, the computer sequentially forwards the request generated by the request generation procedure to the server at a timing when the arrival time interval becomes the predetermined distribution. A request load adjusting method , comprising:
前記負荷調整手順では、前記コンピュータが、リクエストの種類毎に、前記擬似的なリクエストの追加を行い、異なる前記到着時間間隔分布となるタイミングで前記転送を行うことを特徴とする請求項に記載のリクエスト負荷調整方法。In the load adjustment procedure, the computer, for each type of request, to add the pseudo-request, according to claim 8, characterized in that said transfer timing as the different the inter-arrival time distribution Request load adjustment method. 前記コンピュータが所定の確率分布に従った乱数を発生する乱数発生手順を備え、前記転送手順では前記コンピュータが、前記到着時間間隔が所定の分布となるタイミングを、前記乱数に基づいて決定することを特徴とする請求項に記載のリクエスト負荷調整方法。The computer includes a random number generation procedure for generating random numbers according to a predetermined probability distribution, and in the transfer procedure, the computer determines a timing at which the arrival time interval becomes a predetermined distribution based on the random number. The request load adjusting method according to claim 8 , wherein the request load is adjusted. リクエストによるサーバへの負荷をコンピュータにより調整するリクエスト負荷調整方法であって、
前記コンピュータが、前記サーバに送信されてくるリクエストに対し、擬似的なリクエストを、前記サーバへ到着するリクエストの到着時間間隔が所定の分布となるように加えることにより前記負荷の調整を行う負荷調整手順を備え、
前記負荷調整手順は、
前記コンピュータが、前記サーバに送信されてくるリクエストをその種類に応じた分類毎に一時的に複数のリクエスト・キューに蓄える手順と、
前記コンピュータが、前記サーバに送信されてくるリクエストを種類に応じて各リクエスト・キューに配分する手順と、
前記コンピュータが、要求された種類のリクエストを擬似的に発生するリクエスト発生手順と、
前記コンピュータが、各リクエスト・キュー毎に異なる前記到着時間間隔が前記所定の分布となるタイミングで、各リクエスト・キュー毎に、リクエスト・キュー内にリクエストが存在する場合はそのリクエストを、存在しない場合は前記リクエスト発生手順により発生させる対応する種類のリクエストを、順次前記サーバに転送する手順とを有することを特徴とするリクエスト負荷調整方法。
A request load adjustment method for adjusting a load on a server by a request by a computer,
Load adjustment for adjusting the load by adding a pseudo request to a request sent to the server so that arrival time intervals of requests arriving at the server have a predetermined distribution. With steps,
The load adjustment procedure includes:
A procedure in which the computer temporarily stores requests sent to the server in a plurality of request queues for each classification according to the type;
The computer distributes the requests sent to the server to each request queue according to the type;
A request generation procedure in which the computer artificially generates a request of a requested type;
When there is a request in the request queue for each request queue at the timing when the arrival time interval different for each request queue becomes the predetermined distribution, and the computer does not exist features and to Brighter Quest load adjusting method to have a procedure for transferring the corresponding type of the request is generated by the request generation procedure, sequentially to the server.
前記リクエスト発生手順では、前記コンピュータが、セッション情報を含むことが必要な種類のリクエストについては、予め前記サーバにリクエストを転送することによって取得したセッション情報を含むものとして、そのリクエストを発生することを特徴とする請求項11に記載のリクエスト負荷調整方法。In the request generation procedure, for the type of request that needs to include session information, the computer generates the request as including the session information acquired by transferring the request to the server in advance. The request load adjusting method according to claim 11 , wherein the request load is adjusted. 前記リクエスト発生手順は、前記コンピュータが、とり得る各状態において対応する種類のリクエストを発生するスレッドを、複数のスレッド・キューに対し各状態毎に蓄積する手順を備え、前記リクエスト発生手順では、前記コンピュータが、各スレッドにより、リクエストを前記サーバに転送することによって取得したセッション情報を保持し、該セッション情報を含むリクエストを発信することを特徴とする請求項11に記載のリクエスト負荷調整方法。The request generation procedure includes a procedure in which a thread that generates a request of a corresponding type in each possible state of the computer is accumulated for each state in a plurality of thread queues. 12. The request load adjusting method according to claim 11 , wherein the computer holds session information acquired by transferring a request to the server by each thread, and transmits a request including the session information. 請求項1〜のいずれかのリクエスト負荷調整装置又は請求項8〜13のいずれかのリクエスト負荷調整方法により、リクエストによるサーバへの負荷を調整しながら、前記サーバの性能に関するデータを収集することを特徴とする性能データ収集方法。Collecting data relating to the performance of the server while adjusting the load on the server due to the request by the request load adjusting device according to any one of claims 1 to 6 or the request load adjusting method according to any one of claims 8 to 13. A performance data collection method characterized by
JP2003145589A 2003-05-23 2003-05-23 Request load adjusting apparatus and method, program, and performance data collecting method Expired - Fee Related JP4472944B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003145589A JP4472944B2 (en) 2003-05-23 2003-05-23 Request load adjusting apparatus and method, program, and performance data collecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003145589A JP4472944B2 (en) 2003-05-23 2003-05-23 Request load adjusting apparatus and method, program, and performance data collecting method

Publications (2)

Publication Number Publication Date
JP2004348491A JP2004348491A (en) 2004-12-09
JP4472944B2 true JP4472944B2 (en) 2010-06-02

Family

ID=33532677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003145589A Expired - Fee Related JP4472944B2 (en) 2003-05-23 2003-05-23 Request load adjusting apparatus and method, program, and performance data collecting method

Country Status (1)

Country Link
JP (1) JP4472944B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4579139B2 (en) * 2005-11-17 2010-11-10 西日本電信電話株式会社 Information collection system, information collection device, and information temporary storage device
JP4135956B2 (en) 2006-05-16 2008-08-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Technology for analyzing the performance of information processing systems with multiple information processing devices
JP2007310836A (en) * 2006-05-22 2007-11-29 Daiwa Securities Group Inc Evaluation apparatus and design apparatus, method for evaluating and method for designing, program for evaluation, program for design and information recording medium
JP4627539B2 (en) * 2007-07-19 2011-02-09 株式会社日立情報システムズ Load test system, load test data creation method, and program thereof
JP4962239B2 (en) * 2007-09-20 2012-06-27 大日本印刷株式会社 Resource usage acquisition device, resource usage acquisition method, and resource usage acquisition processing program
WO2013145629A1 (en) * 2012-03-30 2013-10-03 日本電気株式会社 Information processing device for executing load evaluation and load evaluation method

Also Published As

Publication number Publication date
JP2004348491A (en) 2004-12-09

Similar Documents

Publication Publication Date Title
US6601020B1 (en) System load testing coordination over a network
Jader et al. A state of art survey for web server performance measurement and load balancing mechanisms
CN105281981B (en) The data traffic monitoring method and device of network service
US20210184947A1 (en) Automatic capture of detailed analysis information based on remote server analysis
Chen et al. Session-based overload control in qos-aware web servers
CN102684988B (en) Load control device and method thereof
US8200812B2 (en) Reducing workload on a backend system using client side request throttling
US6021439A (en) Internet quality-of-service method and system
US9223622B2 (en) Capacity planning of multi-tiered applications from application logs
US7090749B2 (en) Method and apparatus for simulating application workloads on an e-business application server
EP2040171A1 (en) Computer system managing device, and computer system managing method
US20050154576A1 (en) Policy simulator for analyzing autonomic system management policy of a computer system
Zhu et al. Research the performance testing and performance improvement strategy in web application
US8639796B2 (en) Monitoring the performance of a streaming media server using server-side and client-side measurements
US20090157864A1 (en) Grid computing control method for testing application program capacity of server and service method thereof
US9311598B1 (en) Automatic capture of detailed analysis information for web application outliers with very low overhead
US20110172963A1 (en) Methods and Apparatus for Predicting the Performance of a Multi-Tier Computer Software System
Chen et al. Overload control in QoS-aware web servers
JP4472944B2 (en) Request load adjusting apparatus and method, program, and performance data collecting method
JP2009517733A (en) Grid computing system for testing server application program performance
Wei et al. Measuring client-perceived pageview response time of internet services
Hernández-Orallo et al. Web server performance analysis using histogram workload models
CN109640127A (en) The Fault Locating Method and device of content distributing network
Hardwick et al. Modeling the performance of e-commerce sites
Zatwarnicki Providing Web service of established quality with the use of HTTP requests scheduling methods

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060920

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061116

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070328

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070515

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20070620

A912 Removal of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20071122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100122

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20100224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100304

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130312

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140312

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees