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

2.6Mpps with RecordTimeStamp() environment. Normal? #72

Closed
kthkaya opened this issue Mar 29, 2018 · 4 comments
Closed

2.6Mpps with RecordTimeStamp() environment. Normal? #72

kthkaya opened this issue Mar 29, 2018 · 4 comments

Comments

@kthkaya
Copy link

kthkaya commented Mar 29, 2018

Following is the single pipeline packet generator

Idle -> EnsureDPDKBuffer -> Discard;
InfiniteSource(LENGTH 10, LIMIT 10000000, STOP true)
        -> NumberPacket(OFFSET 0)
        -> UDPIP6Encap(2001:2001:2001:2001::1, 1234, 2001:2001:2001:2001::2, 1234)
        -> EtherEncap(0x86DD, 00:04:23:D0:93:63, 00:17:cb:0d:f8:db)
        -> record :: RecordTimestamp()
        -> CheckNumberPacket(OFFSET 62, COUNT 10000000)
        -> diff :: TimestampDiff(OFFSET 62, RECORDER record)
        -> counter :: AverageCounter()
        -> Discard;

Yielding these results

diff.average:
0.0118919
counter.count:
10000000
counter.rate:
2661698.16343

Running on

Model name:          Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
Stepping:            4
CPU MHz:             2800.103
CPU max MHz:         3600.0000
CPU min MHz:         1200.0000
BogoMIPS:            5600.20

No matter how many cores I pass, I get approximately 2.6Mpps as shown above. If I comment out the etherencap and udpencap, it is approx 3Mpps.

Is this expected?

@tbarbette
Copy link
Owner

Without the replay it looks more or less normal. InfiniteSource needs probably some more HEADROOM to avoid packet copy in the encap elements. The packets are actually created from scratch and maybe even copied once in this setup. Replay will keep them in memory. Before REPLAY it is also a good thing to have EnsureDPDKBuffer to avoid a copy when sending the packet (using QUICK_CLONE 1 is even best).

@kthkaya
Copy link
Author

kthkaya commented Mar 29, 2018

Thanks Tom! After reading https://github.com/kohler/click/wiki/FAQs-about-click I was hoping to catch something around 7Mpps but obviously, not every element is suitable.
I still have to figure out the latency caused by replay from the previous issue. I will keep you posted.

@kthkaya kthkaya closed this as completed Mar 29, 2018
@tbarbette
Copy link
Owner

This case is very very different. I achieve at least 15MPPS with a single core of a middle range Xeon with a router config. But creating a packet, computing the chzcksumS after IP/UDP encap and copying the content to a DPDK buffer is very heavy. You may gain something by compiling with --enable-dpdk-pool for that last point. If you don't set headroom to InfiniteSource, I also think you have one more packet copy...

@tbarbette
Copy link
Owner

This case is very very different. I achieve at least 15MPPS with a single core of a middle range Xeon with a router config. But creating a packet, computing the checksumS after IP/UDP encap and copying the content to a DPDK buffer is very heavy. You may gain something by compiling with --enable-dpdk-pool for that last point. If you don't set headroom to InfiniteSource, I also think you have one more packet copy...

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

No branches or pull requests

2 participants