LAT_SYSCALL(8)
π LAT_SYSCALL(8) π
okay bestie, welcome to lat_syscall, one of the little legends from the LMBENCH crew of benchmarking tools. she does exactly one thing and she does it flawlessly: she times how long it takes to dip a toe into the operating system. simple entry. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
lat_syscall [ -P <parallelism> ] [ -W <warmups> ] [ -N <repetitions> ]
null|read|write|stat|fstat|open [ file ]
so you pick one of those six modes β null, read, write, stat, fstat, or open β and optionally hand her a file. and yeah, the flags up front are the usual LMBENCH trio: -P for <parallelism>, -W for <warmups>, -N for <repetitions>. no cap. π«Ά
π¦ DESCRIPTION π¦
here's the tea on each mode, one by one:
nullβ measures how long it takes to dogetppid(). and whygetppid()of all things? because in every UNIX variant we're aware of, it requires a round-trip to/from kernel space, and the actual work it does once it's inside the kernel is small and bounded. perfect little controlled experiment, honestly. πreadβ measures how long it takes to read one byte from/dev/zero. tiny heads up though: some operating systems do not support/dev/zero. πwriteβ times how long it takes to write one byte to/dev/null. this one's iconic because it's useful as a lower bound cost on anything that has to interact with the operating system. like, that's the floor, bestie. you cannot go cheaper than this. π₯statβ measures how long it takes tostat()a file whose inode is already cached. already warm, already ready. βfstatβ measures how long it takes tofstat()an open file whose inode is already cached. same energy, but for the file you've already got open. πopenβ measures how long it takes toopen()and thenclose()a file. both halves, one number. β¨
π OUTPUT π
the output format is this, literally:
Null syscall: 67 microseconds
that's it. that's the whole reveal. she's not wordy, she's just correct. π
π ACKNOWLEDGEMENT π
funding for the development of this tool was provided by Sun Microsystems Computer Corporation. shoutout to the sponsors, we love to see it. π
π§ SEE ALSO π§
go read the rest of the family, iykyk. π¦
π AUTHOR π
Carl Staelin and Larry McVoy
and fr fr: comments, suggestions, and bug reports are always welcome. they mean it. slide into the inbox, bestie. π«Ά
and that's the whole page!! mwah π this one's (c)1994 Larry McVoy, and the date stamp on it is $Date$ β the LMBENCH classic, stay slaying β¨ππ
π¦ where this page comes from
- debian bookworm: lmbench 3.0-a9+debian.1-6
- debian trixie: lmbench 3.0-a9+debian.1-9
- ubuntu jammy: lmbench 3.0-a9+debian.1-6
- ubuntu noble: lmbench 3.0-a9+debian.1-6build3
- ubuntu questing: lmbench 3.0-a9+debian.1-9
- ubuntu resolute: lmbench 3.0-a9+debian.1-10
- ubuntu stonking: lmbench 3.0-a9+debian.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms