Senior LevelLinux Commands & SysAdmin
How does Pressure Stall Information (PSI) measure CPU, memory, and I/O resource pressure?
❓ Interview Prompt: Explain Pressure Stall Information (PSI), /proc/pressure/ (cpu, memory, io), some vs full stall metrics, and early resource exhaustion detection.
Pressure Stall Information (PSI) in Cgroups v2 provides real-time metrics showing the percentage of time tasks are blocked waiting for CPU, Memory, or I/O resources:
Metric Types ('/proc/pressure/memory'):
•
some: Percentage of time at least ONE task was stalled waiting for memory.
•
full: Percentage of time ALL tasks were completely stalled waiting for memory (system-wide freeze!). Enables early proactive workload throttling before OOM crashes occur.
Code Implementation Example
bash
# Read real-time memory pressure stall information
cat /proc/pressure/memory
# Output: some avg10=0.00 avg60=0.00 avg300=0.00 total=0
# full avg10=0.00 avg60=0.00 avg300=0.00 total=0
# Read I/O pressure stall metrics
cat /proc/pressure/io💡Reading memory and I/O Pressure Stall Information (PSI) metrics.
🎯 Interview Key Takeaway
Monitor PSI metrics in /proc/pressure/ to detect resource starvation bottlenecks before system failure occurs.
#PSI#Pressure Stall Information#Cgroups v2#Senior
Back to all Linux Commands & SysAdmin Questions→