课程: Linux Performance Tuning

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

BPF and Memory bottlenecks and leaks

BPF and Memory bottlenecks and leaks - Linux教程

课程: Linux Performance Tuning

BPF and Memory bottlenecks and leaks

- Let's have some fun with BPF. So I'm in user s bin. If I do a list, grip BPF, word count. There's like 130 programs here. So let's just try a couple. Remember there's man pages on these. Let's say we're interested in kernel locking, may be looking for bottlenecks. Remember with BPF programs you have to use sudo 'cause we're going to run stuff in the kernel here. So there's one called k lock stat. And then they all have BPF cc. And we'll go for 10 seconds and I'll hit control C after I see some output. There we go. And we can see here, this is stuff in the kernel process, one work or EP poll, and then the offset's where it is, so it's some function in there. And we see stuff about spinning. This process, one work, was spinning 29,000 times. So that means there's contention, something was holding that spin lock and this one wanted it. Could be an issue. Let's look at memory leaks. So we can find out about all memory allocations, not necessarily leaks, with memleak BPFcc minus T. Let…

内容