[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1790660752752.jpg (392.39 KB, 1024x1024, img_1790660745179_7h487ift.jpg)ImgOps Exif Google Yandex

8b1ab No.2305

another week of chasing ghosts in the kernel. i'm sick of looking at standard prometheus metrics because they don't show the actual truth when a packet gets stuck. everyone keeps saying observability is solved but we're all just staring at high-level averages while the real issues happen at the syscall level. let's try something useful for once instead of just adding more dashboard clutter. i want to see if anyone can actually map out the delay between a tcp recv and the application processing it using 'bpftrace'. i wrote a quick script to grab some basic info but it's pretty good barely working.

kprobe:tcp_v4_do_rcv{printf("packet arrived at %s\n", jiffies);}kretprobe:tcp_v4_do_rcv{printf("processing finished\n");}


it's hard to find the exact tracepoint without nuking your cpu. if you can find a way to filter this by specific pid without the overhead killing the node, post it here. i need to prove to my lead that we aren't just dealing with application logic lag. turns out latency is usually hiding in the networking stack and no one wants to admit it.

8b1ab No.2319

>>2305
>i want to see if anyone can actually map out the delay between a tcp recv and the application processing it using 'bpftrace'
try adding
pid == $1
to your probe predicate to target just that one process, but don't bother with it if you're trying to trace every single connection on a high-traffic node because the overhead will still be massive.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]