Home skin

 

  Location : TOP > Usage
> Multi-server mode
 
     
  1 Startup TG in listener mode
2 Startup TGC and connect to Master server
3 Load configuration
4 Regist and connect to Slave server
5 Start transactions
6 Check performance
7 Stop transactions
 
     
  >> TOP  
 
   

 

 

 

 

This chapter describes the usage of Multi-server mode. This function enables TG to generate big transactions arranging multiple TG servers syncronized.

In the following figure, TGs on Server.B and Server.C put load on the database server on Server.D at the same time.

The relationship of TGs between Server.B and Server.C is the relationship between "Master server" and "Slave server". All operations is executed from Master server. When TGC (TG Controller) is used, TGC connects to Master server and enables you GUI-based operation. ( In the following figure, TGC is running on Server.A)
 
 

 

  Step1 - Startup TG in listener mode (on Server.B,C) -

Startup TG in listener mode on Server.B and Server.C. On windows platform, execute "tg.bat" batch file with "-server" option.

 
* for Windows platform
C:\> cd tg08X
C:\tg08X> tg -server
 
 

When following messages are displayed, The startup of TG is completed. By default, TG is listening at the port "11111" and waiting the connection from TGC. If you want to change the port number, startup TG with "-port <port-number>" option.

 

TG - Transaction Generator - [ Version 0.8X ] Sat Jun 16 12:54:42 JST 2007

Checking specified address & Port is possible to use... OK.
Operating mode : "SERVER_FOR_TERMINAL".
- Listening Address : 0.0.0.0
- Port : 11111
if you forcely terminate this program , press "CTRL+C" in this console,
or kill TG process.

 

 

  Step2 - Startup TGC and connect to Master Server (Server.A) -

tartup TGC on Server.A.

 
※ COMMAND-LINE SAMPLE
C:\> cd tg08X
C:\tg08X> tgc
 

 

Click "TG" menu and select "Specify and connect TG...".

* If local TG server was startuped, you must shutdown it. See "Reference > Listener mode > STEP.2 - Startup TGC (on Server.B) -".

 
 

 

On "Specify and connect to TG..." window, specify the hostname and the port number ( Default : 11111 ) where Master server is running, and push "OK" button.

 
 

When TGC has connected to TG successfully, following messages are displayed.

 

TG - Transaction Generator - [ Version 0.8X ] Sat Jun 16 12:56:44 JST 2007
logged in.
TG>

 

 

Temporarily, disable Master server function. Click "TG" menu and select "Enable Master server". Make sure CHECK is removed.

 
 

 

  Step3 - Load configuration (on Server.A) -

Before connecting to Slave server, load sample configuration file. For example, use "sample.tgp". Click "File" menu and select "Open". To the next, choose "C:\tg07X\sample.tgp" file on the "Open" window.

 
 

When the configration file has been loaded successfully, the following message displayed at "TG Console". The configrations of TG and TGC are syncronized automatically.

 

TG> Syncronization has completed succesfully.

TG> reload config
Loading configration file... .OK.
Registered transactions:4 , variables:5 , jobs:1 , slave servers:0

TG>

 

 

  Step4 - Regist and connect to Slave server (on Server.A) -

Regist Slave server (which is running on Server.C) information. Click "TG" menu and select "Configure TG...".

 

 

 

In the following "Configure TG..." window, right-click on "Registered slave servers" field and select "Add new server".

 
 

 

On "Slave server configuration" field, specify hostname and port number(Default : 11111) and click "OK" button.

 
 

 

Syncronization with TG(Master server) is done again. When syncronization is executed successfully, slave server information is displayed on "TG Status" window (following red frame).

 

 

 

Enable Master server function. Click "TG" menu and select "Enable Master server". Make sure CHECK is added.

 
 

When the connection between Master server and Slave server is established successfully, the following message displayed at "TG Console". The configurations of Master server and Slave server are syncronized.

 

