It's the tool to determine hardware worthiness for running SQD worker. This tool runs number of checks to determine number of CPU cores, total amount of available memory, storage speed, available space, network and processing speed. Also it will try to determine your public IP.
The best way to run benchmark is to just use docker.
If you only have one storage device, you can run:
docker run --rm --network host --volume -it subsquid/worker-benchmark:latest
If you have dedicated storage for worker, please provide docker access to the expected storage:
docker run --rm --network host --volume [path to storage folder]:/app/data -it subsquid/worker-benchmark:latest
Expected output contains progress indicators, detailed performance breakdown and overall report.
Please note that as bulk of required bandwidth used to download initial data from infrastructure, we are measuring exactly this download speed. It may show numbers less than expected and usually not a dealbreaker as long as stated network speed is more or equal 1 Gigabit.
If tool is unable to detect you public IP, you would need to add it to worker configuration before running.
Blue means that parameter exceeding expectations and future-proof. Green means just right. Red in numbers other than network speed may lead to reduced APR.
If you are feeling generous, please submit "benchmark details" line along with your hardware spec, it will help further refine worker requirements.
If you want to mess with internals, here are more details. If simply build and run, tool would do most of the data processing in ./data folder. Additional configuration includes:
- --total-samples: total number of queries to run, more makes benchmarking more precise, less makes benchmark take less time. Default is 1000, change would invalidate bench time in report.
- --max-concurrency: max number of queries to be run in a batch. As backend already take advantage of parallelization, it's not really useful for current implementation on machines with less than 16 cores. Default is 1, change would invalidate bench time in report.
- --config-url: URL to fetch benchmark description.
- --config-file: filename to save benchmark description.
- --force-update: re-download benchmark data even it is already downloaded.
- --no-cleanup: disables auto-cleanup.
Sol #1 query as example:
{
"type":"solana",
"fields":{
"block":{"number":true,"hash":true,"parentNumber":true,"parentHash":true,"height":true,"timestamp":true},
"transaction":{"transactionIndex":true,"accountKeys":true,"numReadonlySignedAccounts":true,"numReadonlyUnsignedAccounts":true,"numRequiredSignatures":true,"signatures":true,"fee":true,"computeUnitsConsumed":true,"loadedAddresses":true,"hasDroppedLogMessages":true},
"instruction":{"transactionIndex":true,"instructionAddress":true,"programId":true,"accounts":true,"data":true,"d1":true,"d2":true,"d4":true,"d8":true,"error":true,"computeUnitsConsumed":true,"isCommitted":true,"hasDroppedLogMessages":true},
"log":{"transactionIndex":true,"logIndex":true,"instructionAddress":true,"programId":true,"kind":true,"message":true},
"balance":{"account":true,"pre":true,"post":true},
"tokenBalance":{"transactionIndex":true,"account":true,"preMint":true,"postMint":true,"preDecimals":true,"postDecimals":true,"preProgramId":true,"postProgramId":true,"preOwner":true,"postOwner":true,"preAmount":true,"postAmount":true},
"reward":{"pubkey":true,"lamports":true,"postBalance":true,"rewardType":true,"commission":true}
},
"includeAllBlocks":true,
"instructions":[{
"programId":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"],
"transaction":true,
"transactionBalances":true,
"transactionTokenBalances":true,
"transactionInstructions":true,
"innerInstructions":true,
"logs":true
}]}
| Spec | Sol #1 | Sol #2 | Sol #3 | Sol #4 | Eth #1 | Eth #2 | Eth #3 | Eth #4 | Base | Arbitrum | Total (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Slowest 10% | 512 ms | 236 ms | 227 ms | 135 ms | 530 ms | 217 ms | 114 ms | 46 ms | 23 ms | 32 ms | ~207 s |
| GCP E2 2vcpu | 484 ms | 189 ms | 168 ms | 97 ms | 416 ms | 151 ms | 101 ms | 29 ms | 10 ms | 27 ms | 169 s |
| Slowest 25% | 381 ms | 194 ms | 153 ms | 65 ms | 379 ms | 185 ms | 75 ms | 38 ms | 12 ms | 21 ms | ~150 s |
| Servarica 4vcpu | 386 ms | 132 ms | 119 ms | 70 ms | 360 ms | 155 ms | 73 ms | 27 ms | 11 ms | 22 ms | 138 s |
| GCP E2 4vcpu | 345 ms | 115 ms | 101 ms | 57 ms | 294 ms | 110 ms | 57 ms | 20 ms | 8 ms | 17 ms | 114 s |
| GCP N2 4vcpu | 260 ms | 86 ms | 77 ms | 43 ms | 223 ms | 83 ms | 43 ms | 15 ms | 6 ms | 12 ms | 86 s |
| Median | 197 ms | 90 ms | 83 ms | 49 ms | 200 ms | 102 ms | 46 ms | 28 ms | 6 ms | 15 ms | ~82 s |
| GCP E2 8vcpu | 191 ms | 61 ms | 53 ms | 28 ms | 180 ms | 72 ms | 26 ms | 13 ms | 6 ms | 9 ms | 65 s |
| GCP E2 16vcpu | 181 ms | 55 ms | 47 ms | 25 ms | 177 ms | 75 ms | 22 ms | 13 ms | 6 ms | 9 ms | 63 s |
| GCP N2 16vcpu | 193 ms | 50 ms | 42 ms | 22 ms | 177 ms | 70 ms | 20 ms | 11 ms | 6 ms | 8 ms | 61 s |
| Fastest 10% | 167 ms | 49 ms | 45 ms | 21 ms | 175 ms | 75 ms | 25 ms | 12 ms | 4 ms | 12 ms | ~59 s |
| i7-9700K 8 cores | 152 ms | 43 ms | 37 ms | 20 ms | 138 ms | 52 ms | 27 ms | 10 ms | 4 ms | 9 ms | 50 s |
| M3 Max 16 cores | 126 ms | 49 ms | 45 ms | 31 ms | 121 ms | 51 ms | 22 ms | 15 ms | 4 ms | 6 ms | 47 s |
| GCP C4 16vcpu | 117 ms | 28 ms | 23 ms | 12 ms | 112 ms | 42 ms | 11 ms | 6 ms | 3 ms | 4 ms | 36 s |
| Velia Baremetal: 9950 32 cores | 89 ms | 22 ms | 18 ms | 10 ms | 82 ms | 32 ms | 10 ms | 5 ms | 2 ms | 4 ms | 28 s |
| Spec | Sol #1 | Sol #2 | Sol #3 | Sol #4 | Eth #1 | Eth #2 | Eth #3 | Eth #4 | Base | Arbitrum | Total (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| GCP E2 2vcpu | 1404 ms | 341 ms | 318 ms | 528 ms | 694 ms | 255 ms | 166 ms | 57 ms | 13 ms | 28 ms | 153 s |
| GCP E2 4vcpu | 719 ms | 612 ms | 524 ms | 306 ms | 506 ms | 302 ms | 160 ms | 52 ms | 15 ms | 30 ms | 86 s |
| GCP N2 4vcpu | 545 ms | 514 ms | 463 ms | 284 ms | 407 ms | 232 ms | 122 ms | 39 ms | 12 ms | 24 ms | 67 s |
| GCP E2 8vcpu | 295 ms | 232 ms | 213 ms | 166 ms | 319 ms | 203 ms | 185 ms | 41 ms | 13 ms | 30 ms | 34 s |
| i7-9700K 8 cores | 278 ms | 225 ms | 216 ms | 169 ms | 273 ms | 212 ms | 181 ms | 40 ms | 13 ms | 27 ms | 30 s |
| GCP E2 16vcpu | 252 ms | 196 ms | 181 ms | 145 ms | 260 ms | 188 ms | 131 ms | 42 ms | 14 ms | 43 ms | 27 s |
| GCP N2 16vcpu | 269 ms | 193 ms | 184 ms | 138 ms | 259 ms | 183 ms | 117 ms | 41 ms | 22 ms | 45 ms | 28 s |
| M3 Max 16 cores | 195 ms | 179 ms | 166 ms | 137 ms | 208 ms | 144 ms | 132 ms | 58 ms | 9 ms | 20 ms | 23 s |
| GCP C4 16vcpu | 156 ms | 113 ms | 101 ms | 78 ms | 159 ms | 107 ms | 62 ms | 24 ms | 10 ms | 16 ms | 16 s |