LedgerMath
← All benchmarksHow syscall works

System call

syscall · compared across machine types · 32 Series on 8 machine types · AWS us-east-2

CPU
Call
Path
Order
CompareMachineVariantP50P99Unit costRuns
c8a.2xlargenone39.81 ns—$0.00000472 /1M ops89
c8i.2xlargenone60.95 ns—$0.00000636 /1M ops89
c8g.2xlargenone86.70 ns—$0.00000766 /1M ops4
c6i.8xlargenone93.23 ns—$0.0000352 /1M ops89
m6id.2xlargenone93.25 ns—$0.0000123 /1M ops1
i4i.2xlargenone93.25 ns—$0.0000178 /1M ops89
i4g.2xlargenone120.2 ns—$0.0000206 /1M ops4
m5.largenone423.9 ns—$0.0000113 /1M ops91
Compared:m5.largec8g.2xlargec8i.2xlarge

Run-to-run spread

time per call across counted Runs

Over time

newest counted Runs, time per call

(one request each to the data API)

What this measures

The cost of one call into the kernel on one thread (getpid, getrusage, and stat, whose cost depends on the file system that answers it, which each Run observes), beside gettimeofday, which the vDSO normally answers without entering the kernel; whether it did is not observed, and the Run's dump section kernel records the clock source.

What it does not measure

  • gettimeofday normally does not enter the kernel, and whether it did is not observed; the Run's dump section kernel records the clock source.
  • With call stat, every repetition stats the same path. The cost of stat depends on the file system that answers it, which path_fs_type records.
  • The binary is linked statically, which changes how gettimeofday is reached. In two measurements on a development machine it cost more than in a dynamically linked binary (see "Findings").

The whole method, on its page →

c8i.2xlarge · getpid · none

Beat this hot path on GitHub ↗