Home skin

 

  Location : TOP > Usage for TG ver 0.7X
> 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 "-listenr" option.

 
for Windows platform
C:\> cd tg07X
C:\tg07X> tg -listener
 
 

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.60 ] Wed May 03 23:32:47 JST 2006

Loading configration file... OK.
Registerd transactions:2 , variables:2 , jobs:5

Loading Oracle JDBC driver... OK.

Checking specified address & Port is possible to use... OK.
Now TG is running in "Listener Mode".
- 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 tg07X
C:\tg07X> 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.70 ] Sun Dec 03 01:07:51 JST 2006
logged in.
TG> Linefeed-string is changed into "0d0a".
TG> Autoexec "ON".
TG> MasterServer function is already "ON".
TG> Spool function is already "OFF".
TG> Execution Mode has been changed into "Slave Mode".
TG> set tpsmonitor true
TPS-monitor signal has been enabled.
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, Sessions value is changed from "10" into "20" because each TG server ( Master and Slave ) generate 10 Agents. It means that "Active Agents", "Sessions", "ErrDisc", "Errors", "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 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] 01:54:12 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:27
[Details]
HOSTNAMEPORTSERVER STATUSAGENTSTATUSACTSESErDERRTPS
============= =============================================
SYSTEMACTV10/1010/100/10014
serverc11111ONLINEACTV10/1010/100/10013

[Summary] 01:54:13 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:23
[Details]
HOSTNAMEPORTSERVER STATUSAGENTSTATUSACTSESErDERRTPS
============= =============================================
SYSTEMACTV10/1010/100/10012
serverc11111ONLINEACTV10/1010/100/10011

 

 

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

 

[Summary] 01:55:11 AgS:ACTV Act:20/20 SES:20/20 ErD:0/20 ERR:0 TPS:28
[Details]
HOSTNAMEPORTSERVER STATUSAGENTSTATUSACTSESErDERRTPS
============= =============================================
SYSTEMACTV10/1010/100/10015
serverc11111ONLINEACTV10/1010/100/10013

Monitoring start : Sun Dec 10 01:54:12 JST 2006
Monitoring end: Sun Dec 10 01:55:11 JST 2006
Average TPS : 22.77 (Total transaction count : 64200 / monitoring time : 600)

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 for TG ver 0.7X
> Multi-server mode
 

 

Copyright 2003 - 2008 tgmstr. All rights reserved.