mtcp-stack / mtcp

mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems
Other
2k stars 436 forks source link

About CPU usage breakdown of mTCP lighttpd #217

Open Observer-Wu opened 5 years ago

Observer-Wu commented 5 years ago

Hi,

I am trying to use mTCP lighttpd as a HTTP server. And I want to get the CPU usage of different lighttpd's portions as your NSDI paper shows (Figure 1).

Would you please tell me what profile/measurement tool that you used, and some tips about how to get the usage.

Thank you very much!

eunyoung14 commented 5 years ago

Hi, we used oprofile to measure the CPU usages shown in Figure 1. You can breakdown the CPU usage of each function in an application. Their documentation has some good examples, so please look at this page for further information.

ajamshed commented 5 years ago

While we used oprofile for our analysis in the paper, we can also recommend using perf to get CPU cycles breakdown. But please note that the numbers that you will eventually collect may not match with the ones mentioned in the paper (since you will be measuring in modern systems with the latest mTCP version) due to 2 major reasons:

1- We were using PSIO driver that is an interrupt-driven (with NAPI) network driver. The latest version of mTCP uses DPDK that is essentially polling the NIC (and will keep the CPU 100% busy all the time). This may effect the statistics.

2- The Linux kernel has evolved a lot since the time of the paper (we used linux-2.6.32 for mTCP-PSIO experiments).