Pegasus Enhancement Proposal (PEP)

PEP #:  241

Title: OpenPegasus Stress Testing 

Version: 1.5 

Created: 28 October 2005 

Authors: John Alex, Willis White, Ed Boden

Status:  Approved 

 

Version History:

Version Date Author Change Description
1.0 28 October 2005  John Alex, Willis White, Ed Boden
Initial Submission
 1.1 27 November 2005   John Alex, Willis White
 Updated PEP based on previous review.
1.2
28 November 2005  John Alex
Attached the stress testing overview diagram
1.3
5 December 2005
John Alex
Updated PEP based on review (12/02/05).
(This version of PEP was "Approved" on 12/09/2005)
1.4
   11 April  2006
John Alex
Updated PEP with changes to New Files section and changed the tolerance check
interval from 5 minutes to 1 minute. 
1.5
19 April 2006
John Alex
Updated changes to PEP based on Bug# 4962 (Opened for reviewing code for this PEP)
-  Replaced "stressTestController" with  "TestStressTestController".
-  Incorporated new directory structure.
(Final version re-approved on 04/25/06)

 


Abstract: A functional PEP that illustrates the OpenPegasus Stress Testing.


Definition of the Problem

As indicated in the concept PEP #224 (OpenPegasus Test Architecture), there is clearly a need to develop a comprehensive stress test suite for OpenPegasus. OpenPegasus Stress tests are designed to stress the CIM Server until it fails or runs to successful completion. These tests are expected to stress the CIM server to achieve various possible execution limits, mainly to crash or hang the server.  To understand how stress testing differs, or relates to, other kinds of testing (e.g. performance, continuous hours of operation, functional) please see PEP 224.

Proposed Solution

The proposed tests are expected to exert excessive loads on the CIM server. The main intent of these tests are to see how fast, or whether, we can get the CIM server to crash or hang.  These tests are designed to allow some flexibility in adjusting the desired stress level on the CIM server.

Execution model assumptions

OpenPegasus Stress Test Overview:

OpenPegasus Stress Test will be comprised of three major components, as follows:
  1. TestStressTestController    -  Command that invokes one or more of the “Stress Test Client” concurrently.
  2. Stress Test Clients              -  Client Programs that may contain one or more of the CIM Operation(s).
  3. Stress Test Configuration   -  A flat file containing test configuration information.
The "TestStressTestController" will read the configuration file or the "Stress Test Configuration"  and then, invoke the "Stress Test Client" instances specified in the "Stress Test Configuration". Each of the client instances will be a separate process and independent of each other. These Clients will in turn connect to the same CIM Server and perform their respective operations concurrently.  The following diagram illustrates, a quick overview of the OpenPegasus Stress tests.
       

OpenPegasus Stress Testing overview diagram
The “TestStressTestControllercommand will be written in C++ and compiled into an executable.
TestStressTestController  [-s] [-h hostname] [-p portnumber] [-u username ]  [-w password] [<configfile_name>]  
                          --help
                          --verbose
                         

Options:
--help.                       Writes this command's usage statement to std out.
-h  hostname             Connect to CIM Server on specified hostname.
-p  portnumber          Connect to CIM Server on specified portnumber. Default(5988)
-s                               Use SSL protocol between Stress Client and the CIM Server.
--verbose 
                 Writes  the  command´s  verbose  messages to standard output.
-u  username             Connect to CIM Server using the specified username.
-w password             Connect to CIM Server using the specified password.

Operands:
<configfile_name>
                            Specifies the name of the configuration file that is to be used for the tests.
The following table lists the Stress Test Clients and the associated CIM Operations that each of these clients will perform on the CIM Server. Each of the test clients listed in the following table will be programmed in C++ and compiled into a separate executable.  These clients once started will run repeatedly until stopped by the TestStressTestController command. The expected stress factor imposed on the CIM server is directly proportional to the number of these client instances that are running concurrently against the same CIM Server.

        Note:
The above list of stress test Clients can grow as needed. 
       
Possible Future "Stress Test Clients": 

   
    Every "Stress Test Client" will,
    1. Duration of Tests. (Duration in minutes all the “Stress Test  Client” are to be run).
    2. HostName. (Host name or IP address  of the system where the CIM server is expected to be running.)
    3. Port. (Specifies Port number. The default port is 5988)
    4. Number of Clients. (Number of concurrent clients) per Stress Test Client.
    5. Name Space. ( Name space that will be utilized by the Stress Test Clients)
    6. Class Name. ( Name of the existing class that will be utilized by the Stress Test Clients.)
    7. SSL.   (Use SSL protocol between Stress Client and the CIM Server)
    8. UserName. (User name that the Stress Test Clients will use to connect to the server.)
    9. Password. ( Password that is associated to the user name.
    10. ToleranceLevel. (This represents the percentage of the started "Stress Test Clients" that can be allowed to fail for a one minute interval without resulting in the termination of the stress tests. Note that any reported client failure in two consecutive one minute interval corresponds to a "failure status" for that client. The default is 0%, which means no failures are allowed, or any failures will result in termination of the stress test.)
    11. ClientDuration. (Specifies duration in minutes for the corresponding stress client before it should be stopped.)
    12. ClientWait.   (Specifies waiting period in minutes before the corresponding stress client is re-started again.)
    13. ClientName. (The name of the Client program that will be used by a TestWrapperStressClient instance)
    14. Options. (The options that are desired for the corresponding Client program that will be used by a TestWrapperStressClient)
    Note:
The following table lists the valid names as input for the corresponding Stress Test Clients  in the Configuration file:

Stress Client Tests Valid Names
TestModelWalkStressClient
ModelWalkStressClient
TestWrapperStressClient WrapperStressClient

Default Values:
      where,
           "DD" denotes the day.
           "MM" denotes the month.
           "YY" denotes the year.
           "hh" denotes the hour.
           "mm" denotes the minutes.
           "ss" denotes the seconds.
ModelWalkStressClient=5
WrapperStressClient=5
    [ClientName=CLI, Options=niall]

Note:
     The above default sets up the stress tests for the following test clients to be run concurrently:
          Five ModelWalkStressClient instances using default values.
          Five WrapperStressClient instances running the command "CLI niall".

A Sample Configuration File: 

#Machine Host of Server to be tested - The machine the
#CIM server is running on. If left blank then default is the local host.

Hostname=narten

        # Total Duration of the Stress Client Test set as 300 minutes.

Duration=300

        # Tolerance level will be set as 0%
        ToleranceLevel=0

        # Number of Client instances
        # The format for running a client program:

<client program name>=<number of instances of client program to run concurrently>
#       [option1=<data1>, option2=<data2>, option3=<data3>, ..... ]
#  specify all the options for a Client instance or instances within a square bracket "[  .... ]".
#  TestWrapperStressClient can only have the parameters "ClientName" and "Options".

#       [ClientName=<ClientProgram>, Options=<actual options for Client program> ]

ModelWalkStressClient=1
[NameSpace=/root/cimv2,ClassName=CIM_door,ClientDuration=60,ClientWait=10]
ModelWalkStressClient=5

WrapperStressClient=2 
[ClientName=CLI,Options="-l narten niall"]
WrapperStressClient=10
[ClientName=CLI,Options="-l narten ei pg_computersystem"]
WrapperStressClient=5
[ClientName=osinfo,Options="-h narten",ClientDuration=120]

# This sets up the stress tests for the following stress test clients to be run concurrently:
#       - One ModelWalkStressClient which will use the Name space "
/root/cimv2" and ClassName "CIM_door" 
#          overriding any default value. This client will be run for 60 minutes then stopped for  10 minutes before it is
#          re-started again. This process will be repeated for the duration of the stress tests.
#       -  Five ModelWalkStressClient's using common values.
#       -  Two WrapperStressClients will run the commands "CLI -l narten niall" concurrently.
#       -  Ten WrapperStressCleints will concurrently run the command "CLI -l narten ei pg_computersystem".
#       -  Five WrapperStressCleints will run the command "osinfo -h narten" concurrently for 120 minutes and then stop.

#        Note that the 17 wrapper clients instances are also connecting to the same hostname as the other clients.

    TestStressTestController  -h <hostname>

OpenPegasus Stress Test file Location

The OpenPegasus Stress Test command (TestStressTestController) and the source code for all the Stress Test Clients will be placed in the OpenPegasus CVS source tree at $PEGASUS_ROOT/test/StressTestController/ and $PEGASUS_ROOT/pegasus/test/StressTestClients/ respectively.
    
The following table shows the location of some of the other files associated with these tests:


Configuration directory
Log directory
LOCATION
$PEGASUS_ROOT/test/StressTestController/ $PEGASUS_HOME/test/StressTestController/log/
   

OpenPegasus Stress Test  Output

  1. When starting the tests, the "TestStressTestController" command will:
  2. During the course of the tests the command will,
  3. When the stress tests ends it will,
    1. state that the tests were ended on this day and at this time.
    2. state the actual duration of the tests.
    3. state if it failed or successfully completed all the tests.
  4. If the percentage of the stress test clients that fails exceeds the "ToleranceLevel" percentage, then the command will report just that.
  5. If the verbose flag is opted, then for every 100 iteration of the operation for each client instance the tests will output a percentage of failure. For example it could say "WrapperStressClient [PID#] ran 400 times with a 10% failure".

Rationale

This is a follow-on PEP for the concept PEP#224(OpenPegasus Test Architecture). 

New files

Following files/directories will be added to the OpenPegaus cvs tree  as a result of this PEP:
 
$PEGASUS_ROOT/test/StressTestController/Makefile
$PEGASUS_ROOT/test/StressTestController/stressTestController.cpp
$PEGASUS_ROOT/test/StressTestController/stressTestControllerMain.cpp
$PEGASUS_ROOT/test/StressTestController/stressTestController.h
$PEGASUS_ROOT/test/StressTestController/stressTestControllerException.cpp
$PEGASUS_ROOT/test/StressTestController/stressTestControllerException.h
$PEGASUS_ROOT/test/StressTestController/default_stresstest.conf
$PEGASUS_ROOT/test/StressTestController/tests/Makefile
$PEGASUS_ROOT/test/StressTestController/tests/invalid_noclients.conf
$PEGASUS_ROOT/test/StressTestController/tests/invalid_configuration.conf
$PEGASUS_ROOT/test/StressTestController/tests/results.master
$PEGASUS_ROOT/test/StressTestClients/Makefile
$PEGASUS_ROOT/test/StressTestCients/TestStressTestClient.h
$PEGASUS_ROOT/test/StressTestClients/TestStressTestClient.cpp
$PEGASUS_ROOT/test/StressTestClients/ModelWalkStressClient/Makefile
$PEGASUS_ROOT/test/StressTestClients/ModelWalkStressClient/TestModelWalkStressClient.cpp
$PEGASUS_ROOT/test/StressTestClients/WrapperStressClient/Makefile
$PEGASUS_ROOT/test/StressTestClients/WrapperStressClient/TestWrapperStressClient.cpp



Following files will be modified as a result of this PEP:
$PEGASUS_ROOT/Makefile
$PEGASUS_ROOT/TestMakefile
$PEGASUS_ROOT/test/Makefile

Testing

Unit test cases and Manual functional tests will be run.

Other Considerations

 

Schedule

Target release is Pegasus 2.6.

Action Planned Date Actual Date Comments
PEP submitted 10/31/05
10/31/05
 
PEP reviewed 11/04/05
12/09/05
 
PEP approved 12/16/05
12/09/05 & reapproved for minor changes on 04/25/06  
Code submitted 01/30/06
04/11/06  
Code Approved

04/25/06


Discussion


Copyright (c) 2004 EMC Corporation; Hewlett-Packard Development Company, L.P.; IBM Corp.; The Open Group; VERITAS Software Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy  of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Template last modified: March 9th 2004 by Martin Kirk
Template version 1.8