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 cache size #23

Merged
merged 6 commits into from
Oct 17, 2019
Merged

Conversation

davidklaftenegger
Copy link
Member

@davidklaftenegger davidklaftenegger commented Oct 2, 2019

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.

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.
SakalisC
SakalisC previously approved these changes Oct 4, 2019
Copy link
Contributor

@SakalisC SakalisC left a 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.

src/argo.h Show resolved Hide resolved
src/argo.hpp Show resolved Hide resolved
Copy link
Collaborator

@pekemark pekemark left a 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.

src/backend/singlenode/singlenode.cpp Show resolved Hide resolved
davidklaftenegger and others added 4 commits October 4, 2019 14:55
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>
@davidklaftenegger davidklaftenegger merged commit 7d2d3c7 into etascale:master Oct 17, 2019
@github-pages github-pages bot temporarily deployed to github-pages October 17, 2019 13:04 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants