svsematest(8)

๐Ÿ“ฆ
version 2.11 ยท 2 versions
, in arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

๐Ÿ‘‘ svsematest โ€” the manual page, but make it make sense ๐Ÿ‘‘

okay bestie, pull up a chair ๐Ÿช‘ because we're talking about svsematest(8), and honestly? she's iconic. this is the section 8 manual page for the one and only svsematest.

quick licensing tea: this page carries SPDX-License-Identifier: GPL-2.0-or-later. respect the license, periodt. ๐Ÿ’œ

โœจ NAME โœจ

svsematest โ€” spin up two threads, or fork two processes, and measure the latency of SYSV semaphores. no cap, that's literally her whole job. ๐Ÿ’…


๐ŸŽ€ SYNTAX ๐ŸŽ€

like, here's how you call her:

svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance
DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV]
[--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet]
[-S|--smp] [-t|--threads [NUM]]

copy it, paste it, live your truth. ๐Ÿฆ‹


๐Ÿ’– DESCRIPTION ๐Ÿ’–

so here's the vibe: svsematest starts two threads โ€” or, if you want, it forks two processes instead โ€” and those two lil guys are synchronized via SYSV semaphores. ๐Ÿซถ

and then? it measures the latency between releasing a semaphore on one side and getting it on the other side. that's it. that's the whole plot. and it ate. ๐Ÿ”ฅ


๐ŸŒธ OPTIONS ๐ŸŒธ

okay this is the part where we go through every single flag because we do NOT skip options in this house. all of them. every one. let's gooo. โœจ

  • -a, --affinity[=NUM] โ€” run on processor number NUM. and if PROC is not specified, just run on the current processor. (yes bestie, it says PROC in there, we don't make the rules, we just report them ๐Ÿซ )
  • -b, --breaktrace=USEC โ€” sends a break trace command when latency is > USEC. this is a debugging option, lowkey for controlling the latency tracer in the realtime preemption patch. it's the move when you're trying to hunt down unexpected large latencies on a system. ๐Ÿ•ต๏ธโ™€๏ธ
  • -d, --distance=DIST โ€” sets the distance of thread intervals in microseconds (default is 500 us). when cyclictest is called with the -t option and more than one thread gets created, this distance value gets added to the interval of the threads: Interval(thread N) = Interval(thread N-1) + DIST. math but make it cute. ๐Ÿงฎ
  • -D, --duration=TIME โ€” specify a length for the test run. and you can append 'm', 'h', or 'd' to say minutes, hours or days. so like, 'd' if you're feeling unhinged. ๐Ÿ™ˆ
  • -f, --fork โ€” instead of creating threads (which is the default, fyi), fork new processes. choose your fighter. โš”๏ธ
  • -i, --interval=INTV โ€” sets the base interval of the thread(s) in microseconds (default is 1000 us). this sets the interval of the first thread. see also -d. ๐Ÿ‘€
  • --json=FILENAME โ€” write the final results into FILENAME, JSON formatted. data girlies rise. ๐Ÿ“Š
  • -l, --loops=LOOPS โ€” sets the number of loops. default is 0 (endless ๐Ÿ˜ต). this one is useful for automated tests with a given number of test cycles. svsematest stops once the number of timer intervals has been reached. so, like, it knows when to leave the party. ๐Ÿšช
  • -p, --prio=PRIO โ€” sets the priority of the process. main character energy only. ๐Ÿ‘‘
  • -q, --quiet โ€” print a summary only on exit. useful for automated tests where only the summary output needs to be captured. she's mysterious. ๐Ÿคซ
  • -S, --smp โ€” SMP testing: options -a -t and same priority of all threads. everybody equal, everybody slaying. ๐ŸŒˆ
  • -t, --threads[=NUM] โ€” sets the number of test threads (default is 1 if this option isn't given). if NUM is specified, create NUM test threads. if NUM is not specified, NUM is set to the number of available CPUs. surprise mechanics. ๐Ÿ’€

๐Ÿฆ‹ EXAMPLES ๐Ÿฆ‹

this next example was running on a 4-way CPU, and honestly? she served:

# svsematest -a -t -p99 -i100 -d25 -l1000000
#0: ID13110, P99, CPU0, I100; #1: ID13111, P99, CPU0, Cycles 1000000
#2: ID13112, P98, CPU1, I125; #3: ID13113, P98, CPU1, Cycles 813573
#4: ID13114, P97, CPU2, I150; #5: ID13115, P97, CPU2, Cycles 667285
#6: ID13116, P96, CPU3, I175; #7: ID13117, P96, CPU3, Cycles 591403
#1 -> #0, Min    1, Cur    2, Avg    2, Max   12
#3 -> #2, Min    1, Cur    3, Avg    2, Max   12
#5 -> #4, Min    1, Cur    3, Avg    3, Max   12
#7 -> #6, Min    1, Cur    2, Avg    3, Max   11

look at those numbers. Min, Cur, Avg, Max. chef's kiss. ๐Ÿ˜ญ๐Ÿ’–


๐ŸŒˆ AUTHORS ๐ŸŒˆ

Carsten Emde <C.Emde@osadl.org> โ€” thank you for your service, legend. ๐Ÿซก๐Ÿ’


โญ SEE ALSO โญ

  • semop(2) โ€” go read her next, bestie, she's the whole reason this works. ๐Ÿงš

okay that's the whole page!! you're officially a svsematest girlie now, iykyk. ๐Ÿ’…

and a lil sign-off for the record: this whole thing is version 0.1 of svsematest(8). yes, 0.1. baby version, already iconic. periodt. ๐ŸŽ€

๐Ÿ“ฆ where this page comes from