You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/azure-kubernetes/availability-performance/identify-memory-saturation-aks.md
+19-12Lines changed: 19 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,7 @@ This article discusses methods for troubleshooting memory saturation issues. Mem
14
14
## Prerequisites
15
15
16
16
- The Kubernetes [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) command-line tool. To install kubectl by using [Azure CLI](/cli/azure/install-azure-cli), run the [az aks install-cli](/cli/azure/aks#az-aks-install-cli) command.
17
-
- The [krew](https://sigs.k8s.io/krew) package manager for installing [Inspektor Gadget](https://go.microsoft.com/fwlink/?linkid=2260072). You can follow the [krew quickstart guide](https://krew.sigs.k8s.io/docs/user-guide/quickstart/) to install it.
18
-
- The open source project [Inspektor Gadget](/troubleshoot/azure/azure-kubernetes/logs/capture-system-insights-from-aks#how-to-install-inspektor-gadget-in-an-aks-cluster) for advanced process level memory analysis.
17
+
- The open source project [Inspektor Gadget](/troubleshoot/azure/azure-kubernetes/logs/capture-system-insights-from-aks#what-is-inspektor-gadget) for advanced process level memory analysis. You can find details around installation in [this guide](/troubleshoot/azure/azure-kubernetes/logs/capture-system-insights-from-aks#how-to-install-inspektor-gadget-in-an-aks-cluster).
19
18
20
19
## Symptoms
21
20
@@ -166,12 +165,20 @@ Now that you've identified the pods that are using high memory, you can identify
166
165
167
166
For advanced process level memory analysis, use [Inspektor Gadget](https://go.microsoft.com/fwlink/?linkid=2260072) to monitor real time memory usage at the process level within pods:
168
167
168
+
1. Install Inspektor Gadget using the instructions found in the [documentation](/troubleshoot/azure/azure-kubernetes/logs/capture-system-insights-from-aks#how-to-install-inspektor-gadget-in-an-aks-cluster)
169
+
170
+
2. Run the [top_process gadget](https://aka.ms/igtopprocess) to identify processes that are using large amounts of memory. You can use `--fields` to select certain columns and can filter events based on specific field values, for example the pod names of previously identified pods with high memory consumption. You can also
171
+
- Identify top memory-consuming processes across the cluster
172
+
- Identify top memory-consuming processes on a specific node
173
+
- Identify top memory-consuming processes on a specific namespace
174
+
169
175
```bash
170
-
# Install Inspektor Gadget
171
-
kubectl krew install gadget
172
-
kubectl gadget deploy # Monitor top memory-consuming processes across all containers
176
+
# Run top_process across the cluster
173
177
kubectl gadget run top_process --sort memoryRelative --max-entries 12
174
178
179
+
# Monitor processes on a specific pod
180
+
kubectl gadget run top_process --sort memoryRelative --podname <pod-name>
181
+
175
182
# Monitor processes on a specific node
176
183
kubectl gadget run top_process --sort memoryRelative --node <node-name>
177
184
@@ -183,16 +190,16 @@ For advanced process level memory analysis, use [Inspektor Gadget](https://go.mi
You can use this output to identify the processes that are consuming the most memory on the node. The output can include the node name, namespace, pod name, container name, process ID (PID), command name (COMM), CPU and memory usage, check https://inspektor-gadget.io/docs/latest/gadgets/top_process/ for further details
202
+
You can use this output to identify the processes that are consuming the most memory on the node. The output can include the node name, namespace, pod name, container name, process ID (PID), command name (COMM), CPU and memory usage, check [the documentation](https://aka.ms/igtopprocess) for more details.
196
203
197
204
198
205
### Step 3: Review best practices to avoid memory saturation
0 commit comments