Skip to content

Commit 751a5ba

Browse files
committed
Update README.md
1 parent 05cd64b commit 751a5ba

File tree

1 file changed

+49
-74
lines changed

1 file changed

+49
-74
lines changed

README.md

+49-74
Original file line numberDiff line numberDiff line change
@@ -4,107 +4,82 @@
44
[![Docker Pulls](https://img.shields.io/docker/pulls/guessi/dnsperf.svg)](https://hub.docker.com/r/guessi/dnsperf/)
55
[![Docker Automated](https://img.shields.io/docker/automated/guessi/dnsperf.svg)](https://hub.docker.com/r/guessi/dnsperf/)
66

7-
87
## Integrated Items
98

109
* DNSPerf 2.14.0
1110

12-
## Preflight checklist
13-
14-
### Does CoreDNS running expected version?
15-
16-
$ kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].image}'
17-
18-
### Does CoreDNS running with expected Corefile?
19-
20-
$ kubectl get configmap coredns -n kube-system -o jsonpath='{$.data.Corefile}'
21-
22-
### Does CoreDNS running with correct resources configuration?
23-
24-
$ kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].resources}'
25-
26-
## Benchmark with Kubernetes Pods
27-
28-
### Apply pre-configured testing deployment/pods
11+
## 🔢 Preflight checklist
2912

30-
$ kubectl apply -f https://raw.githubusercontent.com/guessi/dnsperf-bench/master/k8s-dnsperf-bench.yaml
31-
configmap/dns-records-config created
32-
deployment.apps/dnsperf created
13+
Does CoreDNS running expected version?
3314

34-
### Find out your Kubernetes DNS service IP address
15+
```bash
16+
kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].image}' | cut -d':' -f2
17+
```
3518

36-
$ kubectl get service kube-dns -n kube-system -o jsonpath='{$.spec.clusterIP}'
19+
Does CoreDNS running with expected Corefile?
3720

38-
### If your DNS service address is not "10.100.0.10", you will need to change the value of predefined "DNS_SERVER_ADDR"
21+
```bash
22+
kubectl get configmap coredns -n kube-system -o jsonpath='{$.data.Corefile}'
23+
```
3924

40-
$ kubectl edit deployment dnsperf
25+
Does CoreDNS running with correct resources configuration?
4126

42-
### Make sure the deployment is running as expected
27+
```bash
28+
kubectl get deployments coredns -n kube-system -o jsonpath='{$.spec.template.spec.containers[0].resources}' | jq -r '.'
29+
```
4330

44-
$ kubectl get deploy dnsperf
31+
## 🧪 Benchmark with Kubernetes Pods
4532

46-
NAME READY UP-TO-DATE AVAILABLE AGE
47-
dnsperf 1/1 1 1 81s
33+
Apply pre-configured testing deployment/pods
4834

49-
$ kubectl get pods -l app=dnsperf
35+
```bash
36+
kubectl apply -f https://raw.githubusercontent.com/guessi/dnsperf-bench/main/k8s-dnsperf-bench.yaml
37+
```
5038

51-
NAME READY STATUS RESTARTS AGE
52-
dnsperf-7b9cc5b497-d5nfs 1/1 Running 0 1m16s
39+
Make sure the deployment is running as expected
5340

54-
### To check benchmark results
5541

56-
$ kubectl logs -f deployments/dnsperf
42+
```bash
43+
kubectl get pods -l app=dnsperf
44+
NAME READY STATUS RESTARTS AGE
45+
dnsperf-7b9cc5b497-d5nfs 1/1 Running 0 1m16s
46+
```
5747

58-
DNS Performance Testing Tool
59-
Version 2.14.0
48+
Check benchmark results
6049

61-
[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
62-
[Status] Sending queries (to 10.100.0.10:53)
63-
[Status] Started at: Thu Apr 11 16:47:46 2024
64-
[Status] Stopping after 30.000000 seconds
65-
[Status] Testing complete (time limit)
50+
```bash
51+
kubectl logs -f deployments/dnsperf
52+
...
53+
Statistics:
54+
...
55+
Queries per second: 17241.513774
56+
...
57+
```
6658

67-
Statistics:
59+
Check resources utilization of the CoreDNS deployment
6860

69-
Queries sent: 517317
70-
Queries completed: 517317 (100.00%)
71-
Queries lost: 0 (0.00%)
61+
```bash
62+
kubectl top pods -n kube-system -l k8s-app=kube-dns
63+
```
7264

73-
Response codes: NOERROR 517317 (100.00%)
74-
Average packet size: request 43, response 160
75-
Run time (s): 30.004152
76-
Queries per second: 17241.513774
77-
78-
Average Latency (s): 0.004805 (min 0.000101, max 0.029327)
79-
Latency StdDev (s): 0.002537
80-
81-
82-
### Check resources utilization of the CoreDNS deployment
83-
84-
$ kubectl top pods -n kube-system -l k8s-app=kube-dns
85-
86-
NAME CPU(cores) MEMORY(bytes)
87-
coredns-79989457d9-fn2hc 1644m 15Mi
88-
coredns-79989457d9-xss5l 925m 16Mi
89-
90-
## Stress Test
65+
## 🔥 Stress Test
9166

9267
### You may gain more replicas to stress your CoreDNS even harder
9368

94-
$ kubectl scale deployments/dnsperf --replicas 4
95-
96-
deployment.apps/dnsperf scaled
97-
98-
### After gaining workload, you should find it's CPU utilization even higher
69+
```bash
70+
kubectl scale deployments/dnsperf --replicas 10
71+
```
9972

100-
$ kubectl top pods -n kube-system -l k8s-app=kube-dns
73+
## 👀 Check CPU utilization (should be higher then usual)
10174

102-
NAME CPU(cores) MEMORY(bytes)
103-
coredns-79989457d9-fn2hc 1839m 17Mi
104-
coredns-79989457d9-xss5l 1344m 16Mi
75+
```bash
76+
kubectl top pods -n kube-system -l k8s-app=kube-dns
77+
```
10578

106-
> 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.
79+
> If you try to gain too much stress without tuning CoreDNS configureation, it is expected to have some TIMEOUT or packet losts.
80+
>
81+
> That's expected results... don't report it as bug! you should give CoreDNS more resources to handle that stress.
10782
108-
## Reference
83+
## 📑 Reference
10984

11085
- https://www.dnsperf.com/

0 commit comments

Comments
 (0)