Skip to main content

SQLite database

The whole database of the Spare Cores Navigator is available as a single SQLite file, to download and query with SQL: the servers, managed databases, storage and traffic of all vendors, with their prices and benchmark scores. The Schemas describe its tables and columns.

Get the database​

With the command line​

The Data Wrapper, the sparecores-data Python package, downloads the current version of the database (about 40 MB to download, 1.3 GB once imported):

pip install sparecores-data
sc-data download sc-data.db

Run sc-data download again to get a newer version.

In Python​

In Python, the package keeps a copy of the database up to date in its cache, checking for a newer version every 10 minutes in a background thread, and db.path gives its path. The Crawler (sparecores-crawler) defines the tables as SQLModel⁠ (opens in a new tab) classes, so that you can query them with SQLModel or SQLAlchemy, e.g. the cheapest on-demandon-demandA pricing model of cloud servers that charges for the time a server runs, without a commitment, typically per second or hour. The server runs until you stop it, unlike a spot instance, but it costs more than spot or reserved capacity.Glossary prices of server types with at least 8 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 32 GiB of memory:

pip install sparecores-data sparecores-crawler
from sc_data import db
from sc_crawler.tables import Server, ServerPrice
from sqlmodel import Session, create_engine, func, select

db.updated.wait() # the first run downloads the database
engine = create_engine(f"sqlite:///{db.path}")

with Session(engine) as session:
query = (
select(Server.vendor_id, Server.api_reference, func.min(ServerPrice.price).label("hourly_price"))
.join(ServerPrice, (ServerPrice.vendor_id == Server.vendor_id) & (ServerPrice.server_id == Server.server_id))
.where(Server.vcpus >= 8, Server.memory_amount >= 32 * 1024)
.where(ServerPrice.allocation == "ONDEMAND", ServerPrice.status == "ACTIVE", ServerPrice.currency == "USD")
.group_by(Server.vendor_id, Server.server_id)
.order_by("hourly_price")
.limit(5)
)
for row in session.exec(query):
print(row)

Environment variables set where the package caches the file, how often it checks for updates, or a database path of your own, e.g. SC_DATA_DB_PATH; see its README⁠ (opens in a new tab) for the full list.

In R​

In R, the same package keeps the database up to date through reticulate⁠ (opens in a new tab), with sparecores-data installed in its Python environment (e.g. by reticulate::py_install("sparecores-data")), and RSQLite⁠ (opens in a new tab) queries it, e.g. the number of active server types of each vendor:

library(reticulate)
library(DBI)

sc_data <- import("sc_data")
sc_data$db$updated$wait() # the first run downloads the database

