archivebox.services.resource_admission
Admission signals, not estimates of how much RAM an extractor will need.
Module Contents
Classes
Functions
Return zram block names and major:minor IDs known to sysfs. |
|
Identify a swap source by its visible name and, for block devices, ID. |
|
Sum free active swap except zram, whose capacity is already backed by RAM. |
|
Use only independently backed swap as extra capacity on Linux. |
Data
API
- archivebox.services.resource_admission.zram_swap_identifiers(sys_block: pathlib.Path = Path('/sys/block')) set[str][source]
Return zram block names and major:minor IDs known to sysfs.
- archivebox.services.resource_admission.swap_source_identifiers(filename: str) set[str][source]
Identify a swap source by its visible name and, for block devices, ID.
- archivebox.services.resource_admission.disk_backed_swap_free_bytes(swaps: str, zram_identifiers: set[str]) int[source]
Sum free active swap except zram, whose capacity is already backed by RAM.
- archivebox.services.resource_admission.host_swap_free_bytes(meminfo_swap_free: int) int[source]
Use only independently backed swap as extra capacity on Linux.
- class archivebox.services.resource_admission.ResourceAdmission[source]
Initialization
- static slots_for_headroom(configured: int, active: int, observed_cost: int, available: int) int[source]