2026-07-08

Press Space or click the green arrow icons to navigate the slides ->
$ sqlite3 spare-cores-navigator.db
SQLite version 3.46.1
Enter ".help" for usage hints.
sqlite> .mode table
sqlite> WITH prices AS (
SELECT vendor_id, server_id, ROUND(AVG(price), 2) AS price FROM server_price
WHERE allocation = 'ONDEMAND' GROUP BY vendor_id, server_id
),
workload AS (
SELECT DISTINCT vendor_id, server_id, score FROM benchmark_score
WHERE benchmark_id = 'llm_speed:text_generation' AND config = '{"model": "Llama-3.3-70B-Instruct-Q4_K_M.gguf", "tokens": 128}'
)
SELECT
vendor_id, api_reference,
vcpus, memory_amount/1024 AS memory, gpu_count, gpu_model, gpu_memory_total/1024 AS VRAM,
ROUND(score, 2) AS score, price, ROUND(score / price, 4) AS "$ efficiency",
ROUND(price / (score * 60 * 60 / 1_000_000 ), 4) AS "$ per 1M token"
FROM server
LEFT JOIN prices USING (vendor_id, server_id)
LEFT JOIN workload USING (vendor_id, server_id)
WHERE score IS NOT NULL
ORDER BY 11 ASC
LIMIT 25;
+-----------+--------------------------+-------+--------+-----------+--------------+------+-------+-------+--------------+----------------+
| vendor_id | api_reference | vcpus | memory | gpu_count | gpu_model | VRAM | score | price | $ efficiency | $ per 1M token |
+-----------+--------------------------+-------+--------+-----------+--------------+------+-------+-------+--------------+----------------+
| gcp | a2-ultragpu-1g | 12 | 170 | 1.0 | A100 | 80 | 24.47 | 1.36 | 17.9959 | 15.4356 |
| gcp | a2-highgpu-2g | 24 | 170 | 2.0 | A100 | 80 | 22.39 | 1.82 | 12.3027 | 22.5786 |
| ovh | t2-le-90 | 30 | 90 | 2.0 | V100S | 64 | 18.65 | 1.6 | 11.6566 | 23.8301 |
| ovh | t2-90 | 30 | 90 | 2.0 | V100S | 64 | 18.63 | 1.6 | 11.6414 | 23.8612 |
| ovh | l40s-90 | 15 | 90 | 1.0 | L40S | 48 | 15.72 | 1.4 | 11.2273 | 24.7414 |
| ovh | h100-380 | 30 | 380 | 1.0 | H100 | 80 | 29.12 | 2.8 | 10.4015 | 26.7055 |
| gcp | a2-ultragpu-2g | 24 | 340 | 2.0 | A100 | 160 | 24.17 | 2.71 | 8.9172 | 31.1507 |
| ovh | a10-90 | 60 | 85 | 2.0 | A10 | 48 | 10.67 | 1.52 | 7.018 | 39.581 |
| ovh | rtx5000-84 | 16 | 84 | 3.0 | RTX 5000 | 48 | 7.46 | 1.08 | 6.9072 | 40.2154 |
| aws | g7e.4xlarge | 16 | 128 | 1.0 | RTX Pro 6000 | 96 | 31.01 | 4.73 | 6.5553 | 42.3744 |
| hcloud | ccx53 | 32 | 128 | 0.0 | | | 2.36 | 0.38 | 6.2082 | 44.744 |
| ovh | t1-le-180 | 32 | 180 | 4.0 | V100 | 64 | 16.77 | 2.8 | 5.9908 | 46.3677 |
| ovh | t2-le-180 | 60 | 180 | 4.0 | V100S | 128 | 18.53 | 3.2 | 5.792 | 47.9588 |
| ovh | l40s-180 | 30 | 180 | 2.0 | L40S | 96 | 15.56 | 2.8 | 5.5579 | 49.9788 |
| hcloud | ccx63 | 48 | 192 | 0.0 | | | 3.19 | 0.58 | 5.4999 | 50.5062 |
| gcp | a2-highgpu-4g | 48 | 340 | 4.0 | A100 | 160 | 19.59 | 3.65 | 5.3683 | 51.7444 |
| gcp | g2-standard-24 | 24 | 96 | 2.0 | L4 | 44 | 5.73 | 1.07 | 5.3593 | 51.8306 |
| ovh | h100-760 | 60 | 760 | 2.0 | H100 | 160 | 29.48 | 5.6 | 5.2637 | 52.7723 |
| aws | g7e.8xlarge | 32 | 256 | 1.0 | RTX Pro 6000 | 96 | 31.02 | 6.24 | 4.9709 | 55.8813 |
| azure | Standard_NC24ads_A100_v4 | 24 | 220 | 1.0 | A100 | 80 | 23.05 | 4.71 | 4.8934 | 56.7656 |
| aws | g6e.4xlarge | 16 | 128 | 1.0 | L40S | 44 | 15.91 | 3.44 | 4.6237 | 60.0765 |
| ovh | l4-180 | 45 | 180 | 2.0 | L4 | 48 | 5.78 | 1.5 | 3.8532 | 72.0904 |
| gcp | a2-ultragpu-4g | 48 | 680 | 4.0 | A100 | 320 | 20.78 | 5.42 | 3.8343 | 72.4462 |
| ovh | a10-180 | 120 | 170 | 4.0 | A10 | 96 | 10.73 | 3.04 | 3.528 | 78.7359 |
| ovh | a10-45 | 30 | 42 | 1.0 | A10 | 24 | 2.39 | 0.76 | 3.1439 | 88.3539 |
+-----------+--------------------------+-------+--------+-----------+--------------+------+-------+-------+--------------+----------------+
sqlite> WITH prices AS (
SELECT vendor_id, server_id, ROUND(AVG(price), 2) AS price FROM server_price
WHERE allocation = 'ONDEMAND' GROUP BY vendor_id, server_id
),
workload AS (
SELECT DISTINCT vendor_id, server_id, score FROM benchmark_score
WHERE benchmark_id = 'llm_speed:text_generation' AND config = '{"model": "gemma-2b.Q4_K_M.gguf", "tokens": 128}'
)
SELECT
vendor_id, api_reference,
vcpus, memory_amount/1024 AS memory, gpu_count, gpu_model, gpu_memory_total/1024 AS VRAM,
ROUND(score, 2) AS score, price, ROUND(score / price, 4) AS "$ efficiency",
ROUND(price / (score * 60 * 60 / 1_000_000 ), 4) AS "$ per 1M token"
FROM server
LEFT JOIN prices USING (vendor_id, server_id)
LEFT JOIN workload USING (vendor_id, server_id)
WHERE score IS NOT NULL
ORDER BY 11 ASC
LIMIT 25;
+-----------+-----------------------+-------+--------+-----------+-----------+------+--------+-------+--------------+----------------+
| vendor_id | api_reference | vcpus | memory | gpu_count | gpu_model | VRAM | score | price | $ efficiency | $ per 1M token |
+-----------+-----------------------+-------+--------+-----------+-----------+------+--------+-------+--------------+----------------+
| hcloud | cx33 | 4 | 8 | 0.0 | | | 26.83 | 0.01 | 2682.7252 | 0.1035 |
| hcloud | cx43 | 8 | 16 | 0.0 | | | 45.35 | 0.02 | 2267.7165 | 0.1225 |
| hcloud | cx53 | 16 | 32 | 0.0 | | | 60.02 | 0.04 | 1500.5479 | 0.1851 |
| hcloud | cx32 | 4 | 8 | 0.0 | | | 12.32 | 0.01 | 1231.8573 | 0.2255 |
| hcloud | cpx42 | 8 | 16 | 0.0 | | | 53.83 | 0.05 | 1076.5084 | 0.258 |
| hcloud | cax21 | 4 | 8 | 0.0 | | | 10.31 | 0.01 | 1030.5204 | 0.2696 |
| hcloud | cpx32 | 4 | 8 | 0.0 | | | 30.75 | 0.03 | 1024.8748 | 0.271 |
| hcloud | cpx21 | 3 | 4 | 0.0 | | | 19.94 | 0.02 | 996.9937 | 0.2786 |
| hcloud | cax31 | 8 | 16 | 0.0 | | | 18.74 | 0.02 | 936.8434 | 0.2965 |
| hcloud | cpx52 | 12 | 24 | 0.0 | | | 73.21 | 0.08 | 915.1476 | 0.3035 |
| hcloud | cpx62 | 16 | 32 | 0.0 | | | 87.79 | 0.1 | 877.9221 | 0.3164 |
| hcloud | cpx31 | 4 | 8 | 0.0 | | | 26.01 | 0.03 | 866.9372 | 0.3204 |
| hcloud | cpx22 | 2 | 4 | 0.0 | | | 17.19 | 0.02 | 859.4776 | 0.3232 |
| hcloud | cpx41 | 8 | 16 | 0.0 | | | 38.09 | 0.05 | 761.7758 | 0.3646 |
| gcp | g2-standard-4 | 4 | 16 | 1.0 | L4 | 22 | 129.61 | 0.18 | 720.0422 | 0.3858 |
| hcloud | cx23 | 2 | 4 | 0.0 | | | 6.87 | 0.01 | 686.9441 | 0.4044 |
| hcloud | cx22 | 2 | 4 | 0.0 | | | 6.24 | 0.01 | 624.3952 | 0.4449 |
| upcloud | CLOUDNATIVE-2xCPU-4GB | 2 | 4 | 0.0 | | | 11.71 | 0.02 | 585.7258 | 0.4742 |
| hcloud | cax41 | 16 | 32 | 0.0 | | | 22.75 | 0.04 | 568.7028 | 0.4884 |
| hcloud | cx42 | 8 | 16 | 0.0 | | | 16.74 | 0.03 | 558.1032 | 0.4977 |
| hcloud | cax11 | 2 | 4 | 0.0 | | | 5.47 | 0.01 | 547.0548 | 0.5078 |
| hcloud | cpx11 | 2 | 2 | 0.0 | | | 4.91 | 0.01 | 490.7897 | 0.566 |
| hcloud | ccx13 | 2 | 8 | 0.0 | | | 9.69 | 0.02 | 484.6809 | 0.5731 |
| ovh | rtx5000-28 | 4 | 28 | 1.0 | RTX 5000 | 16 | 158.95 | 0.36 | 441.5258 | 0.6291 |
| hcloud | cpx51 | 16 | 32 | 0.0 | | | 45.26 | 0.11 | 411.4147 | 0.6752 |
+-----------+-----------------------+-------+--------+-----------+-----------+------+--------+-------+--------------+----------------+
sqlite> -- Thank you, enjoy the buffet! *drops mic*
sqlite> .exitPricing details:
Llama-3.3-70B-Instruct-Q4_K_M.gguf)
Missing data, e.g. due to:
pulumi reported that the instance creation failed, but it silently ran for 3 days doing nothing and consumed 1000s of dollars
Benchmark methodology:
llama.cpp vs vLLM
We don’t have answers to all questions,
but we transparently report what and how we measure
so that you can trust, build on, or reproduce and extend our work.
Resource requirements?
This was awesome, thanks for sharing.
Spare Cores
Spare Cores
Spare Cores
Source: sparecores.com


> library(reticulate)
> sc_data <- reticulate::import("sc_data")
> db <- dbConnect(RSQLite::SQLite(), sc_data$data$Data()$actual_db_path)
> pms <- sapply(c('sc_crawler', 'sc_data', 'sc_keeper', 'sqlmodel'), import)
> db <- pms$sc_keeper$database$session
> Server <- pms$sc_crawler$tables$Server
> server_select <- pms$sqlmodel$select(Server)
> sc_query_one <- function(query) db$sessionmaker$exec(query)$one()$model_dump()
> sc_query_one(server_select$where(Server$vendor_id == "aws")$where(Server$server_id == "g4dn.xlarge"))
List of 41
$ server_id : chr "g4dn.xlarge"
$ vendor_id : chr "aws"
$ display_name : chr "g4dn.xlarge"
$ api_reference : chr "g4dn.xlarge"
$ name : chr "g4dn.xlarge"
$ family : chr "g4dn"
$ description : chr "Graphics intensive [Instance store volumes] [Network and EBS optimized] Gen4 xlarge"
$ status : chr "active"
$ observed_at : POSIXct[1:1], format: "2024-07-05 19:17:01"
$ hypervisor : chr "nitro"
$ vcpus : int 4
$ cpu_cores : int 2
$ cpu_allocation : chr "Dedicated"
$ cpu_manufacturer : chr "Intel"
$ cpu_family : chr "Xeon"
$ cpu_model : chr "8259CL"
$ cpu_architecture : chr "x86_64"
$ cpu_speed : num 3.5
$ cpu_l1_cache : int 131072
$ cpu_l2_cache : int 2097152
$ cpu_l3_cache : int 37486592
$ cpu_flags : chr [1:87] "fpu" "vme" "de" "pse" ...
$ memory_amount : int 16384
$ memory_generation: chr "DDR4"
$ memory_speed : int 2933
$ gpu_count : int 1
$ gpu_memory_min : int 16384
$ gpu_memory_total : int 16384
$ gpu_manufacturer : chr "Nvidia"
$ gpu_family : chr "Turing"
$ gpu_model : chr "Tesla T4"
$ gpus :List of 1
..$ :List of 10
.. ..$ manufacturer : chr "Nvidia"
.. ..$ family : chr "Turing"
.. ..$ model : chr "Tesla T4"
.. ..$ memory : int 15360
.. ..$ firmware_version: chr "535.171.04"
.. ..$ bios_version : chr "90.04.96.00.A0"
.. ..$ graphics_clock : int 1590
.. ..$ sm_clock : int 1590
.. ..$ mem_clock : int 5001
.. ..$ video_clock : int 1470
$ storage_size : int 125
$ storage_type : chr "nvme ssd"
$ storages :List of 1
..$ :List of 2
.. ..$ size : int 125
.. ..$ storage_type: chr "nvme ssd"
$ network_speed : num 5
$ inbound_traffic : num 0
$ outbound_traffic : num 0
$ ipv4 : int 0
psutil on other OS.
Requires Python 3.9+ and :
Then install the R package bindings from GitHub:
> library(resource.tracker)
> tracker <- ResourceTracker$new()
> numbers <- 1:1e6
> window <- 3
> rollavg <- sapply(
+ seq_len(length(numbers) - window + 1),
+ function(i) mean(numbers[i:(i + window - 1)]))
> tracker$stats()
List of 9
$ process_cpu_usage :List of 2
..$ mean: num 1.12
..$ max : num 1.14
$ process_memory :List of 2
..$ mean: num 728783
..$ max : num 798130
$ process_gpu_usage :List of 2
..$ mean: num 0
..$ max : num 0
$ process_gpu_vram :List of 2
..$ mean: num 0
..$ max : num 0
$ process_gpu_utilized :List of 2
..$ mean: num 0
..$ max : num 0
$ system_disk_space_used_gb:List of 1
..$ max: num 2560
$ system_net_recv_bytes :List of 1
..$ sum: num 1840217
$ system_net_sent_bytes :List of 1
..$ sum: num 1843725
$ timestamp :List of 1
..$ duration: num 7
> tracker$recommend_resources()
List of 4
$ cpu : int 1
$ memory: int 1024
$ gpu : int 0
$ vram : int 0
> tracker$recommend_server()
List of 50
$ vendor_id : chr "upcloud"
$ server_id : chr "DEV-1xCPU-1GB-10GB"
$ description : chr "Developer 1 vCPUs, 1 GB RAM"
$ family : chr "Developer"
$ vcpus : int 1
$ hypervisor : chr "KVM"
$ cpu_allocation : chr "Shared"
$ cpu_cores : int 1
$ cpu_architecture : chr "x86_64"
$ cpu_manufacturer : chr "AMD"
$ cpu_family : chr "EPYC"
$ cpu_model : chr "7542"
$ cpu_l1_cache : int 131072
$ cpu_l2_cache : int 524288
$ cpu_l3_cache : int 16777216
$ cpu_flags : chr [1:88] "fpu" "vme" "de" "pse" ...
$ memory_amount : int 1024
$ storage_size : int 10
$ inbound_traffic : num 0
$ outbound_traffic : num 1024
$ ipv4 : int 1
$ price : num 0.0052
...>>> print(ResourceTracker.recommend_resources.__doc__)
Recommend optimal resource allocation based on the measured resource tracker data.
The recommended resources are based on the following rules:
- target average CPU usage of the process(es)
- target maximum memory usage of the process(es) with a 20% buffer
- target maximum number of GPUs used by the process(es)
- target maximum VRAM usage of the process(es) with a 20% buffer
Args:
historical_stats: Optional list of historical statistics (as returned by [resource_tracker.ResourceTracker.stats][])
to consider when making recommendations. These will be combined with the current stats.
Returns:
A dictionary containing the recommended resources (cpu, memory, gpu, vram).To make this more convenient (automatic),
check out e.g. the Metaflow extension!
> tracker$system_metrics
'data.frame': 6 obs. of 21 variables:
$ timestamp : POSIXct, format: "2026-07-06 23:54:36" "2026-07-06 23:54:37" ...
$ processes : int 678 678 681 678 677 677
$ utime : num 0.63 1.21 1.23 1.26 1.17 1.16
$ stime : num 0.54 0.26 0.43 0.32 0.21 0.28
$ cpu_usage : num 1.17 1.47 1.66 1.58 1.38 ...
$ memory_free_mib : num 38394 38388 38398 38392 38344 ...
$ memory_used_mib : num 23607 23613 23603 23609 23657 ...
$ memory_buffers_mib : num 5.25 5.25 5.25 5.25 5.25 ...
$ memory_cached_mib : num 41214 41214 41214 41214 41214 ...
$ memory_active_mib : num 27286 27295 27305 27308 27379 ...
$ memory_inactive_mib: num 24520 24520 24520 24520 24520 ...
$ disk_read_bytes : int 32768 0 0 0 0 0
$ disk_write_bytes : int 0 671744 48578560 598016 0 663552
$ disk_space_total_gb: num 6142 6142 6142 6142 6142 ...
$ disk_space_used_gb : num 1563 1563 1563 1563 1563 ...
$ disk_space_free_gb : num 4575 4575 4575 4575 4575 ...
$ net_recv_bytes : int 732 1902 1236 21488 16070 14904
$ net_sent_bytes : int 978 3572 2270 9361 50019 29286
$ gpu_usage : num 0.01 0.05 0.05 0.06 0.04 0.04
$ gpu_vram_mib : num 1651 1661 1661 1656 1646 ...
$ gpu_utilized : int 1 1 1 1 1 1
> tracker$process_metrics
'data.frame': 7 obs. of 12 variables:
'data.frame': 6 obs. of 12 variables:
$ timestamp : POSIXct, format: "2026-07-06 23:54:36" "2026-07-06 23:54:37" ...
$ pid : int 321426 321426 321426 321426 321426 321426
$ children : int 5 5 5 5 5 5
$ utime : num 0.46 1.05 1.01 1.03 1 1
$ stime : num 0.19 0.09 0.09 0.06 0.1 0.09
$ cpu_usage : num 0.65 1.14 1.1 1.09 1.1 ...
$ memory_mib : num 322 329 338 341 411 ...
$ disk_read_bytes : int 16384 0 0 0 0 0
$ disk_write_bytes: int 0 0 0 0 0 0
$ gpu_usage : int 0 0 0 0 0 0
$ gpu_vram_mib : int 0 0 0 0 0 0
$ gpu_utilized : int 0 0 0 0 0 0
> str(tracker$get_combined_metrics(human_names = TRUE))
'data.frame': 6 obs. of 32 variables:
$ Timestamp : num 1.78e+09 1.78e+09 1.78e+09 1.78e+09 1.78e+09 ...
$ System processes : int 678 678 681 678 677 677
$ System CPU time (user) : num 0.63 1.21 1.23 1.26 1.17 1.16
$ System CPU time (system) : num 0.54 0.26 0.43 0.32 0.21 0.28
$ System CPU usage : num 1.17 1.47 1.66 1.58 1.38 ...
$ System free memory : num 38394 38388 38398 38392 38344 ...
$ System used memory : num 23607 23613 23603 23609 23657 ...
$ System memory buffers : num 5.25 5.25 5.25 5.25 5.25 ...
$ System memory page/file cached : num 41214 41214 41214 41214 41214 ...
$ System active memory : num 27286 27295 27305 27308 27379 ...
$ System inactive memory : num 24520 24520 24520 24520 24520 ...
$ System disk read : int 32768 0 0 0 0 0
$ System disk write : int 0 671744 48578560 598016 0 663552
$ System disk space total : num 6142 6142 6142 6142 6142 ...
$ System disk space used : num 1563 1563 1563 1563 1563 ...
$ System disk space free : num 4575 4575 4575 4575 4575 ...
$ System inbound network traffic : int 732 1902 1236 21488 16070 14904
$ System outbound network traffic: int 978 3572 2270 9361 50019 29286
$ System GPU usage : num 0.01 0.05 0.05 0.06 0.04 0.04
$ System VRAM used : num 1651 1661 1661 1656 1646 ...
$ System GPUs in use : int 1 1 1 1 1 1
$ Process PID : int 321426 321426 321426 321426 321426 321426
$ Process children : int 5 5 5 5 5 5
$ Process CPU time (user) : num 0.46 1.05 1.01 1.03 1 1
$ Process CPU time (system) : num 0.19 0.09 0.09 0.06 0.1 0.09
$ Process CPU usage : num 0.65 1.14 1.1 1.09 1.1 ...
$ Process memory usage : num 322 329 338 341 411 ...
$ Process disk read : int 16384 0 0 0 0 0
$ Process disk write : int 0 0 0 0 0 0
$ Process GPU usage : int 0 0 0 0 0 0
$ Process VRAM used : int 0 0 0 0 0 0
$ Process GPUs in use : int 0 0 0 0 0 0


Slides: sparecores.com/talks
