GithubHelp home page GithubHelp logo

guessi / dnsperf-bench Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 12.0 33 KB

DNS Performance Testing with Kubernetes Pods

Home Page: https://hub.docker.com/r/guessi/dnsperf/

Shell 62.93% Dockerfile 37.07%
docker dnsperf benchmark performance-testing kubernetes

dnsperf-bench's Introduction

DNS Performance Testing with Kubernetes Pods

Docker Stars Docker Pulls Docker Automated

Integrated Items

  • DNSPerf 2.14.0

Preflight checklist

Does CoreDNS running expected version?

$ kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].image}'

Does CoreDNS running with expected Corefile?

$ kubectl get configmap coredns -n kube-system -o jsonpath='{$.data.Corefile}'

Does CoreDNS running with correct resources configuration?

$ kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].resources}'

Benchmark with Kubernetes Pods

Apply pre-configured testing deployment/pods

$ kubectl apply -f https://raw.githubusercontent.com/guessi/dnsperf-bench/master/k8s-dnsperf-bench.yaml
configmap/dns-records-config created
deployment.apps/dnsperf created

Find out your Kubernetes DNS service IP address

$ kubectl get service kube-dns -n kube-system -o jsonpath='{$.spec.clusterIP}'

If your DNS service address is not "10.100.0.10", you will need to change the value of predefined "DNS_SERVER_ADDR"

$ kubectl edit deployment dnsperf

Make sure the deployment is running as expected

$ kubectl get deploy dnsperf

NAME      READY   UP-TO-DATE   AVAILABLE   AGE
dnsperf   1/1     1            1           81s

$ kubectl get pods -l app=dnsperf

NAME                       READY   STATUS    RESTARTS   AGE
dnsperf-7b9cc5b497-d5nfs   1/1     Running   0          1m16s

To check benchmark results

$ kubectl logs -f deployments/dnsperf

DNS Performance Testing Tool
Version 2.14.0

[Status] Command line: dnsperf -f any -m udp -s 10.100.0.10 -p 53 -d /opt/records.txt -c 1 -T 1 -l 30 -t 5 -Q 100000
[Status] Sending queries (to 10.100.0.10:53)
[Status] Started at: Thu Apr 11 16:47:46 2024
[Status] Stopping after 30.000000 seconds
[Status] Testing complete (time limit)

Statistics:

  Queries sent:         517317
  Queries completed:    517317 (100.00%)
  Queries lost:         0 (0.00%)

  Response codes:       NOERROR 517317 (100.00%)
  Average packet size:  request 43, response 160
  Run time (s):         30.004152
  Queries per second:   17241.513774

  Average Latency (s):  0.004805 (min 0.000101, max 0.029327)
  Latency StdDev (s):   0.002537

Check resources utilization of the CoreDNS deployment

$ kubectl top pods -n kube-system -l k8s-app=kube-dns

NAME                       CPU(cores)   MEMORY(bytes)
coredns-79989457d9-fn2hc   1644m        15Mi
coredns-79989457d9-xss5l   925m         16Mi

Stress Test

You may gain more replicas to stress your CoreDNS even harder

$ kubectl scale deployments/dnsperf --replicas 4

deployment.apps/dnsperf scaled

After gaining workload, you should find it's CPU utilization even higher

$ kubectl top pods -n kube-system -l k8s-app=kube-dns

NAME                       CPU(cores)   MEMORY(bytes)
coredns-79989457d9-fn2hc   1839m        17Mi
coredns-79989457d9-xss5l   1344m        16Mi

If you try to gain too much stress without tuning CoreDNS configureation (e.g. CPU, Memory, Replicas of CoreDNS), you should find some TIMEOUT, packet losts. That's expected... don't report it as bug! you should give CoreDNS more resources to handle that stress.

Reference

dnsperf-bench's People

Contributors

guessi avatar

Stargazers

David Blum avatar Dario Mader avatar NetPuter avatar Cameron McAvoy avatar Shane Xie avatar Robin Polak avatar Viki Pranata avatar lcividin avatar Anton Winter avatar  avatar Che-Wei Lin avatar  avatar André Cancian avatar chaiu avatar  avatar  avatar Zheng Shao avatar Dave Henderson avatar Théo Brigitte avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

dnsperf-bench's Issues

Is there any way to customize the timeout for requests ?

i got some query lost ,not sure if it's the timeout too short
Queries sent: 300000
Queries completed: 299992 (100.00%)
Queries lost: 8 (0.00%)

Response codes: NOERROR 299992 (100.00%)
Average packet size: request 61, response 121
Run time (s): 60.000304
Queries per second: 4999.841334

Average Latency (s): 0.000459 (min 0.000090, max 0.045371)
Latency StdDev (s): 0.000953

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.