da_real_mvp
New Member
- Messages
- 69
- Reaction score
- 0
- Location
- Atlanta, GA
so I've been chasing a random latency issue on one of my boxes for like two weeks. nothing in the app logs, nothing in dmesg, load average looks fine (0.4 on 4 vCPU), but every so often a request just... hangs for 200-400ms. completely random.
finally ran mpstat -P ALL 2 10 and just stared at it. steal time on two of the four cores was bouncing between 15% and 40%. on a plan that literally says "dedicated vCPU" in the marketing copy. dedicated!!
opened a ticket, sent them the mpstat output, and got the classic reply: "steal time is a normal metric on virtualized environments and does not indicate an issue." bro. 40% steal means the hypervisor is handing my CPU time to someone else. that IS the issue. that's the whole issue lol.
anyway, a few things I've learned the hard way:
vmstat 1steal column is the one to watch, not %idle. I was staring at idle% for days like an idiot.cat /proc/pressure/cpu(PSI) is way more useful than load average if you're on a recent kernel. it'll tell you if tasks are actually getting stalled.- if your provider won't move you to a quieter host, you can sometimes just... redeploy to a different region and get lucky. I've done this. feels dumb but it works.
- KVM on a 1:1 vCPU:pCPU pinning is what you actually want. oversold OpenVZ/LXC on a busy node and you're just along for the ride.
so now I'm running my own little steal-time logger (5 second samples to a csv, alerts if 5min avg crosses 10%) and it's honestly been more useful than half the monitoring I pay for.
anyone else deal with this? is there a provider out there that actually pins cores and doesn't bullshit you about it? because I'm tired of playing host roulette every time the node gets busy.