-
Notifications
You must be signed in to change notification settings - Fork 19
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
MMAP makes machine swap a lot #383
Comments
The first solution that can help here is related to dynamically allocating memory mapped files using NtCreateSection APIs. This will reduce the size of the memory mapped files to be written to disk and saving a lot of RAM. Secondly, during imports, we can try writing calling FlushViewOfFile and FlushFileBuffers after every 10 MB (size-wise) or 5 seconds (duration-wise) instead of doing it all at the end. Let me know what you think. |
This could be issue that happens only when there's no |
@damian-orzechowski reports that occasional |
@Scooletz Can we try this? You can create an issue or a lot of sub-issues for this maybe. And I will try to work part-by-part to remove dependency on mmap and use fsync, read, write instead. |
On
Windows
, memory mapped file occasionally makes a computer swap a lot and makes Paprika behave terribly ppor. With a lot of memory committed, when the size of the mmaped region breaches the space on system disk, it starts to stall. Investigate this behavior and provide a way to fix it. This happens in a scenario of an import where mmaped file is used without any write or flushes andFlushViewOfAFile
is called only at the end to be followed byFlushFileBuffers
. Still, according to my understanding system should flush what is needed on it's own so that the swap is not affected.The text was updated successfully, but these errors were encountered: