パスワードを忘れた? アカウント作成
457282 journal

bananan_wの日記: 英語勉強日記#9(翻訳がんばろう日記)

日記 by bananan_w
15章。週末中に18章着手目指してがんがりましょう。

15. Remote Testing
15. リモートテスト

    In the event that your JMeter client machine is unable, performance-wise, to simulate enough users to stress your server, an option exists to control multiple, remote JMeter engines from a single JMeter GUI client. By running JMeter remotely, you can replicate a test across many low-end computers and thus simulate a larger load on the server. One instance of the JMeter GUI client can control any number of remote JMeter instances, and collect all the data from them. This offers the following features:
    JMeterクライアントマシンが性能的に、付加をシミュレートするためのユーザが十分ではない等により使用できない場合には、複数のJMeterを制御するためのオプションが存在し、リモートのJMeterを一つのJMeter GUIクライアントから操作できます。リモートからJMeterを動作させることにより沢山の安価なコンピュータにテストを複製して、サーバに対する巨大な付加をシミュレートできます。JMeter GUIクライアントの一つのインスタンスがリモートの複数のJMeterインスタンスの制御と、全てのデータを収集できます。これは以下を実現します。

         * Saving of test samples to a local machine
         * テストサンプルをローカルマシンに保存します

       * Managment of multiple JMeterEngines from a single machine
       * 一台のマシンで複数のJMeterを管理運用します

    However, remote mode does use more resources than running the same number of non-GUI tests independently.
    しかしながら、リモートモードは独立して同じ数のnon-GUIテストを独立して実施するよりも多くのリソースを使用します。

    Note that while you can indeed execute the JMeterEngine on your application server, you need to be mindful of the fact that this will be adding processing overhead on the application server and thus your testing results will be somewhat tainted. The recommended approach is to have one or more machines on the same Ethernet segment as your application server that you configure to run the JMeter Engine. This will minimize the impact of the network on the test results without impacting the performance of the application serer itself.
    アプリケーションサーバに実際にJMeterによって負荷をかけている際には、アプリケーションサーバのテスト結果は追加する処理によって生じるオーバヘッドのため多少不正確となることに注意してください。アプリケーションサーバと同一のイーサネットセグメントに付加をかけるJMeterを複数用意することが望ましい手法です。ネットワークによる影響を最小化し、ネットワークに影響されないアプリケーションサーバの性能のテスト結果を得られます。

    Step 1: Start the servers
    Step 1: サーバを起動する

    To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the JMETER_HOME/bin/jmeter-server (unix) or JMETER_HOME/bin/jmeter-server.bat (windows) script.
    リモートノードでJMeterを実行するには、実行させたい全てのマシン上でJMeterサーバコンポーネントをJMETER_HOME/bin/jmeter-server (unix) か JMETER_HOME/bin/jmeter-server.bat (windows)スクリプトによって起動させます。

    Note that there can only be one JMeter server on each node unless different RMI ports are used.
    異なるRMIポートを使用する場合を除いて、一台のノードで実行できるJMeterサーバの数は一つだけであることに注意してください。

    Since JMeter 2.3.1, the JMeter server application starts the RMI registry itself; there is no need to start RMI registry separately. To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems.
    JMeter 2.3.1 以降ではJMeterサーバアプリケーションはRMIレジストリに自分で登録します。これはRMIレジストリを別途開始させる必要がないことを意味します。2.3.1より前の状態に戻すには、サーバホストシステムにJMeterプロパティserver.rmi.create=falseを定義します。

    Step 2: Add the server IP to your client's Properties File
    Step 2: クライアントのプロパティファイルにサーバのIPアドレスを追加する

    Edit the properties file on the controlling JMeter machine . In /bin/jmeter.properties, find the property named, "remote_hosts", and add the value of your running JMeter server's IP address. Multiple such servers can be added, comma-delimited.
    制御するJMeterマシンのプロパティファイルを編集します。bin/jmeter.properties(訳注:/binじゃないよ)にプロパティ名"remote_hosts"にJMeterサーバのIPアドレスを追記します。複数のサーバを登録する場合にはカンマ区切で登録します。

    Note that you can use the -R command line option instead to specify the remote host(s) to use. This has the same effect as using -r and -Jremote_hosts={serverlist}. E.g. jmeter -Rhost1,127.0.0.1,host2
    コマンドラインで-Rオプションを使用することでリモートホストを指示できることに注意してください。これは-r -Jremote_hosts={serverlist}と等価です。例: jmeter -Rhost1,127.0.0.1,host2

    If you define the JMeter property server.exitaftertest=true, then the server will exit after it runs a single test. See also the -X flag (described below)
    JMeterプロパティserver.exitaftertest=trueが定義されている場合、一度のテストを完了した後にサーバは終了します。-Xフラグについて参照してください(後に記します)。

    Step 3a: Start the JMeter Client from a GUI client
    Step 3a: GUIクライアントからJMeterクライアントを開始させる

    Now you are ready to start the controlling JMeter client. For MS-Windows, start the client with the script "bin/jmeter.bat". For UNIX, use the script "bin/jmeter". You will notice that the Run menu contains two new sub-menus: "Remote Start" and "Remote Stop" (see figure 1). These menus contain the client that you set in the properties file. Use the remote start and stop instead of the normal JMeter start and stop menu items.
    管理するためのJMeterクライアントを起動させる準備が整いました。MS-Windowsである場合には"bin/jmeter.bat"、UNIXである場合には"bin/jmeter"スクリプトを使用します。実行メニューに二つの新しいサブメニュー"開始(リモート)"と"停止(リモート)"の存在に気がつくでしょう(図1を参照してください)(訳注:図15-1じゃないの?)。

    Figure 1 - Run Menu
    図1 - 実行メニュー(訳注:図15-1では?)

    Step 3b: Start the JMeter from a non-GUI Client
    Step 3b: JMeterをnon-GUIクライアントで起動させる

    As an alternative, you can start the remote server(s) from a non-GUI (command-line) client. The command to do this is:
    他の手段として、リモートサーバをnon-GUI(コマンドライン)クライアントとして起動できます。コマンドは以下の通りです:

    jmeter -n -t script.jmx -r
    or
    又は
    jmeter -n -t script.jmx -R server1,server2...

    Other flags that may be useful:
    他に以下のフラグが便利です:

    -Gproperty=value - define a property in all the servers (may appear more than once)
    -Gproperty=value - 全てのサーバにプロパティを定義します(複数回出現します)

    -Z - Exit remote servers at the end of the test.
    -Z - テスト終了時にリモートサーバを終了させます

    The first example will start whatever servers are defined in the JMeter property remote_hosts; the second example will define remote_hosts from the list of servers and then run the remote servers.
    The command-line client will exit when all the remote servers have stopped.
    一つ目の例はJMeterプロパティremote_hostsに登録されている全てのサーバを起動します。二つ目の例はremote_hostsをサーバの一覧で定義してリモートサーバを起動します。
    コマンドラインクライアントは全てのリモートサーバが停止した後に終了します。

    15.1 Doing it Manually
    15.1 手動で起動する

        In some cases, the jmeter-server script may not work for you (if you are using an OS platform not anticipated by the JMeter developers). Here is how to start the JMeter servers (step 1 above) with a more manual process:
        いくつかのケースで、jmeter-serverスクリプトが動作しない(JMeter開発者が予期していないOSプラットフォームを使用している場合)かもしれません。これはJMeterサーバを手動で起動する手順(上記のStep 1)です。

        Step 1a: Start the RMI Registry
        Step 1a: RMIレジストリを起動させる

        Since JMeter 2.3.1, the RMI registry is started by the JMeter server, so this section does not apply in the normal case. To revert to the previous behaviour, define the JMeter property server.rmi.create=false on the server host systems and follow the instructions below.
        JMeter 2.3.1 からJMeterサーバによってRMIレジストリが開始されますが、このセクションは正常ではないケースを想定しています。JMeter 2.3.1 より前の状態にするため、JMeterプロパティserver.rmi.create=falseをサーバホストシステムに定義し、以下の指示に従ってください。

        JMeter uses Remote Method Invocation (RMI) as the remote communication mechanism. Therefore, you need to run the RMI Registry application (which is named, "rmiregistry") that comes with the JDK and is located in the "bin" directory. Before running rmiregistry, make sure that the following jars are in your system claspath:
        JMeterはRemote Method Invocation (RMI)を使用してリモート通信を実現しています。そのため、JDKとともに配布され"bin"ディレクトリに存在するRMIレジストリアプリケーション("rmiregistry"という名前)を起動させる必要があります。rmiregistryを起動する前に、システムクラスパスに以下のjarファイルが存在するか確認してください。

            * JMETER_HOME/lib/ext/ApacheJMeter_core.jar
            * JMETER_HOME/lib/jorphan.jar
            * JMETER_HOME/lib/logkit-1.2.jar

        The rmiregistry application needs access to certain JMeter classes. Run rmiregistry with no parameters. By default the application listens to port 1099.
        rmiregistryアプリケーションはいくつかのJMeterクラスパスにアクセスする必要があります。rmiregistryをパラメータなしで起動させると、デフォルトではアプリケーションはポート1099で待ち受けます。

        Step 1b: Start the JMeter Server
        Step 1b: JMeterサーバを起動する

        Once the RMI Registry application is running, start the JMeter Server. Use the "-s" option with the jmeter startup script ("jmeter -s").
        RMIレジストリアプリケーションを起動させた後にJMeterサーバを起動します。JMeter起動スクリプトに"-s"オプションを追加します("jmeter -s")。

        Steps 2 and 3 remain the same.
        Step 2 と Step 3は同じです。

    15.2 Tips
    15.2 ヒント

        If you're running Suse Linux, these tips may help. The default installation may enable the firewall. In that case, remote testing will not work properly. The following tips were contributed by Sergey Ten.
        Suse Linuxを使用している場合には、これらのヒントは手助けになるでしょう。インストーラのデフォルトはファイアウォールを有効にします。この場合、リモートテストは期待通りには動作しないでしょう。以下のヒントはSergey Ten氏によって寄稿されました。

        If you see connections refused, turn on debugging by passing the following options.
        connections refusedを発見した場合には、デバッグを有効にして以下のオプションを適用します。

        Since JMeter 2.3.1, the RMI registry is started by the server; however the options can still be passed in from the JMeter command line. For example: "jmeter -s -Dsun.rmi.loader.logLevel=verbose" (i.e. omit the -J prefixes). Alternatively the properties can be defined in the system.properties file.
        JMeter 2.3.1 からRIMレジストリはサーバによって起動されます。しかしながら、JMeterコマンドラインはオプションをいまだに受け付けています。例えば、"jmeter -s -Dsun.rmi.loader.logLevel=verbose"(例:-Jプレフィックスを除く)。代わりとしてプロパティにはsystem.propertiesファイルにて定義できます。

        The solution to the problem is to remove the loopbacks 127.0.0.1 and 127.0.0.2 from etc/hosts. What happens is jmeter-server can't connect to rmiregistry if 127.0.0.2 loopback is not available. Use the following settings to fix the problem.
        問題の解決方法はループバックである127.0.0.1と127.0.0.2を/etc/hostsから削除することです。ループバック127.0.0.2が無効である場合には、JMeterサーバがrmiregistryに接続できない状況が発生します。以下の設定を使用することで問題を回避できます。

        Replace
        以下を置換します

            * `dirname $0`/jmeter -s "$@"

        With
        次のように

            * HOST="-Djava.rmi.server.hostname=[computer_name][computer_domain]
            * -Djava.security.policy=`dirname $0`/[policy_file]"
            * `dirname $0`/jmeter $HOST -s "$@"

        Also create a policy file and add [computer_name][computer_domain] line to /etc/hosts.
        ポリシーファイルを作成し、[computer_name][computer_domain]の行を/etc/hostsに追加します。

    15.3 Using a different port
    15.3 異なるポートを使用する

        By default, JMeter uses the standard RMI port 1099. It is possible to change this. For this to work successfully, all the following need to agree:
        デフォルトではJMeterは標準RMIポートに1099を使用します。これは変更することができます。変更する場合には、以下の全てを一致させる必要があります。

            * On the server, start rmiregistry using the new port number
            * On the server, start JMeter with the property server_port defined
            * On the client, update the remote_hosts property to include the new remote host:port settings
            * サーバ上において、rmiregistryを新しいポート番号で起動させる
            * サーバ上において、プロパティserver_portを定義する
            * クライアント上において、プロパティremote_hostsに新しいhost:port設定を含ませる

        Since Jmeter 2.1.1, the jmeter-server scripts provide support for changing the port. For example, assume you want to use port 1664 (perhaps 1099 is already used).
        JMeter 2.1.1 からは、ポート番号の変更をサポートしたjmeter-serverスクリプトを同梱しています。例えば、ポート1664を使用したいと仮定します(もし1099を既に使用している場合)。

        On Windows (in a DOS box)
        Windows上 (DOS窓で)
        C:\JMETER> SET SERVER_PORT=1664
        C:\JMETER> JMETER-SERVER [other options]

        On Unix:
        Unix上:
        $ SERVER_PORT=1664 jmeter-server [other options]
        [N.B. use upper case for the environment variable]
        [上のケースでは環境変数を使用します]

        In both cases, the script starts rmiregistry on the specified port, and then starts JMeter in server mode, having defined the "server_port" property.
        両方のケースにおいて、スクリプトはrmiregistryを指定したポート番号で起動させ、JMeterをサーバモードで起動させ、"server_port"プロパティを定義します。

        The chosen port will be logged in the server jmeter.log file (rmiregistry does not create a log file).
        選択したポート番号はサーバのjmeter.logファイルに出力されます(rmiregistryはログを出力しません)。

    15.4 Using sample batching
    15.4 サンプルバッチ処理を実行する

        Listeners in the test plan send their results back to the client JMeter which writes the results to the specified files By default, samples are sent back as they are generated. This can place a large load on the network and the JMeter client. There are some JMeter properties that can be set to alter this behaviour.
        クライアントJMeterが受信した結果をテスト計画のリスナに送信させ、指定したファイルに保存します(訳注:By defaultの前にドットが抜けてる)。デフォルトでは生成された通りにサンプルを送信します。これはJMeterクライアントとネットワークに巨大な負荷をかけます。いくつかのJMeterプロパティによってこの挙動を変更できます。

            * mode - sample sending mode - default is Standard
            * mode - サンプル送信モード - デフォルトはStandard

                  o Standard - send samples as soon as they are generated
                  o Standard - サンプルが生成されるや否や送信します。

                  o Hold - hold samples in an array until the end of a run. This may use a lot of memory on the server.
                  o Hold - テストが完了するまで配列に保持する。サーバ上に大量のメモリが必要となるかもしれません。

                  o Batch - send saved samples when either the count or time exceeds a threshold
                  o Batch - 回数か指定の時間を経過した場合に保存したサンプルを送信します。

                  o Statistical - send a summary sample when either the count or time exceeds a threshold. The samples are summarised by thread group name and sample label. The following fields are accumulated:
                  o Statistical - 回数か指定の時間を経過した場合にサンプルの要約を送信します。サンプルはスレッドグループ名とサンプルラベルで要約を作ります。以下の項目が蓄積されます:

                        + elapsed time
                        + latency
                        + bytes
                        + sample count
                        + error count
                        + 経過時間
                        + レイテンシ
                        + バイト長
                        + サンプル数
                        + エラー数

                    Other fields that vary between samples are lost.
                    他のサンプルに関する項目は失われます。

        The following properties apply to the Batch and Statistical modes:
        以下のプロパティはBatchとStatisticalモードで適用されます:

            * num_sample_threshold - number of samples in a batch (default 100)
            * time_threshold - number of milliseconds to wait (default 60 seconds)
            * num_sample_threshold - サンプルをバッチ処理する数(デフォルトは100)
            * time_threshold - ミリ秒単位の待機する時間(デフォルトは60秒)
この議論は賞味期限が切れたので、アーカイブ化されています。 新たにコメントを付けることはできません。
typodupeerror

あつくて寝られない時はhackしろ! 386BSD(98)はそうやってつくられましたよ? -- あるハッカー

読み込み中...