~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A replay of the firehose's window reads each account's files: 28 thousand events a second where one log for all gives a million

Open
Open chadtmiller.com opened this issue 0 comments

Since at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/spec-pds/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.pull/3n25y34c2mxsq the firehose's first message after any start comes at once: which events were made, and whose, is in one index for all. An event's frame is still in its account's log or table, and a replay from a cursor reads each from there, an account at a time (events.rs, batch).

The store benchmark, the runner ("The firehose replayed"): a replay of every event from accounts' logs put in order, 28 thousand events a second; from one log for all with XXH3 as its check, 1.08 million; RocksDB, 1.01 million. A relay far behind, or a new one reading the whole window, is sent it 37 times slower than the disk could give it.

What it would take

The events' frames kept in the index's own log, or in one beside it, in order of seq, with what an account's log holds of an event then a reference to it or nothing; the window's trimming, and a deleted account's events, done there. The journal already holds every frame once more while it is not yet checkpointed: the frames' three copies (journal, account's log, event log) would want thinking of together.