Performance Monitoring & Tuning Flashcards
7 cards from real LCA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Performance Monitoring & Tuning flashcards as text
Which command displays real-time per-CPU statistics including user, system, and idle percentages?
Answer: mpstat
mpstat from the sysstat package shows per-processor statistics in real time.
What does a consistently high 'si' (swap-in) value in vmstat output indicate?
Answer: The system is actively swapping pages from disk to RAM, indicating memory pressure
High 'si' in vmstat means the OS is reading pages back from swap into RAM, a sign of insufficient physical memory.
Which /proc file provides a summary of CPU time spent in user mode, kernel mode, idle, and iowait?
Answer: /proc/stat
/proc/stat contains cumulative CPU time counters used by tools like top and vmstat.
You run 'perf stat ./myapp' and see a very low Instructions Per Cycle (IPC). What is the most likely bottleneck?
Answer: Memory latency or cache misses causing the CPU to stall
Low IPC typically means the CPU is stalling while waiting for data from cache or RAM.
What is the purpose of 'nice' and 'renice' commands in Linux performance tuning?
Answer: Adjusting a process's scheduling priority to influence CPU time allocation
nice and renice set a process's niceness value, which affects its priority in the CPU scheduler.
Which tool would you use to trace system calls made by a running process to diagnose unexpected latency?
Answer: strace
strace intercepts and logs system calls and signals for a given process.
The kernel parameter vm.swappiness controls what behavior?
Answer: How aggressively the kernel moves anonymous pages to swap relative to reclaiming file cache
vm.swappiness (0–100) tunes the kernel's tendency to swap anonymous memory versus dropping page cache.