el
effective-limits
cargo install effective-limits
el

effective-limits

Estimate effective resource limits for a process e.g. how much RAM is available for use

by Robert Collins

0.5.2 (see all)License:Apache-2.0
cargo install effective-limits
Readme

Estimate effective resource limits for a process

effective-limits is a mid-level API for determining the effective limits upon a process. It combines e.g. mem_info and getrlimit.

The goal is to have a good chance of avoiding failed allocations without requiring either developer or user a-priori selection of memory limits. That is, how much memory is effectively available for this process to use, considering the physical machine and ulimits, but not the impact of noisy neighbours, swappiness and so on. This limit can then be used to inform the size of in memory caches, put a threshold on in or output file buffers and so on.

#![warn(clippy::all)]

extern crate effective_limits;

fn main() -> effective_limits::Result<()> {
    println!("Effective mem limit: {}", effective_limits::memory_limit()?);
    Ok(())
}

GitHub Stars

10

LAST COMMIT

1yr ago

MAINTAINERS

1

CONTRIBUTORS

6

OPEN ISSUES

1

OPEN PRs

0
VersionTagPublished
0.5.2
2yrs ago
0.5.1
2yrs ago
0.5.0
2yrs ago
0.4.0
2yrs ago
No alternatives found
No tutorials found
Add a tutorial