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

Calculation of freePhysicalMemorySize does not currently take disk cache into account #150

Closed
robsyme opened this issue May 10, 2016 · 0 comments
Milestone

Comments

@robsyme
Copy link
Collaborator

robsyme commented May 10, 2016

Linux can sometimes utilise unused RAM as disk cache. This RAM is freed immediately if any other application requests it. At the moment, Nextflow calculates how much RAM is available by calling

ManagementFactory.getOperatingSystemMXBean().freePhysicalMemorySize

Unfortunately, this freePhysicalMemorySize calculation by the OperatingSystemMXBean includes RAM being used for disk cache, even though the OS is very happy to give this RAM up at a moment's notice. The result is that a system that has recently moved a bunch of files into cache will not accept new jobs, thinking that there is no ram available.

It would be great if the freeMemory calculation also included RAM being used for disk space, as it really is available to nextflow for jobs.

A quick-and-dirty workaround is to manually empty the cache. As root:

# sync && echo 3 > /proc/sys/vm/drop_caches
pditommaso added a commit that referenced this issue May 10, 2016
pditommaso added a commit that referenced this issue May 10, 2016
@pditommaso pditommaso added this to the v0.19.0 milestone May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants