-
Notifications
You must be signed in to change notification settings - Fork 22
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 cache size #23
Limit cache size #23
Conversation
initializing the backend in the global memory pool creates an unneccessary amount of coupling, which this patch removes
also make it possible to set the desired memory size for ArgoDSM using an environment variable, but prefer a parameter given to argo::init() for backwards compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see anything new from the previous PR, so I only have one minor comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I think needs a fix is the probably accidental removal of the signal handler installation in the singlenode backend.
The name "size" is too generic. Co-authored-by: David Klaftenegger <david.klaftenegger@it.uu.se> Co-authored-by: Magnus Norgren <magnusandersnorgren@gmail.com>
The cache size is exposed to a second parameter to argo::init() and argo_init(). Instead of setting the value explicitly, it can also be controlled through environment variable ARGO_CACHE_SIZE. If neither the parameter nor ARGO_CACHE_SIZE are set, then the default is a 1GB cache. Co-authored-by: David Klaftenegger <david.klaftenegger@it.uu.se> Co-authored-by: Magnus Norgren <magnusandersnorgren@gmail.com>
32bbf41
to
7d2d3c7
Compare
This PR supersedes #19, which I accidentally broke.
This patch contains several commits:
d5b1670 gives the responsibility of initialising everything to argo::init()
32cbb09 adds the option to use an environment variable to set the memory size used
3187658 only renames arguments from size to argo_size
f08ae31 limits the cache size to a value also optionally set through argo::init() or an environment variable
32bbf41 limits the cache size to the total memory size, if it is smaller than the requested memory size
The main changes in 3187658 and f08ae31 are taken from #14, but split into two commits for readability.
Note that this pull request does not contain all features from #14, as it only deals with commit
60e68ce.