https://github.com/carv-ics-forth/cosng

https://github.com/carv-ics-forth/cosng

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: CARV-ICS-FORTH
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: master
  • Size: 16.6 KB
Statistics
  • Stars: 2
  • Watchers: 6
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

COSNG: Controlled Operating System Noise Generator

A tool for evaluating the impact of system noise on the performance of workloads. COSNG uses rt-app to generate precise CPU load patterns and measures their effect on workloads (currently has built in support for NAS parallel benchmarks).

Quick Start

```bash

Clone the repository

git clone https://github.com/CARV-ICS-FORTH/COSNG.git cd COSNG

Build the components

./scripts/build-rt-app.sh ./scripts/build-nas-benchmarks.sh

In case you dont have the json-c library do the following

export LDLIBRARYPATH=$LDLIBRARYPATH:$(realpath ./rt-app/json-c)

Run the example experiment

python3 orchestrator.py ```

Prerequisites

  • System: Linux with taskset, GCC, and build tools
  • Python: 3.6+ with pandas, numpy (pip install pandas numpy)

Usage

Building Components

```bash

Build rt-app noise generator

./scripts/build-rt-app.sh

Build NAS Parallel Benchmarks

./scripts/build-nas-benchmarks.sh ```

Basic Experiment

```python

1. Configure machine

machine = NoiseProfiler.machine_setup(cores=[0, 1, 2, 3])

2. Create noise profiles

noiseprofile = NoiseProfiler.generatenoisesinglecore( machine=machine, maxduration=300, # 5 minutes busytimeus=50, # 50μs busy totaltimeus=150, # 150μs total cycle (33% CPU) cpu=1 # Target core )

3. Define benchmark

benchmark = BenchmarkRunner.createbenchmark( name="NPB-FT-A", benchpath=os.path.join(os.path.dirname(os.path.abspath(file)), "NPB", "runnasbenchmark.sh"), invocationcommand="{path} ft C", resultparser=parsenasbenchmark_results, cores=[0, 1, 2, 3], iterations=3 )

4. Run experiment

experiment = ExperimentManager.createexperiment( machine=machine, benchmark=benchmark, noiseprofiles=[None, noise_profile] # None = baseline (no noise) )

results = ExperimentManager.run_experiment(experiment)

5. Save results

ExperimentManager.saveexperimentresults(results, "results.json") ExperimentManager.generatecsvreport(results, "report.csv") ```

Creating Custom Experiments

Noise Profiles

```python

Single-core noise (50% CPU load on core 2)

noiseprofile1 = NoiseProfiler.generatenoisesinglecore( machine=machine, maxduration=300, busytimeus=500, totaltimeus=1000, cpu=2 )

Multi-core noise (different patterns on multiple cores)

noiseprofile2 = NoiseProfiler.generatenoisemulticore( machine=machine, maxduration=300, configs=[ (1, 200, 1000), # Core 1: 20% CPU (2, 500, 1000) # Core 2: 50% CPU ] ) ```

Custom Benchmarks

```python

Custom benchmark parser function

def parsecustombenchmark(stdout): results = {} # Extract relevant metrics from stdout return results

Create custom benchmark

custombenchmark = BenchmarkRunner.createbenchmark( name="CustomBench", benchpath="/path/to/benchmark", invocationcommand="{path} -t {corescount}", resultparser=parsecustombenchmark, cores=[0, 1, 2, 3], iterations=5 ) ```

Result Analysis

The experiment produces: - JSON file with detailed results - CSV report with summary metrics

Advanced Usage

Testing Multiple Noise Levels

```python

Generate noise profiles at different intensities

noiseprofiles = [] for cpupct in [10, 20, 30, 50, 70]: busytime = int(cpupct * 10) # Convert percent to microseconds (scaled) profile = NoiseProfiler.generatenoisesinglecore( machine=machine, maxduration=300, busytimeus=busytime, totaltimeus=1000, cpu=1 ) noise_profiles.append(profile)

Run experiment with all profiles

experiment = ExperimentManager.createexperiment( machine=machine, benchmark=benchmark, noiseprofiles=[None] + noise_profiles # Add baseline ) ```

Multiple Benchmarks

```python

Define different benchmarks

benchmarks = [ BenchmarkRunner.createbenchmark(name="NPB-FT-A", benchpath= ...), BenchmarkRunner.createbenchmark(name="NPB-CG-B", benchpath= ...), BenchmarkRunner.createbenchmark(name="NPB-LU-C", benchpath= ...) ]

Run experiments for each benchmark

for benchmark in benchmarks: experiment = ExperimentManager.createexperiment( machine=machine, benchmark=benchmark, noiseprofiles=[None, noiseprofile] ) results = ExperimentManager.runexperiment(experiment) ExperimentManager.saveexperimentresults( results, f"{benchmark['name']}_results.json" ) ```

Troubleshooting

  • rt-app fails: Check permissions and JSON validity
  • Inconsistent results: Increase iterations, check for other processes
  • No noise effect: Verify noise is on correct cores, increase intensity

In Summary

COSNG orchestrates experiments by: 1. Generating JSON configurations for rt-app 2. Running rt-app to create controlled CPU load 3. Executing benchmarks while noise is active 4. Collecting and analyzing performance metrics

The noise level is controlled by the busy/sleep cycle ratio in rt-app tasks.

Acknowledgements

We thankfully acknowledge support for this research from the European High Performance Computing Joint Undertaking (EuroHPC JU) under Framework Partnership Agreement No 800928 (European Processor Initiative) and Specific Grant Agreement No 101036168 (EPI-SGA2). The EuroHPC JU receives support from the European Union’s Horizon 2020 research and innovation programme and from Croatia, France, Germany, Greece, Italy, Netherlands, Portugal, Spain, Sweden, and Switzerland. National contributions from the involved state members (including the Greek General Secretariat for Research and Innovation) match the EuroHPC funding.

Owner

  • Name: Computer Architecture and VLSI Systems (CARV) Laboratory
  • Login: CARV-ICS-FORTH
  • Kind: organization
  • Location: Heraklion, Greece

GitHub Events

Total
  • Watch event: 2
  • Public event: 1
  • Push event: 5
Last Year
  • Watch event: 2
  • Public event: 1
  • Push event: 5

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels