Browse Prior Art Database

Workload Simulator for Linux/Unix platforms

IP.com Disclosure Number: IPCOM000177249D
Original Publication Date: 2008-Dec-07
Included in the Prior Art Database: 2008-Dec-07
Document File: 3 page(s) / 12K

Publishing Venue

IBM

Abstract

This article uses an example "MQ Traffic Simulator" to illustrate the main idea and the implementation of a workload simulator which has the 3 special feature: 1) Trigger the workload in randem interval which can be limited with a maximum value. 2) Put the tasks of workload into OS scheduler. 3) Both Total Time and Loop Number can decide the workload duration. Actually it is general, and you can customize it as the workloads simultor of any program on Linux/Unix.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 3

Workload Simulator for Linux/Unix platforms

1 Requirements

To test applications,

we need simulate long-run workload of applications.

There are many ways to implement this requirement, but we need the simulator with the following special features:
1) Trigger the workload in randem interval which can be limited with a maximum value.
2) Put the tasks of workload into OS scheduler.
3) Both Total Time and Loop Number can decide the workload duration.

This article uses an example "MQ Traffic Simulator" to illustrate the main idea and the implementation of such workload simulator.

Actually it is general, and you can customize it as the workloads simultor of any program on Linux/Unix.

2 Description of "MQ Traffic Simulator"

2.1 Purpose

In defined duration or loop, random number of messages will be put into the queue in random interval
You can modify it as a workload simulator for any of your programs.

2.2 Usage

1) Install MQ on the tested box.

2) Copy this tool and unpack it under any path.

3) Run this script(mts.sh) directly.

4)

View the schedule records in file

5) Check the tasks in OS scheduler.

2.3 Parameters can be configured in this script:

TotalHours: The total duration of the message traffic. Its Unit is Hour.

LoopNumber: The loop number to schedule the traffic.

MaxInterval: The maximum interval to put messages in the queue. Its unit is Minute.

MaxNumber: The maximum number of messages which are put in the queue in each time.

outfile: The executions scheduling record.

AtQueue: The scheduled tasks are all put into this queue of OS scheduler.

Notice:

"TotalHours" and "LoopNumber" are in effect at the same time.

So you need change them to fit for your actual requirements. Such as:

1) A large "LoopNumber"

will make the schedule end at the target time.

will make the schedule end with the target repeat.

2.4 Results after run this script:

1) This script created an Queue manager and its queue at first. (If the Qm is existed, it will be deleted)
2) Then the script schdules traffic of messages for the defined traffic duration and loop.
3) All scheduled traffic are implmeneted by adding the "at" tasks on Linux/Unix
4) Each traffic's schduled time is calculate by adding random minutes to current time.
6) At each scheduled time, random number of messages will be put into the queue.
7) User can check the planned tasks in OS scheduler by execute "atq"
8) User can check the depth of the queue by running "show-queue-depth.sh" at any time.
9) User read the defined file to know the traffic scheduled data
10) User can remove many "at" tasks by "atrm.sh From-Number To-Number". It will remove all "at" tasks between From-Number and To-Number."

11) User can clear the QM and its queue after all traffic by "clear-qm.sh".

2) A large "TotalHours"

1

Page 2 of 3

3 Implementation of "MQ Traffic Simulator"

3.1 Script "mts.sh"

3.2...