cloud-bulldozer / benchmark-operator

The Chuck Norris of cloud benchmarks
Apache License 2.0
282 stars 127 forks source link

Initial draft for nighthawk workload #796

Closed vishnuchalla closed 1 year ago

vishnuchalla commented 2 years ago

Description

Adding nighthawk as a workload to the operator. Wrapper side of it for more context: https://github.com/cloud-bulldozer/benchmark-wrapper/pull/446

Sample CR Configuration:

apiVersion: ripsaw.cloudbulldozer.io/v1alpha1
kind: Benchmark
metadata:
  name: nighthawk-benchmark
  namespace: benchmark-operator
spec:
  clustername: myk8scluster
  elasticsearch:
    url: https://search-perfscale-dev-chmf5l4sh66lvxbnadi4bznl3a.us-west-2.es.amazonaws.com:443
  workload:
    cleanup: true
    name: nighthawk
    args:
      # url: https://www.google.com
      image: quay.io/vchalla/nighthawk:latest
      terminations: ["http", "edge", "passthrough", "reencrypt"]
      kind: pod
      hostnetwork: false
      number_of_routes: 3
      samples: 1
      concurrency: 8
      duration: 60
      connections: 80 
      max_requests_per_connection: 50
      debug: true

CR for testing default values:

apiVersion: ripsaw.cloudbulldozer.io/v1alpha1
kind: Benchmark
metadata:
  name: nighthawk-benchmark
  namespace: benchmark-operator
spec:
  clustername: myk8scluster
  elasticsearch:
    url: https://search-perfscale-dev-chmf5l4sh66lvxbnadi4bznl3a.us-west-2.es.amazonaws.com:443
  workload:
    cleanup: true
    name: nighthawk
    args:
      terminations: ["http"]

Testing

Tested and verified the results in the ES and pod logs as well.

Sample ES docs

"hits" : [
      {
        "_index" : "ripsaw-nighthawk-results",
        "_type" : "_doc",
        "_id" : "4a2a5aa5c41a3ec53bdc5de9f9ea4a04f12cc8fa967fa2033b95f82e2ae356f0",
        "_score" : 1.0,
        "_source" : {
          "concurrency" : 8,
          "duration" : 60,
          "connections" : 80,
          "max_requests_per_connection" : 4294937295,
          "rps" : 5,
          "kind" : "pod",
          "url" : "http://nighthawk-benchmark-route-http-2-benchmark-operator.apps.vchalla-perfscale.perfscale.devcluster.openshift.com",
          "workload" : "nighthawk",
          "uuid" : "e777d5e4-4b9e-5e90-a453-61e30caa9a5b",
          "user" : "ripsaw",
          "cluster_name" : "myk8scluster",
          "targets" : [
            "http://nighthawk-benchmark-route-http-2-benchmark-operator.apps.vchalla-perfscale.perfscale.devcluster.openshift.com"
          ],
          "hostname" : "nighthawk-client-10.0.221.20-nginx-http-2-e777d5e4-pmxvt",
          "requested_qps" : 40,
          "throughput" : 39.98936405750067,
          "status_codes_1xx" : 0,
          "status_codes_2xx" : 2400,
          "status_codes_3xx" : 0,
          "status_codes_4xx" : 0,
          "status_codes_5xx" : 0,
          "p50_latency" : 3.188863,
          "p75_latency" : 4.302335,
          "p80_latency" : 5.629951,
          "p90_latency" : 10.191871,
          "p95_latency" : 13.958143,
          "p99_latency" : 24.370175,
          "p99_9_latency" : 39.522303,
          "avg_latency" : 4.663531,
          "timestamp" : "2022-08-18T19:57:57.357909411Z",
          "bytes_in" : 1108800.0,
          "bytes_out" : 331200.0,
          "iteration" : 1,
          "run_id" : "NA"
        }
      }
    ]

Pods logs can be verified using below script once all the clients are reached to completion state

echo -n "`oc get all | grep -i -e 'completed' | cut -f 1 -d ' '`" > output.txt

cat output.txt | awk '{print $0}' | while
    read each
do
    echo "client name: $each"
    echo "client info"
    echo -n "`oc get $each -o yaml | grep -i -e "clientfor" -e 'port' -A 2`"
    echo -e "\n"
    echo "client logs"
    echo -n "`oc logs $each | tail -n 5`"
    echo -e "\n\n"
done

Some of the Testing Screenshots:

Screenshot from 2022-08-18 17-41-27

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

codecov-commenter commented 1 year ago

Codecov Report

Merging #796 (8136c06) into master (0954437) will increase coverage by 0.30%. The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #796      +/-   ##
==========================================
+ Coverage   53.17%   53.47%   +0.30%     
==========================================
  Files           8        8              
  Lines         331      331              
==========================================
+ Hits          176      177       +1     
+ Misses        155      154       -1     
Flag Coverage Δ
gha 53.47% <ø> (+0.30%) :arrow_up:
python-3.9 53.47% <ø> (+0.30%) :arrow_up:
unit 53.47% <ø> (+0.30%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cli/ripsaw/clients/k8s.py 91.11% <0.00%> (+1.11%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dry923 commented 1 year ago

@rsevilla87 @mukrishn @jtaleric PTAL when you have a chance

vishnuchalla commented 1 year ago

Tested again and verified results with all the new changes.