Skip to content

Commit 48fddcd

Browse files
committed
Update performance monitoring section: change title, remove AMD references, and add wrk and btop usage instructions
1 parent 80e4395 commit 48fddcd

2 files changed

Lines changed: 25 additions & 39 deletions

File tree

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Apply performance configuration and monitoring tools
2+
title: Monitor performance with wrk and btop
33
weight: 70
44

55
### FIXED, DO NOT MODIFY
@@ -8,7 +8,11 @@ layout: learningpathall
88

99
## Apply configuration updates
1010

11-
Now that you have all your nginx deployments running across Intel, AMD, and ARM architectures, you can apply performance optimizations and install monitoring tools across all pods using the utility script.
11+
Now that you have all your nginx deployments running across Intel and ARM architectures, you can monitor performance across each architecture using wrk to generate load and btop to monitor system performance.
12+
13+
{{% notice Note %}}
14+
This tutorial uses wrk to generate load, which is readily available on apt and brew package managers. [wrk2](https://github.com/giltene/wrk2) is a modern fork of wrk with additional features. wrk was chosen for this tutorial due to its ease of install, but if you prefer to install and use wrk2 (or other http load generators) for your testing, feel free to do so.
15+
{{% /notice %}}
1216

1317
### Apply performance configuration
1418

@@ -21,12 +25,12 @@ The `nginx_util.sh` script includes a `put config` command that will:
2125
1. Run the following command to apply the configuration updates:
2226

2327
```bash
24-
./nginx_util.sh put config
28+
./nginx_util.sh put btop
2529
```
2630

2731
You will see output similar to the following:
2832

29-
```output
33+
```outputI
3034
Applying custom nginx.conf to all nginx pods...
3135
configmap/nginx-config created
3236
Updating nginx-amd-deployment...
@@ -46,17 +50,6 @@ Installing btop on nginx-intel-deployment-6f5bff9667-zdrqc...
4650
✅ Custom nginx.conf applied and btop installed on all pods!
4751
```
4852

49-
### Performance optimizations applied
50-
51-
The custom nginx configuration includes several performance optimizations:
52-
53-
- **Auto worker processes**: `worker_processes auto` scales based on CPU cores
54-
- **File caching**: Optimized for high I/O performance with `open_file_cache`
55-
- **Access logs enabled**: Logs requests for monitoring and debugging
56-
- **TCP optimizations**: `tcp_nopush` and `tcp_nodelay` enabled
57-
- **Connection management**: Optimized timeouts and 100,000 keep-alive requests
58-
- **Memory management**: Automatic connection cleanup for non-responding clients
59-
6053
### Verify configuration updates
6154

6255
2. Check that all pods have restarted with the new configuration:
@@ -67,32 +60,28 @@ kubectl get pods -n nginx
6760

6861
You should see all pods with recent restart times.
6962

70-
3. Verify the custom nginx configuration is applied by checking one pod:
71-
72-
```bash
73-
kubectl exec -n nginx $(kubectl get pods -l arch=intel -n nginx -o name | sed 's/pod\///') -- grep "worker_processes auto" /etc/nginx/nginx.conf
74-
```
7563

76-
You should see:
77-
```output
78-
worker_processes auto;
79-
```
80-
81-
4. Verify btop is installed and available:
64+
4. Verify btop is installed and available on both Arm and Intel pods:
8265

8366
```bash
8467
kubectl exec -n nginx $(kubectl get pods -l arch=intel -n nginx -o name | sed 's/pod\///') -- btop --version
68+
kubectl exec -n nginx $(kubectl get pods -l arch=arm -n nginx -o name | sed 's/pod\///') -- btop --version
8569
```
8670

87-
You should see the btop version information.
71+
You should see btop version information for both pods.
72+
73+
{{% notice Note %}}
74+
Because pods are ephemeral, btop will need to be reinstalled if the pods are deleted or restarted in the future. If you get an error saying btop is not found, simply rerun the `./nginx_util.sh put btop` command to reinstall it.
75+
{{% /notice %}}
76+
8877

8978
### Monitor pod performance
9079

9180
5. You can now login to any pod and use btop to monitor system performance:
9281

9382
```bash
9483
# Login to AMD pod (replace with intel or arm as needed)
95-
./nginx_util.sh login amd
84+
./nginx_util.sh login arm
9685
```
9786

9887
Once inside the pod, run btop to see real-time system monitoring:
@@ -101,19 +90,16 @@ Once inside the pod, run btop to see real-time system monitoring:
10190
btop
10291
```
10392

104-
Press `q` to quit btop when finished.
105-
106-
### Test services still work
107-
108-
6. Verify that all services are still responding correctly after the configuration update:
93+
With btop open on the remote pod, from your local machine, run wrk against the pod to generate load. The nginx_util.sh script includes a wrk wrapper command that makes it easy to use the wrk utility to load test an endpoint:
10994

11095
```bash
111-
./nginx_util.sh get intel
112-
./nginx_util.sh get amd
113-
./nginx_util.sh get arm
114-
./nginx_util.sh get multiarch
96+
./nginx_util.sh wrk arm
11597
```
11698

117-
All services should return the nginx welcome page, confirming that the performance optimizations are working correctly.
99+
100+
Press `q` to quit btop when finished.
101+
102+
### Test services still work
103+
118104

119105
You have successfully applied performance optimizations and monitoring tools to your multi-architecture nginx cluster!

content/learning-paths/servers-and-cloud-computing/multiarch_nginx_on_aks/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ learning_objectives:
1515

1616
prerequisites:
1717
- An [Azure account](https://azure.microsoft.com/en-us/free/).
18-
- A local machine with [jq](https://jqlang.org/download/), [curl](https://curl.se/download.html), [Azure CLI](/install-guides/azure-cli/) and [kubectl](/install-guides/kubectl/) installed.
18+
- A local machine with [jq](https://jqlang.org/download/), [curl](https://curl.se/download.html), [wrk](https://github.com/wg/wrk), [Azure CLI](/install-guides/azure-cli/) and [kubectl](/install-guides/kubectl/) installed.
1919

2020
author:
2121
- Geremy Cohen

0 commit comments

Comments
 (0)