Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This section documents the results of

Jira
serverJIRA
serverIdb14d4ad9-eb00-3a94-88ac-a843fb6fa1ca
keyNDS-239
. The goal of this ticket was to determine whether the Nginx ingress controller would be a performance bottleneck for the NDS Labs system.

Baseline service: Nginx

 This test uses the nginx-ingress-controller as the loadbalancer and a simple Nginx webserver as the backend service. An ingress rule was created manually to map perf-nginx.cluster.ndslabs.org to the backend service.

Load generation: boom

Use the boom load test generator to scale up concurrent requests on a Nebula m1.medium VM:

...

Measuring latency and resource usage

Measuring latency: boom

Boom The boom utility produces response time output , for exampleincluding a summary of the average response time for each request as well as the distribution of response times and latency.

Code Block
bin/boom -cpus 4 -n 1000 -c 500 http://perf-nginx.iassist.ndslabs.org/
Summary:
  Total:	0.1539 secs
  Slowest:	0.1335 secs
  Fastest:	0.0193 secs
  Average:	0.0685 secs
  Requests/sec:	4842.2840

Status code distribution:
  [200]	745 responses

Response time histogram:
  0.019 [1]	|
  0.031 [28]	|∎∎∎∎∎∎
  0.042 [110]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.054 [69]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.065 [161]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.076 [157]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.088 [60]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.099 [38]	|∎∎∎∎∎∎∎∎∎
  0.111 [49]	|∎∎∎∎∎∎∎∎∎∎∎∎
  0.122 [37]	|∎∎∎∎∎∎∎∎∎
  0.134 [35]	|∎∎∎∎∎∎∎∎

Latency distribution:
  10% in 0.0394 secs
  25% in 0.0502 secs
  50% in 0.0652 secs
  75% in 0.0808 secs
  90% in 0.1103 secs
  95% in 0.1217 secs
  99% in 0.1293 secs

Measuring latency: netperf

Measure latency and throughput to services inside kubernetes

Measuring CPU/Memory/IO utilization

 

Results

Image RemovedImage Removed

 

 

Below is a plot of average response time with increasing concurrent requests (-n 1000 requests) and replicas. Average response times increase as the number of concurrent requests increase, but still remain below 1 second. Adding more replicas does not have an apparent effect, suggesting that the response time is related to the ingress load-balancer, not the backend service.

Image Added

 

Below is a plot of the latency distribution at 25%, 50%, 75%, and 90% with increasing concurrent requests. At 600 concurrent requests, the number of requests with longer latency periods increases.

Image Added

 

Measuring CPU/Memory utilization

Memory and CPU utilization was measured using pidstat. The nginx ingress controller has two worker threads in this test, labeled as proc1 and proc2 (process).

 

CPU utilization

The following table reports CPU utilization for each process during the boom test. %CPU peaks at 12%.

 %usr %system%guest%CPU minflt/s majflt/s VSZ RSS %MEM 
 proc1proc2proc1proc2proc1proc2proc1proc2proc1proc2
15:56:521000003261320325992152080150680.380.37
15:56:531106060032613232599215208150680.380.3712
15:56:5412303003261323259921520815068060.380.37
15:56:551332902993003253280325992614404150680.360.37
15:56:56145047750032532803275761014404163600.360.4
15:56:5715001003253280325768144041148440.360.37
15:56:58164064840032532832841614404172160.360800.42
15:56:5917001003253283253281440401144040.360.36
15:5756:001850102160032532832942014404011183600.360.45
15:5756:011910100032532832614014404152160.360.3820
15:56:20215:57:020400032532832614014404152160.36600.38
15:5756:0321106301003253280326764214404158400.360.39
15:5756:042230400032532832580814404148840.360.3770
15:56:23115:57:05010020003253280329908114404188400.360.46
15:5756:06240474050325328325628144041470400.360.369
15:5756:0725010127510032532833078414404197160.360.492
15:5756:0826051600032532832588414404149600.361110.37
15:5756:0927015020003253280331960144040207560.360.51
15:5756:102840600032532832532814404144040.36100.36
15:5756:11290012581003253283291281440418204010.360.45
15:5756:1230000032532832532814404144040.360.3615:57:13000

 

Memory utilization

The following table reports memory utilization for each process during the boom test. %MEM remains relatively stable throughout the test.

 

 minflt/s majflt/s VSZ RSS %MEM 
 proc1proc2
032532832532814404144040.360.36
 %usr %system%guest%CPU 
 proc1proc2proc1proc2proc1proc2proc1proc2
15:56:105200000326132325992152081506800.380.37
15:56:1153006003261323259921520860150680.38012.37
15:56:1254303000326132325992152081506806.380.37
15:56:13552929903032532833259920144040150680.3660.37
15:56:14565054770032532832757614404163600.36100.4
15:56:155700100032532832576814404148440.3610.37
15:56:16584046480032532832841614404172160.3680.42
15:56:175900100032532832532814404144040.3610.36
15:5657:1800506102100325328032942014404183600.36110.45
15:5657:1901100100032532832614014404152160.3620.38
15:5657:20022004000325328326140144041521606.360.38
15:5657:21031016300032532832676414404158400.3620.39
15:5657:2204300400032532832580814404148840.3670.37
15:5657:2305011002003253283299081440400188400.3610.46
15:5657:24060470403253283256285144040147040.3609.36
15:56:2557:071127500132532803307841144040197160.3602.49
15:56:2657:08000032532832588451144046149600.360111.37
15:5657:2709015020003253283319600144040207560.360.51
15:5657:2810400600032532832532814404144040.36100.36
15:56:2957:110125800325328329128101440401820401.360.45
15:5657:3012000032532832532814404144040.360.36
15:57:1300

...

00

...

325328

...

325328

...

14404

 

Scaling services

Large-file upload/download

...

144040.360.36

Killing the loadbalancer

Running kubectl delete pod on the nginx-ilb pod, the running pod is in a terminating state for ~30 seconds. During this time, the replication controller creates a new pod, but it remains in a pending state for the 30 second period.  Some responses are handled, but there is the risk of ~30 seconds of downtime between pod restarts. This may be related to the shutdown of the default-http-backend, but this isn't clear.