Skip to main content

Under the hood

How the Spare Cores Navigator collects its data and publishes it, and the components doing it. For the data itself and the ways to access it, see Data. For the methods behind the data, e.g. the benchmarks, explained in conference talks with recordings and slides, see the talks⁠ (opens in a new tab) on sparecores.com.

Components​

The Navigator consists of several well-scoped, interconnected components:

ComponentSource licenseReferencesDescription
RunnerMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Pulumi wrapper to launch instances across clouds.
ImagesMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Container images for hardware discovery and benchmark workloads.
InspectorMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossaryPython tools to inspect and benchmark cloud servers.
Inspector DataCC BY-SA 4.0CC BY-SA 4.0: Creative Commons Attribution-ShareAlike 4.0The open license of the data the Navigator collects, such as the Crawler Data and the Inspector Data. Anyone may copy, share and adapt the data, also commercially, if they credit Spare Cores, indicate their changes, and share their adaptations under the same license.Spare Cores licenseCreative Commons summaryGlossaryRaw hardware information and benchmark results.
CrawlerMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Cloud vendor APIAPI: Application Programming InterfaceA defined set of requests and responses through which one program uses another, such as a web service's HTTP endpoints or a library's functions.WikipediaGlossary and Inspector Data integrations.
Crawler DataCC BY-SA 4.0CC BY-SA 4.0: Creative Commons Attribution-ShareAlike 4.0The open license of the data the Navigator collects, such as the Crawler Data and the Inspector Data. Anyone may copy, share and adapt the data, also commercially, if they credit Spare Cores, indicate their changes, and share their adaptations under the same license.Spare Cores licenseCreative Commons summaryGlossaryJSONJSON: JavaScript Object NotationA text format for structured data, built from objects (key-value pairs), arrays, strings, numbers, booleans, and null. Most languages and tools read and write it, which makes it a common format for API responses and benchmark output.JSONGlossary dumps of collected cloud resource information.
DatabaseBSL 1.1BSL 1.1: Business Source License 1.1The source-available license of the Navigator's Database snapshots. Anyone may copy, modify and redistribute them, and use them outside production. Production use is free for academic research and for organizations with less than USD 1 million in annual revenue that don't build a competing cloud data, benchmarking or price-comparison service; other production use needs a commercial license. Three years after its publication, each snapshot is also available under CC BY-SA 4.0.Spare Cores licenseMariaDB FAQGlossary SQLite database dump of current cloud resource information.
Data WrapperMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Python package for easy integration of the Database.
HTTP APIMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Programmatic access to the Database.
Web UIMPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary Web frontend for human access to the Database.

To make the Spare Cores Navigator available to the community, our software components are licensed under MPL 2.0MPL 2.0: Mozilla Public License 2.0The open-source license of the Navigator's software components. Anyone may use, modify and distribute the code, also commercially and combined with closed-source code, but changes to the licensed files must be published under the same license.Spare Cores licenseMozilla FAQGlossary and all raw collected data under CC BY-SA 4.0CC BY-SA 4.0: Creative Commons Attribution-ShareAlike 4.0The open license of the data the Navigator collects, such as the Crawler Data and the Inspector Data. Anyone may copy, share and adapt the data, also commercially, if they credit Spare Cores, indicate their changes, and share their adaptations under the same license.Spare Cores licenseCreative Commons summaryGlossary. For deep production integrations and enterprise reliability, we offer commercial API and database access, expert support, and consulting services.

How it works​

  1. The Crawler pulls the products (SKUsSKU: Stock Keeping UnitAn identifier of a product a vendor sells, e.g. a server type, or a component that its price is built from, such as a vCPU or a GB of memory in a region. Cloud vendors' price lists are made of SKUs, which the Crawler combines into the price of each server type.Glossary) and prices of the supported cloud vendors from their APIs, enriches with manually curated mappings, standardizes them, and publishes them as JSON dumps and as an SQLite database. See the Crawler docs, and the Schemas section for the structure of the database.
  2. The Inspector selects the servers to be inspected based on the database, any task blocking reason codes, and previous runs, and starts them with the Runner, and runs hardware discovery and benchmark tasks on each, collecting the raw results. The tasks run the container images described in the Images section.
  3. The Crawler parses the inspection results into the database, so that the hardware details and benchmark scores are stored along with the prices.
  4. The database is available as a file download and via the Data Wrapper Python package (see SQLite), via the HTTPHTTP: Hypertext Transfer ProtocolThe request-response protocol of the web, in which a client asks a server for a resource by URL and gets back a status code, headers, and a body. HTTPS is HTTP over an encrypted connection.MDNGlossary API (see the API docs), and on the Web UI at sparecores.com⁠ (opens in a new tab) (see its user guide).

Standardizing the vendors' data​

The vendors' APIs and catalogs differ in what they list, how, and how completely, so the Crawler and the Inspector don't just copy them:

  • Prices: few vendors list one price per server type. Google Cloud, for example, prices most server types by their 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 and memory, as SKUs whose descriptions name the server family, with exceptions, e.g. its C2 family is "Compute optimized", and M2 is priced as a premium on top of M1. The Crawler matches these into one price per server type, regionregionA geographic area where a cloud vendor runs its data centers, such as Frankfurt or Northern Virginia, made up of one or more availability zones. A server type is offered in some regions only, and its price can differ by region; a region's ID, such as eu-central-1, is unique only within its vendor.Glossary, zone and allocation.
  • Specs: what the vendors' APIs don't list, the Crawler takes from their docs or from hand-written mappings.
  • Inspection: the Inspector reads the hardware of each server directly, e.g. with dmidecodedmidecodeA command-line tool that reads a computer's SMBIOS tables and prints them in a human-readable form, one block per SMBIOS structure, such as the system's manufacturer and model, its processors, and its memory devices. It usually needs root privileges to read the tables. Its options select structure types, or single values such as the system's serial number.dmidecodeGlossary, lscpulscpuA Linux command of util-linux that reports the CPU architecture of a system, such as the CPU model, the number of sockets, cores, and threads, the cache sizes, and the NUMA nodes. It can print a table or JSON.man pageGlossary, lstopo and lshw, which fills in or corrects specs such as the number of cores, the CPU cachesCPU cacheSmall, fast memory inside a CPU that holds copies of recently used data, so that most accesses avoid the slower RAM. Server CPUs have three levels, each larger and slower than the one before. The L1 cache is split into a data cache (L1d) and an instruction cache (L1i) and belongs to one core, as the L2 cache usually does, while the L3 cache is shared by the cores of a socket, a die, or a group of cores.WikipediaGlossary, or the memory actually available. Specs that neither the vendor nor the inspection provides stay empty (see Data).

The raw outputs of every inspection, with their stdoutstdoutThe standard output stream of a process, one of the three standard streams with stdin and stderr. Programs write their results to it; a shell can redirect it to a file or another program, such as > results.jsonl, while logs on stderr still reach the terminal.WikipediaGlossary, stderrstderrThe standard error stream of a process, one of the three standard streams with stdin and stdout. Programs write logs, progress, and error messages to it, so that they stay separate from the output on stdout when the output is redirected to a file or another program.WikipediaGlossary and metadata, are public in sc-inspector-data⁠ (opens in a new tab), so that any spec or score can be checked against what was measured.