Skip to content

[O11y][System] Rally benchmark system.cpu#9294

Merged
ali786XI merged 2 commits intoelastic:mainfrom
ali786XI:system_benchmark_cpu
Mar 25, 2024
Merged

[O11y][System] Rally benchmark system.cpu#9294
ali786XI merged 2 commits intoelastic:mainfrom
ali786XI:system_benchmark_cpu

Conversation

@ali786XI
Copy link
Copy Markdown
Contributor

@ali786XI ali786XI commented Mar 7, 2024

Proposed commit message

This PR adds benchmarking templates to the cpu data stream of system

Sample Response

sample_event.json
{
"@timestamp": "2024-03-07T07:19:43.507Z",
"agent": {
  "ephemeral_id": "22ed892c-43bd-408a-9121-65e2f5b6a56e",
  "id": "de42127b-4db8-4471-824e-a7b14f478663",
  "name": "system-scale-123456",
  "type": "metricbeat",
  "version": "8.12.1"
},
"benchmark_metadata": {
  "info": {
    "benchmark": "cpu-benchmark",
    "run_id": "7cc1977c-fa5a-4496-89d3-d40ee43080ed"
  }
},
"data_stream": {
  "dataset": "system.cpu",
  "namespace": "ep",
  "type": "metrics"
},
"ecs": {
  "version": "8.0.0"
},
"elastic_agent": {
  "id": "de42127b-4db8-4471-824e-a7b14f478663",
  "snapshot": false,
  "version": "8.12.0"
},
"event": {
  "agent_id_status": "auth_metadata_missing",
  "dataset": "system.cpu",
  "duration": 45213,
  "ingested": "2024-03-07T07:19:47Z",
  "module": "system"
},
"host": {
  "architecture": "x86_64",
  "containerized": true,
  "cpu": {
    "pct": 0.354
  },
  "hostname": "docker-fleet-agent",
  "id": "829324aac17946dcace17006fa82a2d2",
  "ip": "192.168.254.7",
  "mac": "02-42-C0-A8-FE-07",
  "name": "docker-fleet-agent",
  "os": {
    "codename": "focal",
    "family": "debian",
    "kernel": "3.10.0-1160.105.1.el7.x86_64",
    "name": "Ubuntu",
    "platform": "ubuntu",
    "type": "linux",
    "version": "20.04.6 LTS (Focal Fossa)"
  }
},
"metricset": {
  "name": "cpu",
  "period": 10000
},
"service": {
  "type": "system"
},
"system": {
  "cpu": {
    "cores": 12,
    "idle": {
      "norm": {
        "pct": 0.422
      },
      "pct": 53.238,
      "ticks": 35
    },
    "iowait": {
      "norm": {
        "pct": 0.241
      },
      "pct": 20.661,
      "ticks": 45
    },
    "irq": {
      "norm": {
        "pct": 0.905
      },
      "pct": 70.645,
      "ticks": 55
    },
    "nice": {
      "norm": {
        "pct": 0.53
      },
      "pct": 40.63,
      "ticks": 47
    },
    "softirq": {
      "norm": {
        "pct": 0.571
      },
      "pct": 41.254,
      "ticks": 31
    },
    "steal": {
      "norm": {
        "pct": 0.54
      },
      "pct": 28.704,
      "ticks": 49
    },
    "system": {
      "norm": {
        "pct": 0.735
      },
      "pct": 53.688,
      "ticks": 59
    },
    "total": {
      "norm": {
        "pct": 0.033
      },
      "pct": 88.05,
      "ticks": 8
    },
    "user": {
      "norm": {
        "pct": 0.843
      },
      "pct": 28.298,
      "ticks": 50
    }
  }
}
}

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.

How to test this PR locally

Run this command from package root

  • elastic-package benchmark rally --benchmark cpu-benchmark -v
  • elastic-package benchmark stream --benchmark cpu-benchmark -v

Related issues

Screenshots

