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 do getppid(). and why getppid() 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 to stat() a file whose inode is already cached. already warm, already ready. ⭐
  • fstat β€” measures how long it takes to fstat() 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 to open() and then close() 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 βœ¨πŸŽ€πŸ’