A look under the hood
SystemChart runs a small recorder in the background. It reads your hardware every one to five seconds and keeps the history on your own drive, so you can scroll back to what your PC was doing last night or last month. A tool that watches your PC around the clock has to stay out of the way of the games and work it is measuring, so we spend a lot of time measuring the recorder itself.
This post walks through the recorder, storage and window work behind the 0.9.46 to 0.9.49 developer/review previews: where the readings come from, what we found, what we changed, one thing the first attempt made worse, and the measurements. It gets technical. The changelog has the short version.

The headline numbers. Each one is explained below, with how it was measured.
How SystemChart keeps history
Each recording tick reads about 170 series: processor and graphics load, clocks and temperatures, memory, every drive and network adapter, power estimates and, every few seconds, the processes behind them. The history lives in a SQLite database on your PC, in two tiers:
- Recent readings, roughly the last twenty minutes, are plain rows: one per reading, cheap to add and easy to correct if a reading arrives late.
- Packed chunks hold everything older: one chunk per series for every five minutes. Packing runs every five minutes and has been lossless since 0.5.0, so old history keeps its original detail instead of being averaged away.
A table row costs about 19 bytes: a header, a pointer, a key and the reading. A packed reading costs about 3. Each timestamp is stored as its distance from the second it was expected on, which is almost always a small number. Each value is stored as its change from the reading before, which is usually small. Both go through zigzag encoding, so a fall costs the same as a rise, and then into variable-length integers, so small numbers take one byte. Each chunk also keeps its count, sum, minimum and maximum beside the packed bytes, so a chart covering months can be drawn from those columns without unpacking anything.

An illustration with made-up readings. The byte counts per reading come from SystemChart's storage audit.
On the developer's own PC in September, that came to about 100 million readings in 532 MB, at about 2.9 bytes per packed reading, with the file growing about 16 MB a day.
Where the readings come from
Every reading comes from an interface that Windows or the graphics driver already provides. Nothing is injected into games, and nothing needs a driver of its own except the optional hardware sensors.
- Processor and processes: NtQuerySystemInformation returns every core's times in one call and every running process in another. The Processor Information counters add utility, performance and firmware limits.
- Graphics: the GPU Engine and GPU Adapter Memory counters that Task Manager uses, plus NVIDIA's NVML on NVIDIA cards for temperature, power, fan and clocks.
- Memory, drives and network: GlobalMemoryStatusEx, one PhysicalDisk counter query for every drive, and GetIfTable2 for every network adapter in a single call.
- Frame rates: PresentMon, which reads Windows' own event tracing. It runs only while a game SystemChart recognises is open.
- Black Box: the Windows System and Application logs, read by provider and event ID.
- Which apps use the network: Windows' own event tracing of socket traffic, only while the Network page is open.
- Drivers: Windows' device configuration interface, the one Device Manager uses, only when the Drivers page asks.

Costs are the recorder's own timings on the developer's PC.
The recorder also decides how often to read. It ticks once a second while a game runs or the processor is at least 25% busy, and for 30 seconds after; the rest of the time it ticks every five seconds. Walking every process and its threads costs 8 to 12 ms, against about 0.35 ms for the rest of the processor readings, so the walk runs at most every 4 seconds while idle, which is every tick, and every 8 seconds while the PC is busy.

The recorder's real scheduling rules, replayed over three minutes of made-up load.
Put together, the whole recorder is cheap to run. On 27 September the 0.9.48 recorder on the developer's PC, which has 24 processor threads, used 573 seconds of processor time in 5 hours 44 minutes. SystemChart was open, a game ran for part of the day, and the PC spent the rest of it building and testing software, which kept the recorder on its one-second rhythm. That is about 2.8% of one thread, or about 0.12% of the whole processor. In the busiest 37 minutes, with builds and browser tests running back to back, it was 3.7% of one thread, or 0.15%.
A megabyte for every three kilobytes
Measuring the recorder turned up a problem that had nothing to do with the size of the file. Over 3.5 hours, the recorder on the same PC wrote 6.84 GB. That counter also includes network sends, so the true disk figure is lower, but it was far too much for a few kilobytes of readings a second.
The cause was the shape of the recent-readings table. It was keyed by series first, then time. SQLite keeps a table in key order on fixed-size pages, 4 KB each here, so every series had pages of its own. One tick adds a reading to each of about 170 series, so it changed about 170 different pages. SQLite writes every changed page in full, and twice: once into its write-ahead log when the tick commits, and again into the database file at the next checkpoint. About 3 KB of readings cost about 1 MB of writes.

An illustration: each square is a page. Keyed by series, one tick changes a page for every series. Keyed by time, the whole tick lands on the few pages at the end of the table.
Filing readings by time
The new layout, schema 7, keeps recent readings in a table keyed by a ten-second time bucket first, then series, then time. Everything recorded in the same ten seconds sits together, so a tick lands on the handful of pages at the end of the table. Reading one series back seeks once per bucket, about 120 seeks for twenty minutes, however many other series share those buckets.
Before writing any of it, we simulated four layouts. Filing by time wrote 58 KB a tick against about 1 MB. Larger 8 KB pages made the old layout worse, 72% more writes, but with time buckets they cost only 6% more writes and rebuilt history 32% smaller.

Simulated before building, then measured on the real store code. A unit test now fails the build if a tick writes more than 12 pages.
Then we measured the real store code with a repeatable benchmark: 176 series recorded once a second, packing every 300 ticks as the recorder does, a 30-minute warm-up and then an hour of measured ticks.
| Per recording tick | 0.9.45 | 0.9.46 | Change |
|---|---|---|---|
| Data written | 1,007.6 KiB | 74.0 KiB | 92.7% less |
| Write operations | 453 | 16.8 | 96% fewer |
| Processor time in storage | 1.99 ms | 0.34 ms | 83% less |
| Time taken | 3.52 ms | 0.39 ms | 89% less |
Remember the cadence above: a real day ticks once a second only while the PC is busy, so it writes much less than the benchmark's one tick a second.
Two smaller changes went in beside it. New history files use 8 KB pages: at 4 KB, any packed chunk over about 1 KB spilled onto an overflow page that was mostly empty, which was 35% of the audited file. In the benchmark, a new file was about 37% smaller after 1.5 hours. And the write-ahead log is now capped at 16 MiB. SQLite reuses that file rather than shrinking it, so one large write used to leave its peak size on disk, 36.7 MB in the audit, until the next restart.
The first attempt made some reads slower
Buckets have a cost: reading one series now means one seek per ten seconds. In the benchmark, twenty minutes of one series went from 0.556 ms to 0.684 ms, a trade we accepted for the writes.
Then our automated persona tests started running slowly, and the recorder's log showed the composition chart's request taking 7.7 s and the applications list 3.4 s. We timed three builds on a copy of a five-week, 645 MB history: 0.9.45 as shipped, the first cut of schema 7, and the fix. The first cut had made the applications list slower, 305 ms to 420 ms, and on a brand-new history it doubled, 60 ms to 118 ms. Digging in found two problems: one as old as the packed chunks, and one the new layout made worse.
Chunk reads had no lower bound. A read asked for every chunk that started before the end of the range and finished after its start. Chunks are keyed by series and start time, so the database found the series' very first chunk and walked forward through every chunk since. Ten minutes of a five-week-old series walked 5,476 chunks and took 9.08 ms. The fix comes from the format itself: packing groups readings by the five minutes they fall in, so a chunk holding anything at or after the start of a range cannot have started more than 299 seconds before it. With that bound the same read takes 0.04 ms.

An illustration of the read. The chunk count and timings are the measured ones.
The applications list asked about every process ever seen. It worked out the first and last second of every process series from their chunks, and the first cut walked the ten-second buckets twice for each one, once to count and once to read, even for a process last seen a month ago. Now a series' first and last packed seconds are the two ends of its chunk key, two seeks. The store also keeps a small index of each series' first and last recent second. The index may be wider than the real rows but never narrower, so it can cause extra work but can never hide a reading. A series with nothing recent is skipped.

Medians of 15 runs on a private copy of one PC's five-week history. All three builds returned identical results.
Every call returned bit-identical answers across the three builds, checked by a checksum over every point. Eight deliberate mistakes, such as the bound off by one or a delete that keeps a stale index entry, each fail at least one test. We also fixed a small display bug on the way: a late reading for a second that was already packed came back after the newest one, so a chart could draw a line back to it. Reads now merge packed and recent readings in time order.
Counting without counting
The storage figures SystemChart shows, such as readings held, the newest packed second and bytes per day, were each a query over every chunk. They ran when the history opened and again after every five-minute packing, under the same lock recording ticks take, and they grew with the history. The totals are now counted once and kept up to date by everything that changes chunks: packing adds, a merge replaces, trims subtract, and deletes count again.
| On a 534 MB history | Before | Now |
|---|---|---|
| Readings held | 317 ms | kept up to date |
| Bytes stored | 336 ms | kept up to date |
| Newest packed second | 317 ms | 7.1 ms |
| Last day's bytes | 731 ms | 31.7 ms |
| Opening the history | 1.9 to 2.2 s | 0.39 to 0.41 s |
| Figures after each packing | 1.9 to 2.1 s | 32 to 34 ms |
A test checks that the kept totals equal a fresh count after every kind of change. Leaving out any one of the updates fails it.
Keeping a rollback safe
If a Steam update ever has to be rolled back, the previous build must still run on a history the new one has already converted. The previous build expects the old recent-readings table and cannot start without it, so schema 7 leaves that table in place, in its exact old shape and empty. After a rollback, the older build records into it. It cannot see up to about the last 25 minutes the newer build recorded, but those readings are kept, and when the newer build returns it moves the older build's readings across beside them.
We checked this end to end on a scratch history: the new build recorded, the previous build started on the converted file and recorded, and the new build then moved those 633 rows at startup and returned all 12 readings of the test, with the integrity check passing. Converting a copy of the 531.7 MB audited history took 1.06 s on first start.
The Black Box, reading Windows' logs cheaply
0.9.47 adds a Black Box tab: unexpected restarts, stop errors, graphics driver resets, app crashes and hangs, and disk and hardware errors, each shown with the readings from the minutes before it. Windows already records these in its System and Application logs, so the recorder reads them instead of guessing.
Event logs can be large, and the first version was too slow: it searched up to 120 days of both logs on every request. The shipped version reads them once in the background after startup, below normal priority, asking the log service only for the event sources and IDs it understands. After that it remembers the newest record it has seen in each log and asks only for newer ones. Before asking, it checks each log's record count and last write time, which costs almost nothing, and skips the query when nothing has changed. If a log is cleared or wraps, the record numbers go backwards, and it reads again. It checks at most every 45 seconds, and only while something is asking.
| Black Box on the developer's PC | Median |
|---|---|
| First read, 546 matching records | 209 ms |
| Checking for changes, nothing new | 3.3 ms |
| Reading the newest 100 records of each log again | 103 ms |
| Answering the tab from 2,000 incidents in memory | 0.014 ms |
Medians of 5 warm runs for the first read, 20 for checks, 10 for the newest records and 10,000 for answers, read by an ordinary (not administrator) process.
Readings that run only while you look
0.9.49 adds two readings that would cost too much to keep running all day, so each starts only when a page asks for it.
- Which apps use the network. Windows' adapter counters say how much traffic there is, not whose it is. When the Network page opens, the recorder starts a Windows event trace of socket traffic, and it stops the trace a minute after the page closes, so nothing is traced the rest of the time. Each datagram is counted by its own address, so traffic between programs on the same PC is left out, and the per-app figures are checked against the adapter's own total. The trace needs the same Windows permission as frame-rate capture; without it, the page counts each app's open connections instead and says so. While the page was open, the trace cost the recorder about 0.5% of one thread on a quiet connection and about 1.4% during a steady 40 MiB/s download, plus 4 to 7 MB of memory, on the developer's PC.
- Drivers. The Drivers page reads every present device from Windows' device configuration interface, the one Device Manager uses, when the page opens or you press Refresh, and keeps the result for ten minutes. On the developer's PC that is 283 devices in under half a second.
The window's share
The recorder is not the only part of SystemChart that works while you watch. The window that draws the charts has costs of its own, and in 0.9.49 it asks for less and draws less.
What the window asks for costs the recorder too. With System overview open, the 0.9.48 window read about 875 KiB a second from the recorder, because every chart that follows the present read its whole range again every two seconds to add the newest readings. In 0.9.49 each chart asks only for what is new and reads its whole range again every 30 seconds, reads asked at the same moment share one answer, and the applications list skips apps that did not run in its range. With that page open, traffic fell to about 205 KiB a second and the recorder's processor time from 4.5% to 3.6% of one thread.
Drawing is the window's own work, and three changes cut it:
- Steps too small to see. In Flowing, a chart showing a long range creeps a few hundredths of a pixel a frame, yet every chart was redrawn on every frame. A frame that would move a chart by less than a quarter of a pixel is now skipped. Short ranges and timeframe changes still move on every frame.
- Glows that were repainted. The Analyse button's breathing and the Pro badge's glow animated a shadow, which the page had to repaint on every frame, on every page. Each now fades in a layer that already holds the shadow, which the graphics compositor does on its own, and they look the same as before.
- Decorations that woke the page. Endless decorations, such as the live rating's dot and the market tape, were CSS animations, and every lap of one woke the page for a burst of frames. The live dot alone caused about 7 frames a second. They now run as script animations on the compositor. Each starts once it is drawn, pauses off screen and while the window is hidden, and stops when Motion is set to None. Before, Motion set to None did not stop them.
With Hardware overview open on the developer's PC, the window's own work fell to about half in Flowing and to under a quarter in Standard. The new machine map follows the same rules: its moving light is drawn by the compositor, pauses when the map cannot be seen, and keeps still when Motion is set to None. In a test harness slowed to stand in for a common processor, with a 240 Hz display, the map's animation takes under 2% of one core while it is on screen.

