Friday, 21 March 2014

Tuxedo tuning

Tuning Tuxedo Processes using PeopleSoft delivered tools

PeopleSoft delivers tools that can be used to monitor the Tuxedo processes themselves.  You can gather data on which servers are being used, how many clients are connected, who is connected, what types of services they are accessing and what the running services are doing.  The Tuxedo command line can be accessed by running psadmin and selecting option 5 from the main administration menu: 5) TUXEDO command line (tmadmin)   A list of all commands available can be accessed by typing “help” on the command line.  There are a couple of commands that can be used on a regular basis to obtain a fairly accurate assessment of what the application server is up to.
·        psr:  printserver  This will print server statistics on a per server basis.  This is a great command to use to figure out which servers are working the most.  The last column – Current Service will tell you the services that are being run at the time that you issue the command.  The defined services can be obtained by typing:
·        psc: print service This will print out a list of all of the services that have been defined to the application server, and how often that service has been accessed.  This is invaluable for obtaining information about what services users are accessing most.  This information can be used to size servers accordingly, i.e. adding or reducing the number of active servers.
·        pclt: print client  This will print information about users accessing the Application Server, and which client computers they are accessing from.  Client status is also obtained with this command – Busy, Wait, etc..
·        pq: print queue This will print out information about requests that are currently in the queue.  This information is invaluable for sizing the number of servers (psappsrv, pssamsrv, psqcksrv) that are needed for any given environment.  The general rule is that there should never be more than 5 requests in a queue at a given time.  A more realistic approach is that no more than 3 requests should be in a single queue at any given time.  If there are more than three requests in a queue, chances are that people will notice a performance change. 
Some services take longer than others, given what they are doing.  RAMLIST, which handles drop down list boxes takes a much shorter time than PPRLOAD or PPRSAVE, which handle panel builds and panel saves, respectively.  The quick services should never be queued for more than a few seconds, since they process quickly.   If your “quick” services are being queued, you should make sure that enough psqcksrv servers are running. 
You can monitor which queues are slowing things down using pq.  You can  see what clients are accessing the Tuxedo domain using pclt.  You can find out which servers are being used the most using psr
Also, since the Tuxedo processes (servers) that interact with the database on behalf of the client are not multithreaded, they are executing a single command at a time.  This means that if you have a service in a queue that is taking an excessive amount of time in the database, other processes may have to wait behind it in the queue, If no other servers are available.  This would equate to a loss of performance.  This is a perfect example of why one would want to monitor queues.  If you have 4 PSQCKSRV servers running, expect to see an equal amount of work done by each process.  If all instances are busy, and additional services are waiting in queue, it is an indication that you need more servers.

The psr command explained

The following screen shot shows the output of the psr command:
> psr

Prog Name      Queue Name  Grp Name      ID RqDone Load Done Current Service
---------      ----------  --------      -- ------ --------- ---------------
BBL            40448       SITE1          0    196      9800 (  IDLE )
PSAPPSRV       APPQ        APPSRV         1    299     14950 (  IDLE )
PSAUTH         00001.00001 BASE           1    158      7900 (  IDLE )
PSAPPSRV       APPQ        APPSRV         2    316     15800 (  IDLE )
PSAPPSRV       APPQ        APPSRV         3    318     15900 (  IDLE )
PSQCKSRV       QCKQ        APPSRV        50   4512    225600 (  IDLE )
PSQCKSRV       QCKQ        APPSRV        51   4432    221600 (  IDLE )
PSQCKSRV       QCKQ        APPSRV        52   4386    219300 (  IDLE )
PSQCKSRV       QCKQ        APPSRV        53   4386    219300 (  IDLE )
PSSAMSRV       SAMQ        APPSRV       100   1036     51800 (  IDLE )
WSL            00001.00020 BASE          20      0         0 (  IDLE )

·         The Prog Name is the name of the Application Server process that is being displayed.
·         The Queue Name is used internally by Tuxedo, and does not affect tuning at this point.
·         The Grp Name is used internally by Tuxedo as well.  You can filter on groups.
·         The RqDone column displays the amount of requests processed.
·         The Load Done column is incremented by a specified value every time the server processes a request or executes a service.  This is helpful, because as you are monitoring, you can tell if the Current Service is the same from the last refresh time, or if it is a new request.
·         The Current Service displays the name of the Application Server service that is currently being executed.  You can get a list of all services by typing psc, which will be shown shortly.

The pclt command explained


> pclt

     LMID         User Name       Client Name    Time    Status  Bgn/Cmmt/Abrt
--------------- --------------- --------------- -------- ------- -------------
SITE1           psoftfn         WSH             28:06:43 IDLE    0/0/0
SITE1           psoftfn         WSH             28:06:43 IDLE    0/0/0
SITE1           psoftfn         WSH             28:06:43 IDLE    0/0/0
SITE1           AKUAN           STN5             2:29:53 BUSY/W  0/0/0
SITE1           AGEPIGON        STATION 3        0:03:15 IDLE/W  0/0/0
SITE1           AGEPIGON        STATION 3        0:04:37 IDLE/W  0/0/0
SITE1           psoftfn         tmadmin          2:16:45 IDLE    0/0/0

·         The User Name column displays the name of the User, as defined in PeopleSoft
·         The Client Name column displays the NetBIOS name of the computer that the client is accessing the application server from.
·         The Time column displays the time in HH:MM:SS that that particular user has been active.  You can deduce from the Time status of some servers (WSH) how long the application server has been up and running.
·         The Status column shows the current status of that client.  Busy indicates that the client has requests pending in the application server.
·         Bgn/Cmmt/Abrt – Begin/Commit/Abort Transaction data

The pq command explained


> pq
Prog Name      Queue Name  # Serve Wk Queued  # Queued  Ave. Len    Machine
---------      ------------------- ---------  --------  --------    -------
PSQCKSRV       QCKQ              4         -         0         -      SITE1
PSAUTH         00001.00001       1         -         0         -      SITE1
PSSAMSRV       SAMQ              1         -         0         -      SITE1
WSL            00001.00020       1         -         0         -      SITE1
BBL            40448             1         -         0         -      SITE1
PSAPPSRV       APPQ              3         -         0         -      SITE1

·         Prog Name is the name of the PeopleSoft-defined server that will run.  PSQCKSRV handles non-conversational SQL calls.  PSAUTH is the server that handles logins to the PeopleSoft database, PSSAMSRV handles conversational SQL requests.  The WSL is the WorkStation Listener.  The WSL handles connections between the clients and the WorkStation Handler (WSH).  The BBL is the Bulletin Board Liaison, and it oversees all of the processes, servers, and queues.  Think of it as acting like an Air Traffic Controller.  Finally, the PSAPPSRV handles Panel Builds, Panel Saves, and the cache.  Each PSAPPSRV started maintains an individual cache, even within the same domain. 
·         The Queue Name column displays a list of currently defined queues.  These are used internally.  Services for the PSAPPSRV are queued to the APPQ, services for PSSAMSRV are queued to the SAMQ, and services for the PSQCKSRV are queued to the QCKQ.  A single queue can service many servers.  If there are four PSQCKSRV servers defined, there is a single queue, QCKQ that holds PSQCKSRV requests for all four servers.
·         The # Serve column displays the number of the current servers in the Prog Name column that are currently running.  In the above example, the first line indicates that there are 4 PSQCKSRV processes running.  Each of these processes handles requests from the Queue Name listed above.
·         # Queued displays the number of these types of services currently in queue.  If you have a lot of services in queue, something is wrong with your configuration.  You should rarely see queued services.


No comments:

Post a Comment