LAT_PIPE(8)

πŸ’– lat_pipe β€” the hot potato of interprocess communication πŸ’–

okay bestie, welcome to LMBENCH, section 8 of the manual, and today's main character is lat_pipe. she's a tiny little benchmark with one (1) job and she does it flawlessly. let's get into it. 🫢


✨ NAME ✨

lat_pipe β€” measure interprocess communication latency through pipes

like. literally what it says. pipes. latency. measured. slay.


🌸 SYNOPSIS 🌸

lat_pipe [ -P <parallelism> ] [ -W <warmups> ] [ -N <repetitions> ]

three optional little flags, all vibes, all in brackets, all here to be tweaked. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the setup: lat_pipe spins up two processes, and they talk to each other through a Unix pipe. that's the whole thing. that's the bit.

what are they measuring? interprocess communication latency. the benchmark passes a token back and forth between the two processes β€” and if you've ever heard of a ``hot potato'' benchmark, this is exactly that. πŸ₯”πŸ”₯ catch it, yeet it back, catch it, yeet it back.

and that's it. no other work is done in the processes. they are not multitasking. they are not being productive. they are playing hot potato with a token and honestly? iconic behaviour. no notes. πŸ‘‘


🌈 OUTPUT 🌈

the number it reports is in microseconds per round trip, and bestie, listen β€” it includes the total time, meaning the context switching overhead is includeded in there too. (yes, the original page says "includeded". i am not fixing it. it's a heritage typo. we respect it. πŸ™ˆ)

the output format is giving very much this:

Pipe latency: 491 microseconds

one line. one number. one vibe. that's the whole reveal. πŸ’€βœ¨


πŸ’œ ACKNOWLEDGEMENT πŸ’œ

funding for the development of this tool was provided by Sun Microsystems Computer Corporation. thank you for your service, sponsors. 🫑🩷


⭐ SEE ALSO ⭐

go read the parent page, she's the whole ecosystem. iykyk. 🌸


πŸ‘‘ AUTHOR πŸ‘‘

Carl Staelin and Larry McVoy

and a lil note from the original, which i am passing along with love: Comments, suggestions, and bug reports are always welcome. so like. dm them. they're listening. πŸŽ€


πŸ’– tiny reminder, bestie: every flag and every number up there came straight from the original page, so don't go editing them into something cuter. the vibes are mine, the facts are the manual's. periodt. πŸ’…

and that's the whole page! credit where it's due β€” this one's from the LMBENCH collection, (c)1994 Larry McVoy, stamped with $Date$ like a lil time capsule, and filed under LAT_PIPE(8). go measure some pipes, you absolute legend. πŸ¦‹βœ¨πŸ’–