getc_putc(8)

πŸ’Ύ getc_putc β€” the group chat version πŸ’Ύ

okay bestie so this is getc_putc, straight out of the System Manager's Manual (section 8, the system manager girlies 🫢). It's a little sidekick program that tests how your hard drive is doing. Sit down, hydrate, we're doing byte-by-byte IO and we're gonna have a time.


✨ NAME ✨

getc_putc β€” it's a program to test hard drive performance. that's it, that's the whole job, and honestly? iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

getc_putc [-d dir] [-s size(KiB)] [-m machine-name] [-u
uid-to-use:gid-to-use] [-g gid-to-use]

like yes she takes flags, she's versatile, she contains multitudes πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this manual page is documenting getc_putc, briefly. (The original literally says "briefly the getc_putc, program" and we love her for the comma chaos. no cap.)

Here's the vibe: this is a simple little adjunct to the bonnie++ benchmark. Her whole thing is testing various ways of doing IO one byte at a time. And lowkey? Usually you don't need to do enough of this for it to be a performance issue, so it doesn't really matter much which way you do it. That's the tea. β˜•

BUT. Sometimes it is necessary. For example β€” and this is the example, I'm not making it up β€” when parsing IO from a terminal and then launching another process which will take over all IO, such as a simple shell. That's the scenario. That's the girl.

The real benefits of all this are twofold, and they're both kind of funny:

  • helping settle some arguments about the performance of such things (academic beef resolution 😭)
  • educating novices about how bad per-byte IO really is (a learning experience, a humbling one, fr fr)

πŸŽ€ OPTIONS πŸŽ€

Okay so for getc_putc, every single option follows the same format: a hyphen, then a letter, and then the next parameter contains the value. So it's -x value, not -xvalue. Got it? got it. πŸ’–

  • -d β€” the directory to use for the tests.
  • -s β€” the size of the file for byte IO performance, measured in kilobytes. NB: you can specify the size in mega-bytes if you add 'm' to the end of the number. πŸ‘€ The default for this test is to test with a 512MiB file. And of that file, only 1/64 of it will be used for write() and read() system calls β€” because anything else takes too long. she's efficient like that.
  • -m β€” name of the machine. for display purposes only. purely cosmetic, a little nameplate, she's not doing anything with it 🌈
  • -u β€” user-id to use. When running as root, specify the UID to use for the tests. It is not recommended to use root, so if you really want to run as root then use -u root. Also, if you want to specify the group to run as, then use the user:group format. If you specify a user by name but no group, then the primary group of that user will be chosen. If you specify a user by number and no group, then the group will be nogroup. (sad for her but okay πŸ₯²)
  • -g β€” group-id to use. Same as using :group for the -u parameter, just a different way to specify it, for compatibility with other programs. twins, basically πŸ‘―
  • -q β€” quiet mode. If specified, then some of the extra informational messages will be suppressed. Also the csv data will be the only output on standard out and the plain text data will be on standard error. This means you can run getc_putc -q >> file.csv to record your csv data. slay, redirect queen πŸ“βœ¨
not me about to pipe everything into a csv like it's a personality trait πŸ’€

πŸ‘‘ OUTPUT πŸ‘‘

The primary output is plain-text in 80 columns, which is designed to fit well when pasted into email and which will work well with Braille displays. thoughtful! inclusive! we love to see it πŸ’œ

The second type of output is CSV (Comma Seperated Values). This can easily be imported into any spread-sheet or database program. spreadsheet girlies, this one's for you πŸ“

For every test the result is a speed in KiB/s. And she does not display the CPU time, because it presumably is 99% of the power of a single CPU (or something very close to that). so like, we know, we don't need to see it πŸ’…


πŸ’œ AUTHOR πŸ’œ

This program, it's manual page, and the Debian package were written by Russell Coker <russell@coker.com.au>.

The documentation, the Perl scripts, and all the code for testing the creation of thousands of files was written by Russell Coker, but the entire package is under joint copyright with Tim Bray. two legends, one package, we stan a collab 🫢


🚨 SIGNALS 🚨

  • Handles SIGINT and does a cleanup (which may take some time), a second SIGINT or a SIGQUIT will cause it to immidiately die.
  • SIGXCPU and SIGXFSZ act like SIGINT.
  • Ignores SIGHUP.
bestie if you hit Ctrl-C twice you are NOT being gentle and she WILL perish. the first one is a polite request, the second one is a vibe check you will not pass 😭

🌈 AVAILABILITY 🌈

The source is available from http://www.coker.com.au/bonnie++.

See http://etbe.coker.com.au/category/benchmark for further information.


⭐ SEE ALSO ⭐


and that's the whole page, bestie! the footer just signs off with getc_putc(8) in the System Manager's Manual corner, no fancy version stamp or date drama attached β€” she keeps it mysterious, she keeps it cute. go forth and benchmark responsibly πŸ’–βœ¨πŸ¦‹