Skip to content

Commit 48918c3

Browse files
committed
Update exp scripts
1 parent d6654f9 commit 48918c3

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

hotelReservation/noisy-neighbors/stress-ng/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ After setting up the alias `alias my-stressng='./stress-ng-helpers.sh'`:
4141
| Command | Description | Example |
4242
|---------|-------------|---------|
4343
| `my-stressng cpu [workers] [duration]` | CPU stress | `my-stressng cpu 4 120s` |
44-
| `my-stressng memory [workers] [duration]` | Memory pressure | `my-stressng memory 2 60s` |
44+
| `my-stressng memory [workers] [duration]` | STREAM memory bandwidth | `my-stressng memory 2 60s` |
4545
| `my-stressng vm [workers] [size] [duration]` | Virtual memory stress | `my-stressng vm 2 1G 60s` |
4646
| `my-stressng pagefault [workers] [duration]` | Page fault stress | `my-stressng pagefault 1 30s` |
4747
| `my-stressng io [workers] [duration]` | I/O stress | `my-stressng io 2 60s` |
48-
| `my-stressng network [workers] [duration]` | Network stress | `my-stressng network 1 45s` |
48+
| `my-stressng network [workers] [duration]` | UDP network stress | `my-stressng network 1 45s` |
4949

5050
### Special Commands
5151

@@ -100,13 +100,13 @@ my-stressng cpu 4 120s
100100
kubectl run cpu-stress --image=yourusername/stress-ng --restart=Never -- --cpu 4 --timeout 120s
101101
```
102102

103-
**Memory pressure - heap expansion**
103+
**Memory pressure - STREAM memory bandwidth**
104104
```bash
105105
# Helper shorthand:
106106
my-stressng memory 2 60s
107107

108108
# Equivalent kubectl command:
109-
kubectl run mem-stress --image=yourusername/stress-ng --restart=Never -- --brk 2 --timeout 60s
109+
kubectl run mem-stress --image=yourusername/stress-ng --restart=Never -- --stream 2 --timeout 60s
110110
```
111111

112112
**VM stress - 2 workers with 1GB each**
@@ -136,13 +136,13 @@ my-stressng io 2 60s
136136
kubectl run io-stress --image=yourusername/stress-ng --restart=Never -- --io 2 --timeout 60s
137137
```
138138

139-
**Network stress**
139+
**Network stress - UDP**
140140
```bash
141141
# Helper shorthand:
142142
my-stressng network 2 60s
143143

144144
# Equivalent kubectl command:
145-
kubectl run network-stress --image=yourusername/stress-ng --restart=Never -- --sock 2 --timeout 60s
145+
kubectl run network-stress --image=yourusername/stress-ng --restart=Never -- --udp 2 --timeout 60s
146146
```
147147

148148
### Advanced Examples
@@ -154,7 +154,7 @@ my-stressng noisy 0 # 0 = infinite duration
154154

155155
# Equivalent kubectl command:
156156
kubectl run noisy-neighbor --image=yourusername/stress-ng --restart=Never -- \
157-
--cpu 2 --vm 1 --vm-bytes 1G --brk 1 --io 2 --sock 1 --timeout 0
157+
--cpu 2 --vm 1 --vm-bytes 1G --stream 1 --io 2 --udp 1 --timeout 0
158158
```
159159

160160

@@ -192,7 +192,7 @@ my-stressng nodes
192192
my-stressng cleanup
193193

194194
# Equivalent kubectl commands:
195-
kubectl delete pod cpu-stress mem-stress vm-stress page-fault io-stress network-stress noisy-neighbor heavy-load limited-stress node-stress
195+
kubectl delete pod cpu-stress mem-stress vm-stress page-fault io-stress udp-stress noisy-neighbor heavy-load limited-stress node-stress
196196
```
197197

198198
## 📊 Monitoring Impact
@@ -219,10 +219,10 @@ watch kubectl get pods -o wide
219219
- `--cpu N` - Number of CPU workers (0 = all CPUs)
220220
- `--vm N` - Number of VM workers
221221
- `--vm-bytes SIZE` - Memory per VM worker (256M, 512M, 1G, 2G)
222-
- `--brk N` - Memory pressure via heap expansion
222+
- `--stream N` - STREAM memory bandwidth workers
223223
- `--fault N` - Page fault workers
224224
- `--io N` - I/O workers
225-
- `--sock N` - Socket workers
225+
- `--udp N` - UDP network workers
226226
- `--timeout TIME` - Duration (60s, 5m, 1h, 0 = infinite)
227227

228228
### Memory Sizes

hotelReservation/noisy-neighbors/stress-ng/stress-ng-helpers.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ my_stressng() {
9393
memory)
9494
local workers=${args[1]:-1}
9595
local duration=${args[2]:-60s}
96-
local cmd=$(create_kubectl_cmd "mem-stress" "$current_image" "--brk $workers --timeout $duration" "$node")
96+
local cmd=$(create_kubectl_cmd "mem-stress" "$current_image" "--stream $workers --timeout $duration" "$node")
9797
eval $cmd
9898
;;
9999
vm)
@@ -118,21 +118,21 @@ my_stressng() {
118118
network)
119119
local workers=${args[1]:-2}
120120
local duration=${args[2]:-60s}
121-
local cmd=$(create_kubectl_cmd "sock-stress" "$current_image" "--sock $workers --timeout $duration" "$node")
121+
local cmd=$(create_kubectl_cmd "udp-stress" "$current_image" "--udp $workers --timeout $duration" "$node")
122122
eval $cmd
123123
;;
124124
noisy)
125125
local duration=${args[1]:-0} # 0 = infinite
126-
local cmd=$(create_kubectl_cmd "noisy-neighbor" "$current_image" "--cpu 2 --vm 1 --vm-bytes 1G --brk 1 --io 2 --sock 1 --timeout $duration" "$node")
126+
local cmd=$(create_kubectl_cmd "noisy-neighbor" "$current_image" "--cpu 2 --vm 1 --vm-bytes 1G --stream 1 --io 2 --udp 1 --timeout $duration" "$node")
127127
eval $cmd
128128
;;
129129
cleanup)
130-
kubectl delete pod cpu-stress mem-stress vm-stress page-fault io-stress sock-stress noisy-neighbor heavy-load 2>/dev/null || true
130+
kubectl delete pod cpu-stress mem-stress vm-stress page-fault io-stress udp-stress noisy-neighbor heavy-load 2>/dev/null || true
131131
echo "Cleaned up stress test pods"
132132
;;
133133
status)
134134
echo "Current stress test pods:"
135-
kubectl get pods -o wide | grep -E "(cpu-stress|mem-stress|vm-stress|page-fault|io-stress|sock-stress|noisy-neighbor|heavy-load)" || echo "No stress test pods running"
135+
kubectl get pods -o wide | grep -E "(cpu-stress|mem-stress|vm-stress|page-fault|io-stress|udp-stress|noisy-neighbor|heavy-load)" || echo "No stress test pods running"
136136
;;
137137
nodes)
138138
echo "Available nodes:"

0 commit comments

Comments
 (0)