Interview Prep/Linux/Load, CPU and I/O performance

A VM's clock-sensitive app reports timing glitches, and `dmesg` shows `clocksource: Switched to clocksource ...` or `TSC unstable`.

AdvancedTroubleshootingLoad, CPU and I/O performance
Answer

Likely causes → The kernel detected an unreliable clocksource (TSC) and switched to a slower one (hpet/acpi_pm), hurting time-related syscalls and accuracy.

Diagnose →

cat /sys/devices/system/clocksource/clocksource0/current_clocksource
cat /sys/devices/system/clocksource/clocksource0/available_clocksource
dmesg -T | grep -i clocksource

Fix → Use the hypervisor-recommended clocksource (kvm-clock, tsc on Nitro, hyperv_clocksource_tsc_page), set via clocksource= kernel parameter if needed.

Prevent → Follow cloud vendor guidance for clocksource on each instance family.

All Linux questions Roadmap: Linux

More on Load, CPU and I/O performance