╭────────────────────────────────────────────────────────────────────────────────────╮
│ info                                                                               │
├────────────────────────┬───────────────────────────────────────────────────────────┤
│ benchmark              │                                             cpu-benchmark │
│ description            │                Benchmark 20000 system.cpu events ingested │
│ run ID                 │                      0459e286-9896-49aa-9725-9189b3131783 │
│ package                │                                                    system │
│ start ts (s)           │                                                1709790955 │
│ end ts (s)             │                                                1709791002 │
│ duration               │                                                       47s │
│ generated corpora file │ /root/.elastic-package/tmp/rally_corpus/corpus-2985894321 │
╰────────────────────────┴───────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────╮
│ parameters                                                        │
├─────────────────────────────────┬─────────────────────────────────┤
│ package version                 │                          1.54.0 │
│ data_stream.name                │                             cpu │
│ corpora.generator.total_events  │                           20000 │
│ corpora.generator.template.path │ ./cpu-benchmark/template.ndjson │
│ corpora.generator.template.raw  │                                 │
│ corpora.generator.template.type │                          gotext │
│ corpora.generator.config.path   │      ./cpu-benchmark/config.yml │
│ corpora.generator.config.raw    │                           map[] │
│ corpora.generator.fields.path   │      ./cpu-benchmark/fields.yml │
│ corpora.generator.fields.raw    │                           map[] │
╰─────────────────────────────────┴─────────────────────────────────╯
╭───────────────────────╮
│ cluster info          │
├───────┬───────────────┤
│ name  │ elasticsearch │
│ nodes │             1 │
╰───────┴───────────────╯
╭───────────────────────────────────────╮
│ disk usage for index metrics-system.c │
│ pu-ep (for all fields)                │
├──────────────────────────────┬────────┤
│ total                        │  11 MB │
│ inverted_index.total         │ 134 kB │
│ inverted_index.stored_fields │ 9.4 MB │
│ inverted_index.doc_values    │ 1.1 MB │
│ inverted_index.points        │ 267 kB │
│ inverted_index.norms         │    0 B │
│ inverted_index.term_vectors  │    0 B │
│ inverted_index.knn_vectors   │    0 B │
╰──────────────────────────────┴────────╯
╭──────────────────────────────────────────────────────────────────────────────╮
│ pipeline metrics-system.cpu-1.54.0 stats in node G4sD7D1lRwyrYYoI76F0wQ      │
├──────────────────────────────────────┬───────────────────────────────────────┤
│ Totals                               │ Count: 20000 | Failed: 0 | Time: 29ms │
│ pipeline (global@custom)             │  Count: 20000 | Failed: 0 | Time: 2ms │
│ pipeline (metrics@custom)            │  Count: 20000 | Failed: 0 | Time: 3ms │
│ pipeline (metrics-system@custom)     │  Count: 20000 | Failed: 0 | Time: 3ms │
│ pipeline (metrics-system.cpu@custom) │  Count: 20000 | Failed: 0 | Time: 2ms │
╰──────────────────────────────────────┴───────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────╮
│ rally stats                                                                                 │
├────────────────────────────────────────────────────────────────┬────────────────────────────┤
│ Cumulative indexing time of primary shards                     │    0.25938333333333335 min │
│ Min cumulative indexing time across primary shards             │                      0 min │
│ Median cumulative indexing time across primary shards          │                      0 min │
│ Max cumulative indexing time across primary shards             │    0.25406666666666666 min │
│ Cumulative indexing throttle time of primary shards            │                      0 min │
│ Min cumulative indexing throttle time across primary shards    │                      0 min │
│ Median cumulative indexing throttle time across primary shards │                      0 min │
│ Max cumulative indexing throttle time across primary shards    │                      0 min │
│ Cumulative merge time of primary shards                        │                      0 min │
│ Cumulative merge count of primary shards                       │                          0 │
│ Min cumulative merge time across primary shards                │                      0 min │
│ Median cumulative merge time across primary shards             │                      0 min │
│ Max cumulative merge time across primary shards                │                      0 min │
│ Cumulative merge throttle time of primary shards               │                      0 min │
│ Min cumulative merge throttle time across primary shards       │                      0 min │
│ Median cumulative merge throttle time across primary shards    │                      0 min │
│ Max cumulative merge throttle time across primary shards       │                      0 min │
│ Cumulative refresh time of primary shards                      │                0.02835 min │
│ Cumulative refresh count of primary shards                     │                        207 │
│ Min cumulative refresh time across primary shards              │                      0 min │
│ Median cumulative refresh time across primary shards           │                      0 min │
│ Max cumulative refresh time across primary shards              │   0.017916666666666668 min │
│ Cumulative flush time of primary shards                        │    0.05106666666666667 min │
│ Cumulative flush count of primary shards                       │                        100 │
│ Min cumulative flush time across primary shards                │ 1.6666666666666667e-05 min │
│ Median cumulative flush time across primary shards             │ 3.3333333333333335e-05 min │
│ Max cumulative flush time across primary shards                │   0.024716666666666668 min │
│ Total Young Gen GC time                                        │                    0.067 s │
│ Total Young Gen GC count                                       │                          3 │
│ Total Old Gen GC time                                          │                        0 s │
│ Total Old Gen GC count                                         │                          0 │
│ Store size                                                     │    0.022750210016965866 GB │
│ Translog size                                                  │  1.9679777324199677e-05 GB │
│ Heap used for segments                                         │                       0 MB │
│ Heap used for doc values                                       │                       0 MB │
│ Heap used for terms                                            │                       0 MB │
│ Heap used for norms                                            │                       0 MB │
│ Heap used for points                                           │                       0 MB │
│ Heap used for stored fields                                    │                       0 MB │
│ Segment count                                                  │                        108 │
│ Total Ingest Pipeline count                                    │                      20008 │
│ Total Ingest Pipeline time                                     │                    1.324 s │
│ Total Ingest Pipeline failed                                   │                          0 │
│ Min Throughput                                                 │            21471.21 docs/s │
│ Mean Throughput                                                │            21471.21 docs/s │
│ Median Throughput                                              │            21471.21 docs/s │
│ Max Throughput                                                 │            21471.21 docs/s │
│ 50th percentile latency                                        │       842.8531724493951 ms │
│ 100th percentile latency                                       │       894.5369799621403 ms │
│ 50th percentile service time                                   │       842.8531724493951 ms │
│ 100th percentile service time                                  │       894.5369799621403 ms │
│ error rate                                                     │                     0.00 % │
╰────────────────────────────────────────────────────────────────┴────────────────────────────╯

--- Benchmark results for package: system - END   ---
Done

@ali786XI ali786XI self-assigned this Mar 7, 2024
@ali786XI ali786XI added enhancement New feature or request Integration:system System labels Mar 7, 2024
@elasticmachine
Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@ali786XI ali786XI marked this pull request as ready for review March 7, 2024 07:17
@ali786XI ali786XI requested a review from a team as a code owner March 7, 2024 07:17
@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @aliabbas-elastic

@elastic-sonarqube
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No Coverage information No data about Coverage
No Duplication information No data about Duplication

See analysis details on SonarQube

@ali786XI ali786XI merged commit 831897a into elastic:main Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:system System

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants