Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packet pacing feature #37

Open
1 of 3 tasks
jwbensley opened this issue Nov 5, 2017 · 2 comments
Open
1 of 3 tasks

Add packet pacing feature #37

jwbensley opened this issue Nov 5, 2017 · 2 comments

Comments

@jwbensley
Copy link
Owner

jwbensley commented Nov 5, 2017

ISSUE TYPE
  • Bug Report
  • Enhancement/Feature Request
  • Question
VERSION DETAILS

N/A

SUMMARY

Provide a packet pacing feature to smooth the inter-frame transmission timing.

STEPS TO REPRODUCE

Have a CLI option to enable a "smoothed" transmission interval between frames (packet pacing). When setting a max speed with -m/-M the NIC burst until the rate-limit is reached and then for the remainder of the 1 second interval the NIC is idle. -T could set a delay between frame transmission which will smooth out the transmission rate of the max speed set in Mbps/MBps

e.g. -T could be a flag to enable traffic "smoothing" (packet pacing) to smooth out a 10Mbps stream so that 825 frames of 1514 bytes are evenly paced over a 1 second interval:

1514 * 8                  == 12112 bits per frame.
Target "smoothed" Tx rate == 10Mbps (10,000,000 bits per second)
10,000,000 / 12112        == ~825 frames per second
1Gbps NIC                 == 1,000,000,000 bits per second Tx rate
12112 / 1,000,000,000     == one frame takes 0.000012112 seconds to Tx.
0.000012112ns * 825       == 0.009992400 seconds required to Tx 825 frames
1.0 - 0.0099924           ==  0.990007600 remaining to be spread out as inter-frame delay
0.990007600 / 825         ==  0.00120000921 seconds inter-frame delay

sudo ./etherate -M 10000000 -T
@jwbensley
Copy link
Owner Author

Add some documentation information about how coalescing may interfere.

Ref: https://scholzd.github.io/MoonGen/rate_control.html

@jwbensley
Copy link
Owner Author

Can we use nanosleep instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant