Dear Dr. Hipp & list,

What about making Sqlite's memory mapping adapt to the current database
size, in increments of say 100MB?

The at least 48 bits (256TB) of addressing space that modern 64bit
architectures give per process is not suffering any risk of depletion, as
long as the space not is used wastefully, which would be the case now as
today in the absence of an incremental setting, to guarantee that a
database never will grow outside of the mmap size, a developer is tempted
to set mmap_size to a value so high that it guaranteedly never will be
reached e.g. 1TB, and that way an application could be almost 100% wasteful
with address space, and that way a process would get a constraint of max
200 or so databases.

Can Sqlite user code implement this by itself already somehow?

This would also be useful to do memorymapped-only IO on an OS that not has
a unified buffer cache, such as OpenBSD, where memory mapping is disabled
altogether for this reason currently.

Looking forward to your response,

Thanks,
Mikael

Reply via email to