naver / arcus-memcached

ARCUS memory cache server
https://github.com/naver/arcus
Apache License 2.0
70 stars 55 forks source link

INTERNAL: Reduce add_iov() work for TCP connections #737

Closed ing-eoking closed 8 months ago

ing-eoking commented 8 months ago

I keep putting off a major refactor on the (nearly 11 year old in its current state) frontend code. Now that my internal fiddling is starting to slow down it was worth a shot at some low hanging fruit. When doing the ascii response inlining work I noticed add_iov() taking up a lot of CPU. When reviewing my old notes and the original patch from Steven Grimm it's clear that the pipeline was optimized for (2006-era) UDP traffic. All the extra wrapped code ended up causing a lot of extra work for TCP sockets.

TCP 프로토콜에서 첫 payload에 대하여 msghdr를 나누었던 구현을 수정합니다. memcached에서 반영되었던 commit을 그대로 복사했습니다.