Skip to content

Remove overhead from Logger metadata in the datapath - #72

Open
agnosticdev wants to merge 1 commit into
mainfrom
agnosticdev/LogMetadata
Open

Remove overhead from Logger metadata in the datapath#72
agnosticdev wants to merge 1 commit into
mainfrom
agnosticdev/LogMetadata

Conversation

@agnosticdev

@agnosticdev agnosticdev commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

I noticed in our datapath functions in QUIC and IP we take a CPU hit for using the Logger object in a function, even if the code path is not being exercised.
These are typically error or fault logs and in the QUICTransfer benchmark accumulated to be over 319 megacycles:

319.39 M 100.0%	-	 type metadata accessor for Logger	

The majority of these hits are taken when a QUICConnectionID is created or when a frame claims or unclaims.
It will drop this in the CPU trace:

15.00 M 4.7%	15.00 M	  type metadata accessor for Logger	
3.47 M  1.1%	3.47 M 	  DYLD-STUB$$type metadata accessor for Logger	

This change almost completely eradicates that for QUICTransfer and brings that 319 megacycle number down to: ~ 1 megacycle

1.04 M 100.0%	-	 type metadata accessor for Logger		

I also consistently noticed a 3 gigacycle drop in the overall CPU used over many runs, but its hard to correlate where that drop is coming from.

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

Successfully merging this pull request may close these issues.

2 participants