-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversion of InnerFlowId
to SDT args appears expensive
#462
Comments
I spent some time noodling on this before now, and returned to it today. Removing all calls to
So these are very worthwhile (in combination with #460), but I'm seeing some bizarreness in two locations when using either a valid |
#475) This PR replaces `InnerFlowId` with an equivalent C-ABI friendly struct, from which we can directly pass pointers to our dtrace SDTs. This has proven necessary as we are reconstructing this many times per packet in both the UFT slowpath and fastpath. Additionally, this makes partial progress on #460 by using the new `DError` machinery whenever a packet is `Ok(Modified | Hairpin | Bypass)` to elide string formats on layer/port processing. The `Err(_)` and `Ok(Drop{ .. })` cases remain open work, but are less common and in those cases we have at least removed a superfluous realloc + memcpy on the formatted string. From local IGB<->IGB results and comparing 4e2ad7e against master in CI, this seems like O(10%) reduction in packet latency *spent in XDE*, with comparable bandwidth increase. Closes #462.
We seem to be spending around 13% of
Port::process
by callingflow_id_sdt_arg::from
for the benefit of its many dtrace probes -- many times per packet, as we have pre/post-processing and per-layer probes. We should either cache this, or find an adequate#[repr(C)]
for InnerFlowId so that we don't need to perform a conversion.The text was updated successfully, but these errors were encountered: