pds_store's open_log_with calls sync_all on the log it opens, and on each other log kept, every time (generations.rs), so the first request for an account after a start pays a sync: about 19 ms on the runner's disk, 5 to 13 on a Mac. A replay of the firehose from cursor 0 after a start loads each account in turn, so it pays one for each: about 35 ms an account on a busy Mac, and over a second for one account when the runner's disk was loaded (which is how the metrics check's quiet second failed).
The store benchmark's "first read of an account not yet open" row (66 µs) opens the table alone and does not show this.
Why it syncs
After a kill, frames written but never synced are still in the file. Nothing read from them may be relied on, served, or built on by another file, until they are durable: so they are synced before the log is used.
What might be done
After a shutdown every log was synced as it was closed. A start that knows the last one shut down (as it knows for the firehose's index: no event numbered since it was written) could open logs without the sync, and keep it for a start after a kill. To measure first: the first request for an account after a shutdown and after a kill, on the runner; and a cursor-0 replay over many cold accounts.
pds_store'sopen_log_withcallssync_allon the log it opens, and on each other log kept, every time (generations.rs), so the first request for an account after a start pays a sync: about 19 ms on the runner's disk, 5 to 13 on a Mac. A replay of the firehose from cursor 0 after a start loads each account in turn, so it pays one for each: about 35 ms an account on a busy Mac, and over a second for one account when the runner's disk was loaded (which is how the metrics check's quiet second failed).The store benchmark's "first read of an account not yet open" row (66 µs) opens the table alone and does not show this.
Why it syncs
After a kill, frames written but never synced are still in the file. Nothing read from them may be relied on, served, or built on by another file, until they are durable: so they are synced before the log is used.
What might be done
After a shutdown every log was synced as it was closed. A start that knows the last one shut down (as it knows for the firehose's index: no event numbered since it was written) could open logs without the sync, and keep it for a start after a kill. To measure first: the first request for an account after a shutdown and after a kill, on the runner; and a cursor-0 replay over many cold accounts.