Open Scooletz opened 8 months ago
Hi @Scooletz, are we focusing on PagedDB block (which uses the memory-mapped files) here?
Yes sir! @shubham-sonthalia
At the below line, we are initializing the memory mapped file. Do we have to come up with a way to divide the max_size of the Paprika DB into equal partitions (like 5 chunks) and start with 1/5th of the max DB space? or we want it to be dynamic?
We could be dynamic, but dynamism can come with a price. If we map it separately, there will be different pointers for example.
Use the section API NtCreateSectionFunc to reduce the disk size on Windows. For inspiration take a look at the usage in LMDB. Ensure that on Windows Paprika allocated only as much as needed, not the whole file upfront.
https://github.com/LMDB/lmdb/blob/b8e54b4c31378932b69f1298972de54a565185b1/libraries/liblmdb/mdb.c#L46-L77
One more from
https://devblogs.microsoft.com/oldnewthing/20150130-00/?p=44793