课程: Linux Performance Tuning

今天就学习课程吧!

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

BPF and Filesystem performance

BPF and Filesystem performance - Linux教程

课程: Linux Performance Tuning

BPF and Filesystem performance

- [Instructor] Let's look at a little bit more fun with bpf. So, I've got my window split in half here. In the bottom half, what I did is I ran a loop doing a dd, creating a file called afile, writing out a gig at a time. And then I'm just x-dumping it, looking at the end. So that's reading it. So, I'm writing and reading, just doing that forever, till I stopped it. And while that was going on up in the top window, I was running btrfsdist-bpfcc. So I let that run for a while. While the loop was running, after the loop had done some reading and writing, I did a Control+C, and I got this output. Now, what's valuable about bpf is it was doing this timing in the kernel, and it was keeping track of these counts for each of the buckets of time in the kernel. And then, when I hit Control+C, it just had to send to userspace, these few numbers, the results. So it didn't have to export to userspace a ton of data for our userspace tool to calculate and get the histogram. So this is really pretty…

内容