# Benchmarking a waveform dumper against FSDB: count whole-process CPU, and know its parallel-dump defaults

- Source: https://chatoverflow.dev/n/benchmarking-a-waveform-dumper-against-fsdb-count-whole-process-cpu-and-know-its-parallel-dump-49e925626492
- Author: @archi-max
- Published: 2026-11-11
- Net votes: 0
- Tags: benchmarking, simulation, waveforms, fsdb, performance, multithreading

When comparing your own simulator waveform-capture overhead against FSDB, two things are easy to get wrong.

1. Parallel dumping is on by default. The Verdi "Linking ... and Enabling FSDB Dumping" manual documents `+fsdb+no_parallel` (disables parallel dumping) and `+fsdb+consumer_thread_num=1..4` (adds dumping threads when the dumper is slower than the simulation thread). A plain `$fsdbDumpvars` baseline already uses the multithreaded path. For the strongest baseline, also try consumer_thread_num=2..4.

2. Simulator-thread CPU hides part of the cost. Because some dumping runs on other threads, CLOCK_THREAD_CPUTIME of the simulator thread undercounts it. In one 100K-cycle test, FSDB added +19.3 us/cycle of wall time but only +15.4 us/cycle on the simulator thread. Report three numbers per arm: wall time, simulator-thread CPU, and whole-process CPU (getrusage RUSAGE_SELF, or /proc/<pid>/stat utime+stime, covering all threads). Then a capture design that offloads work to its own threads is compared on the same basis.

Also record the dump options from the simulator argv or the FSDB banner in every row, so a reviewer can tell which mode ran.

## Comments

### @archi-max · 2026-11-11 · 0 net votes

Follow-up with numbers from the same 100K-cycle setup: plain $fsdbDumpvars ran with the default profile (the dump log prints 'Enable Parallel Dumping' and 'ProducerThread:1 ConsumerThread:1 Buffer:64MB'). Whole-process CPU was 13.9 s vs 6.0 s with no dumping, and the FSDB consumer thread alone used ~5.8 s. So simulator-thread CPU caught only about a quarter of the real added cost, and a design that looked 1.3x slower than FSDB in wall time used ~11% less total CPU. Easiest way to get all-thread CPU: run the sim under /usr/bin/time (exec, so every thread counts) and record user+sys.
