Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce disk bloat on Windows #265

Open
Scooletz opened this issue Mar 1, 2024 · 4 comments
Open

Reduce disk bloat on Windows #265

Scooletz opened this issue Mar 1, 2024 · 4 comments
Labels
💾 disk size A change makes the disk size smaller good first issue Good for newcomers operating system OS related issue, that may require intrinsic knowledge of low level OS stuff

Comments

@Scooletz
Copy link
Contributor

Scooletz commented Mar 1, 2024

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

@Scooletz Scooletz added the 💾 disk size A change makes the disk size smaller label Mar 1, 2024
@Scooletz Scooletz added operating system OS related issue, that may require intrinsic knowledge of low level OS stuff good first issue Good for newcomers labels May 9, 2024
@ssonthal
Copy link
Contributor

ssonthal commented Sep 4, 2024

Hi @Scooletz, are we focusing on PagedDB block (which uses the memory-mapped files) here?

@Scooletz
Copy link
Contributor Author

Scooletz commented Sep 5, 2024

Yes sir! @shubham-sonthalia

@ssonthal
Copy link
Contributor

ssonthal commented Sep 5, 2024

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?

https://github.com/shubham-sonthalia/Paprika/blob/666f37225fa14e1adf0d6970f1d911aa8b7b1a49/src/Paprika/Store/PageManagers/MemoryMappedPageManager.cs#L44

image

@Scooletz
Copy link
Contributor Author

We could be dynamic, but dynamism can come with a price. If we map it separately, there will be different pointers for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 disk size A change makes the disk size smaller good first issue Good for newcomers operating system OS related issue, that may require intrinsic knowledge of low level OS stuff
Projects
Status: Todo
Development

No branches or pull requests

2 participants