Skip to content

lien0214/Benign-Workload-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

Benign Workload Generator

The Benign Workload Generator is a suite of tools designed to simulate various workloads on servers and systems. These tools can be used for stress testing, performance benchmarking, or simulating real-world usage scenarios.

Structure and Key Scripts

1. Server Workload Scripts

  • pure.sh:

    • Simulates a specific HTTP workload by performing repeated GET, POST, and PUT requests to a given server.
    • Server details (IP, port, and URI) and the number of requests can be customized.
  • scenario_combine.sh:

    • Simulates a more dynamic HTTP workload with randomized request types (GET, POST, PUT) and adjustable concurrency limits.
    • Includes random pauses to simulate traffic patterns.

2. System Workload Scripts

  • main-pure-task.sh:
    • Executes a series of predefined stress-test scripts, each targeting a specific system component or operation:
      • hdd: Tests hard disk I/O operations.
      • io: Simulates general input/output operations.
      • vm: Tests virtual memory usage.
      • matrix: Performs computational tasks like matrix calculations.
      • fork and vfork: Stress-tests process creation.
      • Additional scripts for file locking, caching, socket operations, and more.
    • Each script runs for a fixed duration (default: 120 seconds).

3. Supporting Workload Scripts

  • The pure-task folder contains specialized scripts that are executed by main-pure-task.sh. Each script is focused on a specific workload category (e.g., aio.sh, malloc.sh, timer.sh, etc.).

Usage

Prerequisites

  • Install curl for HTTP-based workloads.
  • Install httperf for performance benchmarking (used in some scripts).
  • Ensure you have sufficient system resources for stress testing.

Running the Scripts

  1. Server Workloads:

    • Update server details in pure.sh and scenario_combine.sh (e.g., IP, port, URI).
    • Execute pure.sh or scenario_combine.sh to start workload generation.

    Example:

    bash pure.sh 0  # Perform GET requests
  2. System Workloads:

    • Navigate to the directory containing main-pure-task.sh.

    • Run the script:

      bash main-pure-task.sh

Contribution

Feel free to contribute by adding new workload scripts or improving the existing ones. Make sure to follow the coding guidelines provided in the project.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published