← All procedures
algebra.memcgSleepBounds
This function gives two usages above `high` for a debt of `debt` pages. The first is the lowest usage that gives a sleep. The second is the lowest usage whose sleep is the cap of 2 s. The sleep does not go down as the usage goes up, thus a search finds each bound. Take a high of 25,600 pages (100 MiB), HZ 1000 and a debt of 64. The sleep starts at 25,936 pages (1.3% over), and the cap starts at 30,126 (17.7% over).
CLI- Package
- @procedures/algebra · README
- Path
["algebra","memcgSleepBounds"]- CLI
mark algebra memcgSleepBounds --high <number> --debt <number> --hz <number>- As data
{"$proc":["algebra","memcgSleepBounds"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/algebra/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["algebra","memcgSleepBounds"], { high: 1, debt: 1, hz: 1 });
console.log(JSON.stringify(result));From the command line
$ mark algebra memcgSleepBounds --high <number> --debt <number> --hz <number>
As data, in a program
{
"$proc": ["algebra", "memcgSleepBounds"],
"input": { "high": 1, "debt": 1, "hz": 1 }
}Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"high": {
"type": "number"
},
"debt": {
"type": "number"
},
"hz": {
"type": "number"
}
},
"required": [
"high",
"debt",
"hz"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"first": {
"type": "number"
},
"capped": {
"type": "number"
}
},
"required": [
"first",
"capped"
],
"additionalProperties": {}
}
}