Previously, we determined that mixing EventSource and Span is costly. Now it’s just a matter of finding the lowest cost. The last approach used an ArrayPool for all ETW strings. But remember that ETW events are capped at 64 KB.…
EventSource and Span: take 2
Last time, we talked about how EventSource and Span don’t really mix. ETW wants a null-terminated string for tracing and Span isn’t set up for that. It turns out this null terminator issue has been explored in some depth by…
EventSource and Span: take 1
Let’s say you’re living the zero-allocation, universal memory .NET life, and you need to trace some char data. The only problem is that you have a Span<char> and EventSource only supports string. What to do? We’ll start with a typical…
Let’s do DHCP: sockets
After our foray into DHCP options, we are ready for the last piece of the puzzle — actually sending and receiving data on a socket. First, we need to encode the high performance receive pattern. I’ve decided on an async…
Let’s do DHCP: options
Last time we built our DHCP buffer with header fields. For a fully formed DHCP message, we also need to support DHCP options. Each option has a tag byte specifying its type, a length byte, and a number of data…
Let’s do DHCP: intro
We’ve been talking about high performance datagram scenarios but have so far used a contrived sample of sending mostly fixed size strings — not so realistic. That will change today, as we turn to one of the more famous datagram…
High performance datagramming: concurrency?
We’ve been looking at some tips and tricks for achieving high performance in a skeletal datagram server. And yet, the implementation so far is single threaded. This is fine if strict packet ordering must be maintained. But we’re talking about…
High performance datagramming: heap?
Last time, we looked at an implementation of a datagram server with and without channels. The non-channel solution ultimately won out in terms of performance. But that’s not all we can do to squeeze every ounce of throughput from this…
High performance datagramming: channels?
You may have heard of System.IO.Pipelines, a set of classes to aid in writing high performance streaming server code. But what about datagram scenarios, e.g. using UDP? That would seem like a job for System.Threading.Channels. Let’s try it and do…
TKey performance indicators: custom types
Last time, we covered the effect of various primitive types (and string) for use as dictionary keys. Today we will see how custom types fare. Let’s start with a custom value type which simply wraps a string: We’ll use a…