Skip to content

Pick a default resource table size - #3802

Open
itowlson wants to merge 1 commit into
spinframework:mainfrom
itowlson:rationalise-resource-table-sizes
Open

itowlson wants to merge 1 commit into
spinframework:mainfrom
itowlson:rationalise-resource-table-sizes

Conversation

@itowlson

Copy link
Copy Markdown
Contributor

We currently have different resource table sizes for different factors:

  • Key-value: u32::MAX
  • MQTT: 1024
  • Redis: 1024
  • SQLite: 256

There is also a "default" size in Table::default, which is used by PostgreSQL and MySQL: this is 1024.

Which would be all well and good if these had been chosen to be different with specific intent, but... I am not sure that's what happened. From what I can tell - and I apologise if I am overlooking anyone's thought process - these numbers were picked separately at different times by different people who just had different senses of "a number that seems reasonable."

This PR proposes to consolidate on the 1024 value (which was Ryan's "number that seems reasonable", and he seems like a level-headed sort of chap). In principle I could probably shift everything over to Table::default() and remove the new const, but we maybe want to leave it open for configuration...?

The main risk is KV, as that's the factor receiving a reduction. Everything else stays the same or gets bigger. Does anyone recall if the u32::MAX was driven by a particular requirement? (cc @kate-goldenring) Do we foresee a risk to embedders from the proposed reduction? (And I guess do we see any risk of excess resource consumption from allowing so many SQLite DBs.)

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson
itowlson requested review from a team, kate-goldenring and rylev November 19, 2026 02:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant