├── .gitignore ├── README.md ├── benchmarks ├── template.yaml ├── v25 │ ├── fox_2020_05_10.yaml │ ├── fox_2020_05_13.yaml │ ├── lanzafame_2020_04_15.yaml │ ├── lanzafame_2020_04_18.yaml │ └── magik6k_2020_04_22.yaml ├── v26 │ └── fox_2020_05_18.yaml ├── v27 │ ├── ac_2020_06_07.yaml │ ├── bmh_05_07_2020.yaml │ ├── cory_2020_07_14.yaml │ └── whyrusleeping_2020_07_16.yaml └── v28 │ └── frankpfeift_2021_04_16.yaml ├── components ├── Footer.js └── Result.js ├── package.json ├── pages └── index.js ├── public ├── cpu.svg ├── favicon.ico ├── monitor.svg ├── ram.svg └── zeit.svg ├── utils └── getBenchmarks.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | 21 | # debug 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # local env files 27 | .env.local 28 | .env.development.local 29 | .env.test.local 30 | .env.production.local 31 | 32 | data 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hardware benchmarks on the Filecoin testnet 2 | 3 | This repo is a place to collect benchmarks collected from the Filecoin community. Submissions are reviewed manually, but we try to be quick. You can review the current benchmarks [here](https://filecoin-benchmarks.on.fleek.co/). 4 | 5 | ## Running a benchmark 6 | 7 | **IT IS IMPORTANT TO BUILD LOTUS FROM SOURCE TO TAKE ADVANTAGE OF ALL AVAILABLE OPTIMIZATIONS** 8 | 9 | The information below assumes you are already able to build lotus from source. The instructions below detail how to natively compile the filecoin-ffi when building lotus and its tools. 10 | 11 | If you have not previosuly built lotus from source, please see the [lotus docs](https://docs.lotu.sh/en+install-lotus-ubuntu). 12 | 13 | To build the filecoin-ffi from source you will need to have `rustup` installed. You can install it by following the instructions at [https://rustup.rs/](https://rustup.rs/). 14 | 15 | You will need **600GB** of free disk space available, replace the value of `/storage` with an appropriate path in the last command. 16 | 17 | **Build and Run** 18 | 19 | ``` 20 | $ git clone --branch master https://github.com/filecoin-project/lotus.git 21 | $ cd lotus 22 | $ env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps bench 23 | $ env FIL_PROOFS_MAXIMIZE_CACHING=1 RUST_LOG=info TMPDIR=/storage ./bench sealing --storage-dir /storage/bench --sector-size 32GiB 2>&1 | tee bench.log 24 | ``` 25 | 26 | ## Adding a benchmark to the list 27 | 28 | - Fork the repo 29 | - Create a new file in the `benchmarks/{YOUR_VERSION}` folder. Copy the format of `benchmarks/template.yaml`. 30 | - Submit a pull request 31 | 32 | ## Dev server 33 | 34 | If you want to test your addition locally or otherwise play around, `yarn dev` and you're off to the races. 35 | 36 | ## Build 37 | 38 | Running `yarn parse-data` turns the YAML files into the JSON files used during the build process. Adding a new `.yaml` file does _not_ trigger a JSON rebuild automatically. 39 | 40 | ## Deploy 41 | 42 | Any new push to `master` triggers a rebuild and deploy. 43 | -------------------------------------------------------------------------------- /benchmarks/template.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 13m6.183975145s (41.7 MiB/s) 4 | seal: preCommit phase 1: 21h7m33.318371154s (441 KiB/s) 5 | seal: preCommit phase 2: 56m23.238811382s (9.69 MiB/s) 6 | seal: commit phase 1: 795.79806ms (40.2 GiB/s) 7 | seal: commit phase 2: 1h35m4.06863434s (5.74 MiB/s) 8 | seal: verify: 75.344444ms 9 | unseal: 2.274309ms (13.7 TiB/s) 10 | generate candidates: 292.508µs (107 TiB/s) 11 | compute winnnig post proof (cold): 6.270913873s 12 | compute winnnig post proof (hot): 5.982318469s 13 | verify winnnig post proof (cold): 79.505736ms 14 | verify winnnig post proof (hot): 35.669096ms 15 | compute window post proof (cold): 31m36.361610216s 16 | compute window post proof (hot): 31m28.272473997s 17 | verify window post proof (cold): 10.693921496s 18 | verify window post proof (hot): 4.160899381s 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7702P 22 | cores: 64 23 | speed: 2.0GHz/3.5GHz 24 | gpu: 25 | brand: NVidia 26 | model: GTX 2080Ti 27 | ram: 28 | amount: 128GB 29 | speed: 2933mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v25/fox_2020_05_10.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 12m36.299113191s (43.3 MiB/s) 4 | seal: preCommit phase 1: 44h13m44.422062923s (211 KiB/s) 5 | seal: preCommit phase 2: 1h42m1.837765371s (5.35 MiB/s) 6 | seal: commit phase 1: 2m27.675196488s (222 MiB/s) 7 | seal: commit phase 2: 53m25.031384665s (10.2 MiB/s) 8 | seal: verify: 77.12948ms 9 | unseal: 10.209698ms (3.06 TiB/s) 10 | generate candidates: 670.321µs (46.6 TiB/s) 11 | compute winnnig post proof (cold): 12.213374564s 12 | compute winnnig post proof (hot): 5.37845871s 13 | verify winnnig post proof (cold): 166.71767ms 14 | verify winnnig post proof (hot): 62.22412ms 15 | compute window post proof (cold): 26m29.699457251s 16 | compute window post proof (hot): 26m53.553452435s 17 | verify window post proof (cold): 10.48191964s 18 | verify window post proof (hot): 4.038807441s 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7742 22 | cores: 64 23 | speed: 2.25GHz/3.4GHz 24 | gpu: 25 | brand: NVidia 26 | model: GTX 2080Ti 27 | ram: 28 | amount: 256GB 29 | speed: 2666mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v25/fox_2020_05_13.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 23m47.437894543s (23 MiB/s) 4 | seal: preCommit phase 1: 30h42m31.945030619s (304 KiB/s) 5 | seal: preCommit phase 2: 1h49m35.660496837s (4.98 MiB/s) 6 | seal: commit phase 1: 6m59.855197602s (78 MiB/s) 7 | seal: commit phase 2: 1h22m8.710508361s (6.65 MiB/s) 8 | seal: verify: 93.261848ms 9 | unseal: 42.898975ms (746 GiB/s) 10 | generate candidates: 1.132958ms (27.6 TiB/s) 11 | compute winnnig post proof (cold): 25.440274919s 12 | compute winnnig post proof (hot): 5.346026229s 13 | verify winnnig post proof (cold): 125.197896ms 14 | verify winnnig post proof (hot): 42.810912ms 15 | compute window post proof (cold): 34m37.943049643s 16 | compute window post proof (hot): 48m8.335609564s 17 | verify window post proof (cold): 10.879803436s 18 | verify window post proof (hot): 4.135136369s 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7742 22 | cores: 64 23 | speed: 2.25GHz/3.4GHz 24 | gpu: 25 | brand: NVidia 26 | model: GTX 2080Ti 27 | ram: 28 | amount: 256GB 29 | speed: 2666mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v25/lanzafame_2020_04_15.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 8m32.098135127s (64 MiB/s) 4 | seal: preCommit phase 1: 5h17m24.790511522s (1.72 MiB/s) 5 | seal: preCommit phase 2: 53m56.186239453s (10.1 MiB/s) 6 | seal: commit phase 1: 782.348549ms (40.9 GiB/s) 7 | seal: commit phase 2: 1h37m31.133891185s (5.6 MiB/s) 8 | seal: verify: 87.856293ms 9 | unseal: 1.953986ms (16 TiB/s) 10 | generate candidates: 633.905µs (49.3 TiB/s) 11 | compute winnnig post proof (cold): 6.232044046s 12 | compute winnnig post proof (hot): 6.158606358s 13 | verify winnnig post proof (cold): 78.188576ms 14 | verify winnnig post proof (hot): 35.714479ms 15 | compute window post proof (cold): 32m2.131491298s 16 | compute window post proof (hot): 32m1.883302139s 17 | verify window post proof (cold): 10.549946313s 18 | verify window post proof (hot): 4.092338512s 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7702P 22 | cores: 64 23 | speed: 2.0GHz/3.5GHz 24 | gpu: 25 | brand: none 26 | model: none 27 | ram: 28 | amount: 128GB 29 | speed: 2933mhz/2666mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v25/lanzafame_2020_04_18.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 9m7.632161054s (59.8 MiB/s) 4 | seal: preCommit phase 1: 6h38m45.484945499s (1.37 MiB/s) 5 | seal: preCommit phase 2: 4h9m17.072368154s (2.19 MiB/s) 6 | seal: commit phase 1: 1m22.252252314s (398 MiB/s) 7 | seal: commit phase 2: 56m58.61967175s (9.59 MiB/s) 8 | seal: verify: 72.790272ms 9 | unseal: 26.331526ms (1.19 TiB/s) 10 | generate candidates: 136.06µs (230 TiB/s) 11 | compute winnnig post proof (cold): 11.827111725s 12 | compute winnnig post proof (hot): 8.346984357s 13 | verify winnnig post proof (cold): 95.603945ms 14 | verify winnnig post proof (hot): 37.435814ms 15 | compute window post proof (cold): 25m35.285944104s 16 | compute window post proof (hot): 25m4.347243048s 17 | verify window post proof (cold): 11.389335106s 18 | verify window post proof (hot): 4.304758849s 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7352 22 | cores: 48 23 | speed: 2.3GHz/3.2GHz 24 | gpu: 25 | brand: NVidia 26 | model: TITAN RTX 27 | ram: 28 | amount: 330GB 29 | speed: 2933mhz/2666mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v25/magik6k_2020_04_22.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v25) (34359738368) 3 | seal: addPiece: 6m20.543986369s (86.1 MiB/s) 4 | seal: preCommit phase 1: 4h1m8.224702368s (2.26 MiB/s) 5 | seal: preCommit phase 2: 51m39.544253002s (10.6 MiB/s) 6 | seal: commit phase 1: 5.540288059s (5.78 GiB/s) 7 | seal: commit phase 2: 49m16.317979286s (11.1 MiB/s) 8 | seal: verify: 63.770154ms 9 | unseal: 4.51431ms (6.92 TiB/s) 10 | generate candidates: 466.98µs (66.9 TiB/s) 11 | compute winnnig post proof (cold): 10.398601284s 12 | compute winnnig post proof (hot): 10.214917749s 13 | verify winnnig post proof (cold): 107.44444ms 14 | verify winnnig post proof (hot): 27.961953ms 15 | compute window post proof (cold): 18m13.090480375s 16 | compute window post proof (hot): 18m6.556854874s 17 | verify window post proof (cold): 8.094404887s 18 | verify window post proof (hot): 3.138091822s 19 | cpu: 20 | brand: AMD 21 | model: Ryzen Threadripper 3970X 22 | cores: 32 23 | speed: 3.7GHz/4.5GHz 24 | gpu: 25 | brand: NVidia 26 | model: GTX 2080Ti 27 | ram: 28 | amount: 128GB 29 | speed: 2133mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v26/fox_2020_05_18.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v26) (34359738368) 3 | seal: addPiece: 8m3.210257941s (67.8 MiB/s) 4 | seal: preCommit phase 1: 5h25m13.055287309s (1.68 MiB/s) 5 | seal: preCommit phase 2: 2h49m30.0961974s (3.22 MiB/s) 6 | seal: commit phase 1: 2m32.590813317s (215 MiB/s) 7 | seal: commit phase 2: 36m14.5944349s (15.1 MiB/s) 8 | seal: verify: 238.103348ms 9 | unseal: 4h40m32.367678295s (1.95 MiB/s) 10 | 11 | generate candidates: 2.200829ms (14.2 TiB/s) 12 | compute winnnig post proof (cold): 15.282231736s 13 | compute winnnig post proof (hot): 4.956299841s 14 | verify winnnig post proof (cold): 245.226732ms 15 | verify winnnig post proof (hot): 229.816889ms 16 | 17 | compute window post proof (cold): 26m44.435773677s 18 | compute window post proof (hot): 19m46.729655759s 19 | verify window post proof (cold): 6.679488157s 20 | verify window post proof (hot): 281.55848ms 21 | cpu: 22 | brand: AMD 23 | model: EPYC 7742 24 | cores: 64 25 | speed: 2.25GHz/3.4GHz 26 | gpu: 27 | brand: NVidia 28 | model: GTX 2080Ti 29 | ram: 30 | amount: 256GB 31 | speed: 2666mhz 32 | -------------------------------------------------------------------------------- /benchmarks/v27/ac_2020_06_07.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v27) (34359738368) 3 | seal: addPiece: 11m23.386587091s (47.95 MiB/s) 4 | seal: preCommit phase 1: 4h38m1.42167023s (1.964 MiB/s) 5 | seal: preCommit phase 2: 1h0m23.047204389s (9.044 MiB/s) 6 | seal: commit phase 1: 289.146823ms (110.7 GiB/s) 7 | seal: commit phase 2: 49m21.115617954s (11.07 MiB/s) 8 | seal: verify: 34.871657ms 9 | unseal: 4h44m28.076093125s (1.92 MiB/s) 10 | 11 | generate candidates: 126.905µs (246.2 TiB/s) 12 | compute winning post proof (cold): 11.869260407s 13 | compute winning post proof (hot): 10.79857521s 14 | verify winning post proof (cold): 55.084485ms 15 | verify winning post proof (hot): 20.040563ms 16 | 17 | compute window post proof (cold): 13m58.004095486s 18 | compute window post proof (hot): 13m36.090409876s 19 | verify window post proof (cold): 6.3455919s 20 | verify window post proof (hot): 58.62706ms 21 | cpu: 22 | brand: AMD 23 | model: EPYC 7542 24 | cores: 32 25 | speed: 2.9GHz/3.4GHz 26 | gpu: 27 | brand: NVidia 28 | model: RTX 2080Ti 29 | ram: 30 | amount: 512GB 31 | speed: 2666mhz 32 | -------------------------------------------------------------------------------- /benchmarks/v27/bmh_05_07_2020.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v27) (34359738368) 3 | seal: addPiece: 13m6.712383418s (41.65 MiB/s) 4 | seal: preCommit phase 1: 5h5m53.590766902s (1.785 MiB/s) 5 | seal: preCommit phase 2: 1h57m39.361887764s (4.642 MiB/s) 6 | seal: commit phase 1: 624.848039ms (51.21 GiB/s) 7 | seal: commit phase 2: 57m3.963723596s (9.57 MiB/s) 8 | seal: verify: 33.504883ms 9 | unseal: 5h4m3.729988813s (1.796 MiB/s) 10 | generate candidates: 1.719026ms (18.18 TiB/s) 11 | compute winning post proof (cold): 5.386421407s 12 | compute winning post proof (hot): 5.229740682s 13 | verify winning post proof (cold): 50.445683ms 14 | verify winning post proof (hot): 12.892574ms 15 | compute window post proof (cold): 8m15.138402998s 16 | compute window post proof (hot): 7m52.871953554s 17 | verify window post proof (cold): 6.457152829s 18 | verify window post proof (hot): 53.195688ms 19 | cpu: 20 | brand: AMD 21 | model: EPYC 7302P 22 | cores: 16 23 | speed: 3.0GHz/3.3GHz 24 | gpu: 25 | brand: NVidia 26 | model: Titan V 27 | ram: 28 | amount: 256GB 29 | speed: 2666mhz 30 | -------------------------------------------------------------------------------- /benchmarks/v27/cory_2020_07_14.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v27) (34359738368) 3 | seal: addPiece: 14m51.374909192s (36.76 MiB/s) 4 | seal: preCommit phase 1: 4h5m58.473905301s (2.22 MiB/s) 5 | seal: preCommit phase 2: 1h8m50.466145925s (7.933 MiB/s) 6 | seal: commit phase 1: 1.588983065s (20.14 GiB/s) 7 | seal: commit phase 2: 1h15m16.460006921s (7.255 MiB/s) 8 | seal: verify: 30.126025ms 9 | unseal: 4h2m44.239151363s (2.25 MiB/s) 10 | 11 | generate candidates: 13.002161ms (2.403 TiB/s) 12 | compute winning post proof (cold): 5.740997721s 13 | compute winning post proof (hot): 4.635926719s 14 | verify winning post proof (cold): 65.640084ms 15 | verify winning post proof (hot): 14.520851ms 16 | 17 | compute window post proof (cold): 10m47.271999112s 18 | compute window post proof (hot): 10m24.417988839s 19 | verify window post proof (cold): 5.033802105s 20 | verify window post proof (hot): 74.871781ms 21 | 22 | cpu: 23 | brand: AMD 24 | model: AMD Threadripper 3960X 25 | cores: 24 26 | speed: 2.0GHz/3.5GHz 27 | gpu: 28 | brand: NVidia 29 | model: Quadro RTX 4000 30 | ram: 31 | amount: 256GB 32 | speed: 2667mhz 33 | -------------------------------------------------------------------------------- /benchmarks/v27/whyrusleeping_2020_07_16.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v27) (34359738368) 3 | seal: addPiece: 12m59.93253756s (42.01 MiB/s) 4 | seal: preCommit phase 1: 4h49m47.796749255s (1.885 MiB/s) 5 | seal: preCommit phase 2: 27m19.548066339s (19.99 MiB/s) 6 | seal: commit phase 1: 574.728848ms (55.68 GiB/s) 7 | seal: commit phase 2: 55m53.890646097s (9.77 MiB/s) 8 | seal: verify: 56.223189ms 9 | unseal: 4h51m53.434738511s (1.871 MiB/s) 10 | 11 | generate candidates: 16.481544ms (1.896 TiB/s) 12 | compute winning post proof (cold): 15.398747713s 13 | compute winning post proof (hot): 14.753099983s 14 | verify winning post proof (cold): 62.049453ms 15 | verify winning post proof (hot): 24.14642ms 16 | 17 | compute window post proof (cold): 7m6.264518672s 18 | compute window post proof (hot): 6m53.931852318s 19 | verify window post proof (cold): 6.49664701s 20 | verify window post proof (hot): 94.84985ms 21 | cpu: 22 | brand: AMD 23 | model: EPYC 7402 24 | cores: 24 25 | speed: 2.8GHz/3.5GHz 26 | gpu: 27 | brand: NVidia 28 | model: GTX 2080Ti 29 | ram: 30 | amount: 1TiB 31 | speed: 2933mhz 32 | -------------------------------------------------------------------------------- /benchmarks/v28/frankpfeift_2021_04_16.yaml: -------------------------------------------------------------------------------- 1 | rawBench: | 2 | results (v28) SectorSize:(34359738368), SectorNumber:(1) 3 | seal: addPiece: 1m3.712436009s (514.3 MiB/s) 4 | seal: preCommit phase 1: 3h10m11.910007976s (2.871 MiB/s) 5 | seal: preCommit phase 2: 18m50.42096215s (28.99 MiB/s) 6 | seal: commit phase 1: 477.714659ms (66.99 GiB/s) 7 | seal: commit phase 2: 20m11.316476597s (27.05 MiB/s) 8 | seal: verify: 9.002198ms 9 | unseal: 3h11m37.989526053s (2.85 MiB/s) 10 | 11 | generate candidates: 2.880312ms (10.85 TiB/s) 12 | compute winning post proof (cold): 1.274439161s 13 | compute winning post proof (hot): 1.09963742s 14 | verify winning post proof (cold): 74.431143ms 15 | verify winning post proof (hot): 3.132117ms 16 | 17 | compute window post proof (cold): 3m52.828041419s 18 | compute window post proof (hot): 3m27.255838351s 19 | verify window post proof (cold): 7.209445054s 20 | verify window post proof (hot): 13.471677ms 21 | cpu: 22 | brand: AMD 23 | model: Threadripper 3960X 24 | cores: 24 25 | speed: 2.2GHz/3.8Hz 26 | gpu: 27 | brand: NVidia 28 | model: RTX 3080 29 | ram: 30 | amount: 256GiB 31 | speed: 2666mhz 32 | -------------------------------------------------------------------------------- /components/Footer.js: -------------------------------------------------------------------------------- 1 | const Footer = () => { 2 | return ( 3 |
4 | 12 | 26 |
27 | ); 28 | }; 29 | 30 | export default Footer; 31 | -------------------------------------------------------------------------------- /components/Result.js: -------------------------------------------------------------------------------- 1 | const timeStringFromMs = (ms) => { 2 | const times = { 3 | HOUR: 1000 * 60 * 60, 4 | MINUTE: 1000 * 60, 5 | SECOND: 1000, 6 | }; 7 | const hours = Math.floor(ms / times.HOUR); 8 | const minutes = Math.floor((ms - hours * times.HOUR) / times.MINUTE); 9 | const seconds = Math.floor( 10 | (ms - hours * times.HOUR - minutes * times.MINUTE) / times.SECOND 11 | ); 12 | return `${hours ? hours + 'h' : ''} ${minutes ? minutes + 'm' : ''} ${ 13 | seconds ? seconds + 's' : '' 14 | }`; 15 | }; 16 | 17 | const Result = ({ benchmark }) => { 18 | return ( 19 |
20 |
21 | 22 | 23 | {benchmark.cpu.brand} {benchmark.cpu.model} 24 | 25 | 26 | 27 | {benchmark.gpu.brand !== 'none' 28 | ? benchmark.gpu.brand + ' ' + benchmark.gpu.model 29 | : 'None'} 30 | 31 | 32 | 33 | {benchmark.ram.amount} {benchmark.ram.speed} 34 | 35 |
36 |
37 |
38 |

39 | Seal 32GiB 40 |

41 |
42 | {timeStringFromMs(benchmark.stats.sealTimeMs)} 43 |
44 |
45 |
46 |

WinningPoSt

47 |
48 | {timeStringFromMs(benchmark.stats.winningPostTimeMs)} 49 |
50 |
51 |
52 |

WindowPoSt

53 |
54 | {timeStringFromMs(benchmark.stats.windowPostTimeMs)} 55 |
56 | 119 |
120 | ); 121 | }; 122 | 123 | export default Result; 124 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "filecoin-bench", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start", 9 | "export": "next export", 10 | "parse-data": "node utils/getBenchmarks.js" 11 | }, 12 | "dependencies": { 13 | "next": "9.3.5", 14 | "react": "16.13.1", 15 | "react-dom": "16.13.1", 16 | "yaml": "^1.8.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import Head from 'next/head'; 3 | import Result from '../components/Result'; 4 | import Footer from '../components/Footer'; 5 | 6 | import v27 from '../data/v27.json'; 7 | 8 | export default (props) => { 9 | const [activeVersion, setActiveVersion] = useState('v27'); 10 | const [filterBy, setFilterBy] = useState('sealing'); 11 | 12 | return ( 13 |
14 | 15 | Filecoin Benchmarks 16 | 17 | 18 | 19 |
20 |

Filecoin Benchmarks

21 | 22 |

23 | Hardware performance comparisons from the Filecoin community 24 |

25 |

v27 proofs, last updated {props.updateTime}

26 | 27 |

28 | Filecoin is under active development and hardware combinations will 29 | change after future upgrades. 30 |

31 | 32 |

33 | ↑↓ 34 | setFilterBy('sealing')} 38 | > 39 | Sealing 40 | 41 | setFilterBy('winningPost')} 45 | > 46 | WinningPoST 47 | 48 | setFilterBy('windowPost')} 52 | > 53 | WindowPoST 54 | 55 |

56 | 57 |
58 | {v27 59 | .filter((benchmark) => benchmark.stats.version === activeVersion) 60 | .sort((a, b) => { 61 | if (filterBy == 'sealing') 62 | return a.stats.sealTimeMs - b.stats.sealTimeMs; 63 | if (filterBy == 'winningPost') 64 | return a.stats.winningPostTimeMs - b.stats.winningPostTimeMs; 65 | if (filterBy == 'windowPost') 66 | return a.stats.windowPostTimeMs - b.stats.windowPostTimeMs; 67 | }) 68 | .map((benchmark) => ( 69 | 70 | ))} 71 |
72 |
73 | 74 |
176 | ); 177 | }; 178 | 179 | export const getStaticProps = async (ctx) => { 180 | const updateTime = new Date().toLocaleDateString('en-us'); 181 | return { 182 | props: { 183 | updateTime, 184 | }, 185 | }; 186 | }; 187 | -------------------------------------------------------------------------------- /public/cpu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | cpu 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/filecoin-project/benchmarks/36016a55eafd43b46ffe1f95948aa41d6531f4ce/public/favicon.ico -------------------------------------------------------------------------------- /public/monitor.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | monitor 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/ram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ram 5 | Created with Sketch. 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/zeit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /utils/getBenchmarks.js: -------------------------------------------------------------------------------- 1 | const yaml = require('yaml'); 2 | const { exit } = require('process'); 3 | 4 | const { 5 | existsSync, 6 | mkdirSync, 7 | readdirSync, 8 | readFileSync, 9 | writeFileSync, 10 | } = require('fs'); 11 | 12 | const getDirectories = (source) => 13 | readdirSync(source, { withFileTypes: true }) 14 | .filter((entry) => entry.isDirectory()) 15 | .map((entry) => entry.name); 16 | 17 | const getFiles = (dir) => readdirSync(dir); 18 | 19 | const getTime = (bench) => { 20 | // total ms represented by human readable benchmark time 21 | const getMicroseconds = (b) => { 22 | const res = /([0-9\.]+)µs/.exec(b); 23 | return (res && parseFloat(res[1]) / 1000) || 0; 24 | }; 25 | const getMilliseconds = (b) => { 26 | const res = /([0-9\.]+)ms/.exec(b); 27 | return (res && parseFloat(res[1])) || 0; 28 | }; 29 | const getSeconds = (b) => { 30 | const res = /([0-9\.]+)s/.exec(b); 31 | return (res && parseFloat(res[1]) * 1000) || 0; 32 | }; 33 | const getMinutes = (b) => { 34 | const res = /([0-9\.]+)m[^s]/.exec(b); 35 | return (res && parseFloat(res[1]) * 1000 * 60) || 0; 36 | }; 37 | const getHours = (b) => { 38 | const res = /([0-9\.]+)h/.exec(b); 39 | return (res && parseFloat(res[1]) * 1000 * 60 * 60) || 0; 40 | }; 41 | return [getMicroseconds, getMilliseconds, getSeconds, getMinutes, getHours] 42 | .map((fn) => fn(bench)) 43 | .reduce((sum, acc) => sum + acc, 0); 44 | }; 45 | 46 | const parseStats = (rawBench) => { 47 | const lines = rawBench.split('\n').filter((line) => line.length > 5); 48 | if (!lines.length === 17) { 49 | console.error('Invalid parse on benchmark', rawBench); 50 | exit(1); 51 | } 52 | const version = lines[0].split(' ')[1].slice(1, 4); 53 | 54 | const sealLines = [1, 2, 3, 4, 5, 6]; 55 | const winningPostLines = [8, 9]; 56 | const windowPostLines = [13]; 57 | 58 | const sealTimeMs = sealLines 59 | .map((line) => getTime(lines[line])) 60 | .reduce((sum, acc) => sum + acc); 61 | 62 | const winningPostTimeMs = winningPostLines 63 | .map((line) => getTime(lines[line])) 64 | .reduce((sum, acc) => sum + acc); 65 | 66 | const windowPostTimeMs = windowPostLines 67 | .map((line) => getTime(lines[line])) 68 | .reduce((sum, acc) => sum + acc); 69 | 70 | return { 71 | version, 72 | sealTimeMs, 73 | winningPostTimeMs, 74 | windowPostTimeMs, 75 | }; 76 | }; 77 | 78 | getDirectories('benchmarks').forEach((dir) => { 79 | const files = getFiles(`benchmarks/${dir}`) 80 | .map((file) => readFileSync(`benchmarks/${dir}/${file}`).toString()) 81 | .map((contents) => yaml.parse(contents)) 82 | .map((benchmark, index) => ({ 83 | index, 84 | ...benchmark, 85 | stats: parseStats(benchmark.rawBench), 86 | })); 87 | if (!existsSync('data')) { 88 | mkdirSync('data'); 89 | } 90 | writeFileSync(`data/${dir}.json`, JSON.stringify(files)); 91 | }); 92 | --------------------------------------------------------------------------------