TG> masterserver on
MasterServer "ON".
Connecting to slave servers.
- serverc[11111] ..... Connected.
Synchronizing configration with slave servers.
- serverc[11111] .... Completed.

TG>

 

 

See "SlaveServer1 > Server Status" and "Sessions" on "TG Status" sub window at the left part of the main window of TGC.

You can confirm the connection is established between Master server and Slave server by having Server status from "UNKNOWN" into "ONLINE".

Moreover, TERMINATED value is changed from "10" into "20" because each TG server ( Master and Slave ) generate 10 Agents. It means that "CONNECTED", "DISCONNECTED", "TERMINATED", "ERROR", "TPS" are summary information of all TG servers.

 
 

 

  Step5 - Start transactions -

Click "Agent" menu on the main window of TGC and select "Make agnets connect to the target database". Make agents connect to the target database.

 
 

 

To the next, Click "Agent" menu and select "Activate agents". Put the load (agents send SQL requests) on the database server.

 
 

 

  Step6 - Check performance -

You can confirm the transaction statistics. Click "Monitor" menu and select "Monitoring start > show details".

 
 

 

The status of transaction is displayed on the "TG Console" window. The field is composed "Summary" and "Details". At [ Summary ] field, the number of transactions and errors of all TG servers are displayed, At [ Details ] field, each status of Master and slave servers is output.

 
TG> monitor details 600
Monitoring start. [ 600 Seconds ]
[Summary] 22:56:37 TRGT:ACTV CONN:20/20 DISC:0/20 TERM:0/20 ERR:0 TPS:20
[Details]
HOSTNAMEPORTSERVER STATUSTARGET AGENT STATUSCONNDISCTERMERRORTPS
==================================================================
SYSTEMACTIVE10/100/100/10010
serverc11111ONLINEACTIVE10/100/100/10010

[Summary] 22:56:38 TRGT:ACTV CONN:20/20 DISC:0/20 TERM:0/20 ERR:0 TPS:20
[Details]
HOSTNAMEPORTSERVER STATUSTARGET AGENT STATUSCONNDISCTERMERRORTPS
==================================================================
SYSTEMACTIVE10/100/100/10010
serverc11111ONLINEACTIVE10/100/100/10010
 

 

The monitoring will end after 10 minutes by default. The value of "Average TPS:" is average of TPS in 10 minutes.

 

[Summary] 23:06:36 TRGT:ACTV CONN:20/20 DISC:0/20 TERM:0/20 ERR:0 TPS:20
[Details]
HOSTNAMEPORTSERVER STATUSTARGET AGENT STATUSCONNDISCTERMERRORTPS
==================================================================
SYSTEMACTIVE10/100/100/10010
serverc11111ONLINEACTIVE10/100/100/10010

---- TRANSACTION REPORT ( SUMMARY ) ------------------

MONITORING PERIOD
~~~~~~~~~~~~~~~~~
- Begin : Sat May 10 22:56:37 JST 2008
- End: Sat May 10 23:06:36 JST 2008

THROUGHPUT
~~~~~~~~~~
Transaction name MinMax Average
================ === ====== =======
SELECT00ms110ms2.64ms
INSERT00ms94ms9.27ms
UPDATE00ms47ms4.76ms
DELETE00ms125ms2.66ms

TPS
~~~
- Total transaction count : 11954
- Monitoring time: 600 seconds
- Average TPS: 19.92

TG>

 

When you stop the monitoring forcely, Click "Monitor" menu and select "Monitoring stop forcely". When you change the monitoring period, select "Specify monitoring period" and input (in millisecond) the value.

 

  Step7 - Stop transactions -

When you stop the transaction, Click "Agent" menu and select "Freeze agents".

 
 

 

And, Click "Agent" menu and select "Make agents disconnect from database".

 
 

 

     
  >> TOP > Usage
> Multi-server mode
 

 

 

 
 

 

 
 
Copyright 2003 - 2009 tgmstr. All rights reserved.