Skip to main content

sc_crawler.inspector_rules

Rules for which servers and managed databases the Inspector runs its tasks on.

Functions:

  • has_related_database – Check if the server is the underlying server of any Database of the same Vendor.
  • is_credit_exempt – Check if the task should run on the resource despite exhausted cloud credits.
  • block_reasons – Check in a deterministic way if the resource should run the given inspector task(s).
has_related_database(server)

Check if the server is the underlying server of any Database of the same Vendor.

Parameters:

  • server (Server) – The server to look up in the server_id of the Vendor's Databases.

Returns:

func is_credit_exempt inspector_rules.py:79–98⁠ (opens in a new tab)​

is_credit_exempt(resource, task)

Check if the task should run on the resource despite exhausted cloud credits.

Parameters:

Returns:

func block_reasons inspector_rules.py:101–219⁠ (opens in a new tab)​

block_reasons(resource, tasks)

Check in a deterministic way if the resource should run the given inspector task(s).

Lists of inspector tasks defined at https://github.com/SpareCores/sc-inspector/blob/main/inspector/tasks.py⁠ (opens in a new tab)

A task doesn't run on a resource for any of these reasons:

  • All tasks:

    • Cloud credits or budget exhausted: Alibaba Cloud, Azure and GCP, except for a few explicitly exempted resources and tasks (see is_credit_exempt).
  • Managed databases:

    • Databases that can't be deployed on a single node.
  • Servers:

    • bw_membw_memThe memory bandwidth tool of LMbench. It moves data through a buffer of a given size in one of several modes, such as rd (read and sum an array), wr (write a constant to each element), rdwr (read, then write the same location), and the copy modes cp, fcp, and bcopy. It reports the buffer size in MB and the bandwidth in MB/s; with -P, it runs several processes, each with its own buffer, and reports their total bandwidth.`bw_mem` manualGlossary and membench: a few servers with identified performance issues while running this task.
    • nvidia_smi and nvbandwidthnvbandwidthAn open-source NVIDIA tool that measures memory copy bandwidth and latency between the CPU and NVIDIA GPUs, between GPUs, and within one GPU. It copies with the GPU's copy engines or with kernels on its streaming multiprocessors, and reports one matrix per test, with a row and a column for each CPU or GPU taking part. It prints plain text or JSON, and an optional multinode build measures GPUs across several servers.GitHubGlossary: servers without GPUs.
    • Not enough memory: membench needs 0.9 GB; compression_text, ffmpeg and llm 1 GB; vllm and pgbench_postgres_ro_durable 2 GB; geekbench 2.1 GB.
    • vllm: fewer than 2 vCPUsvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary (server and GuideLLMGuideLLMAn open-source tool of the vLLM project for evaluating LLM deployments. It sends synthetic or real requests to an inference server over an OpenAI-compatible HTTP API, at a fixed concurrency, a fixed request rate, or a sweep of rates, and measures latency and throughput, such as the time to first token and output tokens per second. It writes its results as JSON, CSV, or HTML reports.GuideLLM on GitHubGlossary contend for the single core; no successful measurements observed).
    • geekbench and passmark: more than 32 vCPUs, as they don't scale beyond that.
    • storage: no bundled storage.
    • stressnglongrun: explicit allowlist for a few small AWS, GCP and Hetzner CloudHetzner CloudThe cloud platform of Hetzner Online, a German hosting company founded in 1997. Launched in 2018, it offers VMs with shared or dedicated vCPUs on AMD64 or Arm64 CPUs, block storage, and networking, from data centers in Germany, Finland, the United States, and Singapore.Hetzner CloudGlossary server types.

Parameters:

Returns: