mtcp-stack / mtcp

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

measuring tx/rx events #238

Closed conjam closed 5 years ago

conjam commented 5 years ago

Hey all, In the paper it is claimed "In our experiments with 8 RX/TX queues per 10 Gbps port, the average number of events that an mTCP thread generates in a single scheduling period is about 2,170 for both TX and RX directions"

Trying to recreate this, and I was curious how this was measured?

EDIT: I realize this wasn't constructive: I am curious if there are any tricks to vary batch size in a fine-grained way; I could either set epoll_max_events to be something artificially low to have small batches? I wasn't sure if there was another approach, my apologies for the vague inquiry.

eunyoung14 commented 5 years ago

Well.. As you might have noticed, there aren't many ways to control the actual batch size in fine-grained manner because it depends on the schedulers. We just tried to solve it naturally by having an event loop. More events from the apps/NICs will induce larger batch size. If you'd like to maintain smaller batches, I recommend you to read less packets at a loop even though they remain at the buffer.

conjam commented 5 years ago

Makes sense, this is what I ended up going with. Thanks!