two reasons:
- Convex adds
_id and _creationTime fields to each document, so it's not just the raw json you're storing
- Document sizes are rounded up to the nearest kilobyte https://docs.convex.dev/production/state/limits#database
the reason for (1) is to access your documents via db.get you need a unique id field and to query documents in the default order they need a creation time field.
The reason for (2) is that there is some per-document overhead within Convex, e.g. when reading a small document you often need to do IO for an entire 4kb page of SSD storage. However, we're rethinking this policy internally and may remove the rounding soon.
basically, the accounting policy is trying to be honest about how expensive small documents are, and incentivize good patterns. But also look forward to changes here soon 😊