A sparse bitmap
Five thousand bits set across a million offsets, where a set is far smaller
highest-bit: 1000000 set-bits: 5000
Give the highest bit offset you will set and see what it costs. Redis strings are not sparse, so the highest offset decides the allocation whatever the density.
Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.
The answer appears here
Paste on the left and press Calculate. Nothing leaves this tab.
Nothing else to flag.
No formatting problems, and nothing the rules object to. Worth remembering what that covers: this reads the file you pasted, not the account or cluster it will be applied to.
No finding matches that filter.
Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.
Five thousand bits set across a million offsets, where a set is far smaller
highest-bit: 1000000 set-bits: 5000
One bitmap per day for a month, at a realistic density
highest-bit: 1000000 set-bits: 400000 keys: 30
These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.
The allocation is decided by the highest id, so one user with id 50 million costs 6 MB on its own.
Instead:Use a set below roughly 1 in 64 density, or remap ids to a dense range.
It allocates the whole string up to that offset in one go, which on a large offset is a noticeable pause on the main thread.
Instead:Pre-size deliberately, or avoid very large offsets.
It scans the whole string. On a 100 MB bitmap that blocks the server for the duration.
Instead:Use the range form, or keep a counter alongside.