Before and after each change, measured on the developer's PC.
Six weeks of recorder work
The storage work is the latest step in a longer run of work on what the recorder costs.

Dates from the project history. Versions are shown where a milestone shipped in one.
- Each tick is written in one transaction. Committing each group of sensors separately, seven commits a second, once turned about 2 KB of readings into about 35 KB of disk traffic.
- Network counters were read one adapter at a time, which took 7,538 microseconds of an 8,858 microsecond tick. On 29 August they moved to one query for every adapter, and minutes later to GetIfTable2, one Windows table that holds them all.
- On NVIDIA cards, the two graphics bus traffic counters take 61.8 ms together, against 276 microseconds for every other reading on the card. Read every second, they were 97% of everything the recorder did, so they are now read every 30 seconds. Between reads the chart shows nothing rather than repeating an old value.
- Since 1 September the sampling loop has a thread of its own, running below normal priority, so your games and apps come first.
- On 27 September the window stopped rereading every chart's whole range every two seconds. It now asks only for what is new, under a quarter of the traffic.
What we chose not to do
- A custom log file beside the database. It would write less again, but it is a second format to recover, pack and keep consistent. Filing by time made it unnecessary.
- Rewriting existing files to 8 KB pages. That needs a full rewrite of the file, about as much free space again, and the recorder stopped while it runs. Existing histories get the new layout and keep 4 KB pages. New ones get both.
- Guarding the very last seconds. If the PC loses power or Windows crashes, the last few commits can be lost. That is acceptable for charts. The Black Box relies on Windows' own crash records, which survive the crash, and shows the readings from before it; keeping the final seconds on disk as well is still on the list.
Keeping the tests quick
Every change above ran through the full test suite on each commit. On GitHub's hosted runners the storage tests took 747 s, against about 73 s for the whole suite on a desktop, because the runners keep temporary files on a slow disk. Pointing temporary files at the runners' fast disk took the native test job from 18 to 19 minutes down to about 5.4. The recorder now also notes any request that holds it for a second or more, by route only, in the redacted diagnostic log. That will show whether a second serving lane is worth adding.
What is available today?
SystemChart remains Coming Soon on Steam. Everything in this post is in the current developer/review preview, 0.9.51-steam-beta.1, Steam build 25616454, through the existing Steam access. It is not a public application launch, and Pro DLC is not currently available on Steam.
Wishlist SystemChart on Steam · Read the preview history · Get help or send feedback
The figures in this post come from SystemChart's own benchmarks, from copies of one PC's history and from tests on the developer's PC. They describe what SystemChart itself costs, not game performance or frame rates.
