What a loaded account holds of its blobs (crates/pds-server/src/blobs.rs, Blobs: each blob held, how many records reference each, each record with blob refs) is kept whole in memory, and whole in the one S entry of the account's table (checkpoint.rs, Small), which every cold load and every compaction decodes and encodes whole.
What it costs
Some hundreds of bytes a blob, in memory and in S: an account with 50000 blobs holds on the order of 10 MiB of it once loaded, more than a store's share of a small cache, and decodes that much on its first request after a start. Not measured; from the types. spec/STORE.md's memory rule and its second for a cold account's first request hold "whatever the account holds".
It is bounded, unlike a space repo's records, which is why it was left when those moved to sections of the table: by the blob quota (PDS_BLOB_QUOTA_BYTES, 1 GiB) over the size of a blob, and with rate limits on by 1000 uploads a day.
What would fix it
The same as the tree's blocks and the space repos' records: the blobs held and the records with refs as sections of the table read by point and in order, what the log changed of them kept as where it is, and the sums (bytes held, counts) as running totals. listBlobs with since walks every record with refs for each page today, and would become a scan.
What would check it
The scale run's account that holds much besides its repository, with 50000 blobs in place of 4000.
What a loaded account holds of its blobs (
crates/pds-server/src/blobs.rs,Blobs: each blob held, how many records reference each, each record with blob refs) is kept whole in memory, and whole in the oneSentry of the account's table (checkpoint.rs,Small), which every cold load and every compaction decodes and encodes whole.What it costs
Some hundreds of bytes a blob, in memory and in
S: an account with 50000 blobs holds on the order of 10 MiB of it once loaded, more than a store's share of a small cache, and decodes that much on its first request after a start. Not measured; from the types.spec/STORE.md's memory rule and its second for a cold account's first request hold "whatever the account holds".It is bounded, unlike a space repo's records, which is why it was left when those moved to sections of the table: by the blob quota (
PDS_BLOB_QUOTA_BYTES, 1 GiB) over the size of a blob, and with rate limits on by 1000 uploads a day.What would fix it
The same as the tree's blocks and the space repos' records: the blobs held and the records with refs as sections of the table read by point and in order, what the log changed of them kept as where it is, and the sums (bytes held, counts) as running totals.
listBlobswithsincewalks every record with refs for each page today, and would become a scan.What would check it
The scale run's account that holds much besides its repository, with 50000 blobs in place of 4000.