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

Limit memory usage #114

Open
andreasnoack opened this issue Dec 27, 2017 · 3 comments
Open

Limit memory usage #114

andreasnoack opened this issue Dec 27, 2017 · 3 comments

Comments

@andreasnoack
Copy link
Member

I believe that current default is to use most of the available memory on a machine because it gives better performance. However, for various reasons, you might want to use less. E.g. you are sharing the machine with other users so allocating all physical memory is not good social behavior.

@shashi
Copy link
Collaborator

shashi commented Dec 27, 2017

If you're using a mostly memory-mappable dataset (e.g. very few string fields, mostly numeric or PooledArrays), then the memory usage you are seeing is virtual memory. The OS will take care of evicting pages from memory as and when other users require it.

Will be working with Tanmay to do this at the JuliaDB level soon. MemPool already has this feature, however, we need to fix JuliaData/MemPool.jl#2 and flip the switch.

@StefanKarpinski
Copy link
Member

The OS will take care of evicting pages from memory as and when other users require it.

My impression is that in practice this does not work that well so it may well be worth having better application-level support for memory limiting instead of relying on OS virtual memory swapping.

@shashi
Copy link
Collaborator

shashi commented Dec 27, 2017

instead of relying on OS virtual memory swapping.

Agree, swapping is not good. However, in the specific case I described (with mmapped data) we are not relying on the OS to swap pages as in write them to disk. We just have a lot of memory mapped data, but use it little by little. OS just needs to remove some stuff that was not used recently. In my experiments so far linux is doing this pretty well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants