![]() |
Mads
Multi-Agent Distributed System
|
#include <algorithm>#include <cerrno>#include <cstdint>#include <cstring>#include <fstream>#include <optional>#include <string>#include <sys/resource.h>#include <sys/time.h>Go to the source code of this file.
Classes | |
| struct | Mads::detail::FdLimits |
| struct | Mads::detail::FdLimitPlan |
| struct | Mads::detail::FdLimitOutcome |
| The result of acting on a plan. More... | |
Namespaces | |
| namespace | Mads |
| namespace | Mads::detail |
| namespace | Mads::detail::fd_limit_impl |
Functions | |
| uint64_t | Mads::detail::agent_capacity (uint64_t soft) |
| How many agents a given soft limit leaves room for. | |
| std::optional< uint64_t > | Mads::detail::fd_limit_impl::read_uint_file (const char *path) |
| Reads a single unsigned integer out of a /proc or /sys file. | |
| std::optional< uint64_t > | Mads::detail::fd_limit_impl::kernel_fd_ceiling () |
| FdLimits | Mads::detail::query_fd_limits () |
Reads the limits currently in force, with hard clamped as described above. | |
| std::string | Mads::detail::describe_fd_limits (const FdLimits &limits) |
| Renders e.g. "1024 soft / 1048576 hard, about 492 agents". | |
| std::string | Mads::detail::fd_limit_hint () |
| The hint appended to every message that reports a limit worth raising. | |
| FdLimitPlan | Mads::detail::plan_fd_limit (std::optional< int64_t > requested, const FdLimits &limits) |
| FdLimitOutcome | Mads::detail::apply_fd_limit (const FdLimitPlan &plan) |
| bool | Mads::detail::is_fd_exhaustion (int err) |
Variables | |
| constexpr uint64_t | Mads::detail::FD_PER_AGENT = 2 |
| constexpr uint64_t | Mads::detail::FD_BROKER_OVERHEAD = 64 |
| constexpr uint64_t | Mads::detail::FD_LOW_WATERMARK = 1024 |
| constexpr uint64_t | Mads::detail::FD_ABSOLUTE_CEILING = 1048576 |