con <- dbConnect(RSQLite::SQLite(), sc_data$db$path)
dbGetQuery(con, "
SELECT vendor_id, COUNT(*) AS server_types
FROM server
WHERE status = 'ACTIVE'
GROUP BY vendor_id")
dbDisconnect(con)

As a file​

The database is also available as an xz-compressed SQL dump, to import with the sqlite3 command-line tool:

curl -L https://cdn.sparecores.net/sc-data/latest/sc-data-all.sql.xz | xz -d | sqlite3 sc-data.db

License​

The database is published under the BSL 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 license (see Licensing). Each release converts to 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 three years after its publication. The _metadata table records the details of the release, such as when it was published, its license, the additional use grant and the date of the change:

SELECT * FROM _metadata;

Get to know the data​

A few queries to start with, in the sqlite3 command-line tool. Run .mode table first for readable results.

The number of server types by their status, e.g. active or retired:

SELECT status, COUNT(*) FROM server GROUP BY status;

The smallest and largest active server types, by their vCPUs and memory (memory_amount is in MiB):

SELECT MIN(vcpus), MAX(vcpus),
MIN(memory_amount / 1024.0) AS min_memory_gib,
MAX(memory_amount / 1024.0) AS max_memory_gib
FROM server
WHERE status = 'ACTIVE';

Where each vendor offers its servers, by continents, countries, regionsregionA 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 and zones:

SELECT z.vendor_id,
COUNT(DISTINCT continent) AS continents,
COUNT(DISTINCT country_id) AS countries,
COUNT(DISTINCT z.region_id) AS regions,
COUNT(*) AS zones
FROM zone AS z
JOIN region USING (vendor_id, region_id)
JOIN country USING (country_id)
GROUP BY 1;

Regions are identified by their vendor and region ID together, as two vendors can have regions with the same ID, hence the join on both.

How much the price of the same server type varies, e.g. the AWS m8g.2xlarge across regions, zones and allocations (on-demand and spot):

SELECT COUNT(*), MIN(price), ROUND(AVG(price), 4) AS avg_price, MAX(price)
FROM server_price
WHERE vendor_id = 'aws' AND server_id = 'm8g.2xlarge' AND status = 'ACTIVE';

The number of benchmark scores by the category of their benchmark:

SELECT b.category, COUNT(*) AS scores
FROM benchmark_score AS s
JOIN benchmark AS b USING (benchmark_id)
WHERE s.status = 'ACTIVE'
GROUP BY 1
ORDER BY 2 DESC;

Example: the cheapest servers for given specs​

The cheapest on-demand prices of server types with at least 8 vCPUs and 32 GiB of memory:

SELECT s.vendor_id, s.api_reference, s.vcpus, s.memory_amount / 1024 AS memory_gib,
MIN(p.price) AS hourly_price, p.currency
FROM server AS s
JOIN server_price AS p USING (vendor_id, server_id)
WHERE s.vcpus >= 8 AND s.memory_amount >= 32 * 1024
AND p.allocation = 'ONDEMAND' AND p.status = 'ACTIVE' AND p.currency = 'USD'
GROUP BY s.vendor_id, s.server_id
ORDER BY hourly_price
LIMIT 5;

Prices are in the vendor's currency (USD or EUR), hence the filter on currency when comparing them (see Prices in other currencies).

Example: the fastest single core​

The scores of all benchmarks are in the benchmark_score table. For example, the same servers ranked by their single-core speed, with PassMarkPassMarkThe PerformanceTest benchmark suite of PassMark Software, for Windows, Linux, macOS, and mobile devices. It runs fixed CPU, memory, disk, and graphics tests, such as math workloads involving compression, encryption, and physics simulations, and combines the results into an overall PassMark Rating.PerformanceTestGlossary's CPU Single Threaded Test:

SELECT s.vendor_id, s.api_reference, s.cpu_model, b.score AS single_thread,
MIN(p.price) AS hourly_price, p.currency
FROM server AS s
JOIN benchmark_score AS b ON b.resource_type = 'SERVER'
AND b.vendor_id = s.vendor_id AND b.resource_id = s.server_id
JOIN server_price AS p USING (vendor_id, server_id)
WHERE b.benchmark_id = 'passmark:cpu_single_threaded_test' AND b.status = 'ACTIVE'
AND s.vcpus >= 8 AND s.memory_amount >= 32 * 1024
AND p.allocation = 'ONDEMAND' AND p.status = 'ACTIVE' AND p.currency = 'USD'
GROUP BY s.vendor_id, s.server_id
ORDER BY single_thread DESC
LIMIT 5;

Example: clock speed and single-core speed​

The clock speed of a CPUCPU: Central Processing UnitThe general-purpose processor of a computer, which runs the operating system and programs. A CPU has one or more physical cores, and with SMT each core runs two or more hardware threads.WikipediaGlossary (cpu_speed, the maximum the vendor lists) tells little about how fast a core is. The server types listed at the same clock speed, with their slowest and fastest single-core speed, by PassMark's CPU Single Threaded Test:

SELECT s.cpu_speed AS ghz, COUNT(*) AS server_types,
ROUND(MIN(b.score)) AS slowest, ROUND(MAX(b.score)) AS fastest,
ROUND(MAX(b.score) / MIN(b.score), 1) AS ratio
FROM server AS s
JOIN benchmark_score AS b ON b.resource_type = 'SERVER'
AND b.vendor_id = s.vendor_id AND b.resource_id = s.server_id
WHERE b.benchmark_id = 'passmark:cpu_single_threaded_test' AND b.status = 'ACTIVE'
AND s.status = 'ACTIVE' AND s.cpu_speed IS NOT NULL
GROUP BY s.cpu_speed
HAVING COUNT(*) >= 10
ORDER BY ghz;

When we ran it in November 2026, the 16 server types listed at 5.0 GHz were all about as fast, but the fastest at 3.9 GHz was faster than any of them, and the fastest listed at 2.0 GHz about as fast. At 4.2 or 4.5 GHz, the fastest server type was 1.5 times as fast as the slowest, and at 2.2 GHz over 14 times. To find fast cores, rank by a benchmark (see the fastest single core), not by the clock speed.

Example: prices by continent​

How much more the same server type costs on each continent than on its cheapest one, on average. Comparing a server type with itself, in its own currency, needs no exchange rates:

WITH prices AS (
-- the average on-demand price of each server type on each continent
SELECT p.vendor_id, p.server_id, c.continent, AVG(p.price) AS price
FROM server_price AS p
JOIN region AS r USING (vendor_id, region_id)
JOIN country AS c USING (country_id)
WHERE p.allocation = 'ONDEMAND' AND p.status = 'ACTIVE'
GROUP BY p.vendor_id, p.server_id, c.continent
),
cheapest AS (
SELECT vendor_id, server_id, MIN(price) AS price
FROM prices
GROUP BY vendor_id, server_id
)
SELECT p.continent, COUNT(*) AS server_types,
ROUND(AVG(p.price / c.price - 1) * 100, 1) AS avg_premium_pct
FROM prices AS p
JOIN cheapest AS c USING (vendor_id, server_id)
GROUP BY p.continent
ORDER BY avg_premium_pct;

When we ran it in November 2026, a server type cost on average about the same in North America as on its cheapest continent, 11 to 12% more in Asia and Europe, 18 to 19% more in Africa and Oceania, and 48% more in South America. For a deeper analysis of the price differences, e.g. by vendor, see the talks⁠ (opens in a new tab) on sparecores.com.

Example: the cost of LLM inference​

Which server generates text with an LLMLLM: Large Language ModelA neural network, typically with billions of parameters, trained on large amounts of text to predict the next token. It can generate, summarize and translate text, answer questions and write code.WikipediaGlossary at the lowest cost? The llm_speed:text_generation benchmark measures how many tokenstokenThe unit of text that an LLM reads and writes, as defined by the model's tokenizer, such as a word, part of a word, or a punctuation mark. Prompt and output lengths are counted in tokens, and LLM inference speed is usually measured in tokens per second.Glossary a server generates per second with a given model (see LLM speed), and the prices tell what an hour of the server costs, so their ratio is the cost of a million generated tokens:

WITH prices AS (
-- the cheapest on-demand price of each server type, in USD
SELECT vendor_id, server_id, MIN(price) AS price
FROM server_price
WHERE allocation = 'ONDEMAND' AND status = 'ACTIVE' AND currency = 'USD'
GROUP BY vendor_id, server_id
),
speed AS (
-- the tokens generated per second with the model
SELECT vendor_id, resource_id AS server_id, MAX(score) AS tokens_per_second
FROM benchmark_score
WHERE resource_type = 'SERVER' AND status = 'ACTIVE'
AND benchmark_id = 'llm_speed:text_generation'
AND json_extract(config, '$.model') = 'Llama-3.3-70B-Instruct-Q4_K_M.gguf'
AND json_extract(config, '$.tokens') = 128
GROUP BY vendor_id, resource_id
)
SELECT vendor_id, api_reference, vcpus,
memory_amount / 1024 AS memory_gib,
accelerator_count AS gpus, accelerator_model AS gpu_model,
ROUND(tokens_per_second, 2) AS tokens_per_second,
price AS hourly_price,
ROUND(price / (tokens_per_second * 3600 / 1e6), 2) AS usd_per_million_tokens
FROM server
JOIN prices USING (vendor_id, server_id)
JOIN speed USING (vendor_id, server_id)
ORDER BY usd_per_million_tokens
LIMIT 10;

Swap the model for another, e.g. gemma-2b.Q4_K_M.gguf, to see how the picture changes. The LLM speed benchmark lists the models and token counts measured.

When we ran it in November 2026, the cheapest way to generate text with Llama 3.3 70B was, surprisingly, a CPU-only Azure server (Standard_F32ams_v6⁠ (opens in a new tab)), at about $30 per million tokens, ahead of GPUGPU: Graphics Processing UnitA processor with thousands of simple cores that run the same operation on many data elements in parallel. It was built to render graphics, and is now also used for general-purpose parallel work such as machine learning training and inference, scientific simulation, and video encoding. Cloud providers rent GPUs attached to virtual machines, with their own dedicated GPU memory.WikipediaGlossary servers such as the AWS g7e.4xlarge⁠ (opens in a new tab) with an RTX PRO 6000 at about $36. But the Azure server generated only about 3 tokens per second, against 31 of the GPU server, so the cheapest is not always the right choice. With the small Gemma 2B model, cheap CPU-only servers of Azure and Vultr led, at well under $1 per million tokens. The data changes often, so run the query for the current picture.

The ranking also depends on the task: with llm_speed:prompt_processing, the speed of reading the prompt, GPU servers led for Llama 3.3 70B, at under $1.50 per million tokens, as reading the prompt needs more compute than generating text. And the cost per token leaves out other costs, such as the storage for the model (over 70 GB for Llama 3.3 70B, see the storage_price table) and the egressegressThe network traffic leaving a cloud vendor's network, e.g. to the internet. Vendors usually charge for it per GB beyond an included amount, while incoming (ingress) traffic is usually free, so it can make up a large part of the costs of a service that sends a lot of data.Glossary of the generated text (traffic_price).

Prices in other currencies​

The query compares USD prices only. Some vendors, such as 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, OVHcloudOVHcloudA French cloud provider, founded in 1999, with data centers in Europe, North America and Asia-Pacific. It offers dedicated (bare-metal) servers, public cloud instances based on OpenStack, and private cloud.OVHcloudGlossary and UpCloud, price their servers in EUR, and the database has no exchange rates to convert them, so they are left out.

The API converts all prices to USD (or the currency of your choice), so it compares every vendor. For example, the same ranking over the /servers endpoint, by the benchmark's score per price (see the API examples for more):

curl -G https://keeper.sparecores.net/servers \
-d benchmark_id=llm_speed:text_generation \
--data-urlencode 'benchmark_config={"model": "Llama-3.3-70B-Instruct-Q4_K_M.gguf", "tokens": 128}' \
-d best_price_allocation=ONDEMAND_ONLY \
-d order_by=selected_benchmark_score_per_price \
-d order_dir=desc \
-d limit=10

With all vendors in, OVHcloud's GPU servers led this ranking for Llama 3.3 70B, and UpCloud's small CPU-only servers for Gemma 2B, when we ran it. The server listing⁠ (opens in a new tab) of the Web UI shows the same, without writing code: select the benchmark and its configuration with Select Benchmark, and sort by $ EFFICIENCY.

Tips​

  • Filter on status = 'ACTIVE' for the current offerings: the database also keeps the server types, prices and scores that are no longer available.
  • The config of a benchmark score is JSONJSON: 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: match its fields with json_extract, as it can have other fields too.
  • Benchmark scores refer to servers or managed databases: resource_type tells which, and resource_id is the server or database ID.
  • Prices are in the vendor's currency (currency), and per the unit of the price, e.g. per hour for servers.