All times for min
, max
, average
and median
are in microseconds, and length
is in bytes. Benchmarks results include writing, reading, and pruning of 3GiB (3 * 1024 * 1024 * 1024
) of data on both HDD and SSD with a block size distribution from mainnet. See the PR at bcoin-org/bcoin#703 for further details.
real 0m6.444s
user 0m4.610s
sys 0m3.884s
write
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 100.72 1812.34 150.43 124.85
512 178 102.26 470.16 151.76 127.75
1024 120 105.08 13351.88 323.45 129.93
2048 119 104.60 703.96 154.73 126.25
4096 239 103.35 575.13 141.76 125.53
8192 179 110.27 993.30 161.38 129.55
16384 239 110.28 682.09 151.07 131.38
32768 300 116.75 3396.24 165.02 139.82
65536 418 132.69 526.17 177.23 157.50
131072 479 156.31 7718.77 241.31 187.72
262144 776 201.69 2291.07 268.61 241.63
524288 537 300.91 4138.30 445.93 345.38
1048576 1436 498.00 21206.67 674.65 562.53
2097152 418 905.43 23923.71 1220.30 995.00
4194304 59 1743.55 32011.55 2828.09 1881.79
read
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 51.55 2862.66 92.89 69.93
512 178 56.89 1349.59 131.24 70.95
1024 120 58.20 317.30 92.53 74.84
2048 119 53.76 167.88 75.29 67.85
4096 239 55.13 453.58 76.27 67.39
8192 179 57.37 181.22 80.42 72.87
16384 239 57.61 264.94 75.14 70.12
32768 300 59.65 1129.43 110.21 72.88
65536 418 65.96 405.17 88.86 81.63
131072 479 76.79 2157.18 107.01 93.41
262144 776 95.14 543.62 133.97 123.36
524288 537 139.87 3203.51 239.24 171.34
1048576 1436 227.71 3296.53 337.77 273.77
2097152 418 413.86 3865.80 584.98 491.08
4194304 59 867.75 2518.78 983.50 951.28
randomread
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 970 53.96 934.49 81.42 67.28
512 181 56.28 890.34 85.63 65.94
1024 114 57.89 812.60 81.37 68.01
2048 121 57.39 172.02 78.06 68.52
4096 265 56.06 848.71 82.91 67.87
8192 180 57.48 224.56 78.51 69.80
16384 245 58.57 824.73 86.63 70.30
32768 292 59.21 878.96 93.12 76.49
65536 408 67.92 793.36 94.32 80.66
131072 413 75.77 2776.63 118.03 96.03
262144 776 100.19 2534.33 143.43 124.61
524288 570 142.61 2894.95 214.64 179.01
1048576 1437 227.91 3280.36 335.88 287.70
2097152 412 414.52 3293.55 599.44 513.64
4194304 72 827.11 3873.58 1114.11 981.33
prune
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 42.23 17264.67 143.41 51.76
512 178 42.68 122.64 54.82 51.69
1024 120 43.23 14003.08 171.51 52.05
2048 119 43.26 99.67 53.61 52.06
4096 239 41.73 111.29 55.22 52.31
8192 179 42.24 127.29 55.99 51.70
16384 239 42.49 14010.97 111.95 51.70
32768 300 41.89 16890.39 117.23 51.84
65536 418 41.47 13906.57 94.03 51.43
131072 479 41.77 1658.97 57.87 51.21
262144 776 41.65 17057.62 156.97 51.74
524288 537 41.76 13911.95 82.23 51.66
1048576 1436 41.63 14073.57 96.78 51.68
2097152 418 42.35 17042.90 245.06 52.01
4194304 59 43.57 146.10 58.86 52.45
real 1m18.667s
user 1m0.571s
sys 0m12.097s
write
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 2.16 118.58 6.25 4.92
512 178 2.57 29.24 6.75 5.34
1024 120 2.62 32.79 7.18 6.42
2048 119 2.46 43.68 6.76 5.74
4096 239 3.06 259.57 8.34 5.78
8192 179 3.36 51.03 11.15 8.64
16384 239 4.57 980.70 18.70 12.19
32768 300 5.82 76.36 23.15 20.50
65536 418 7.89 182.68 43.08 39.08
131072 479 14.28 2501.99 91.56 78.03
262144 776 19.28 2557.29 167.70 151.61
524288 537 171.53 821.08 313.96 297.18
1048576 1436 315.25 2851.00 625.39 604.01
2097152 418 693.75 2453.87 1243.42 1214.27
4194304 59 1408.85 2836.47 2245.90 2385.79
read
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 37.31 7222.07 481.91 325.74
512 178 53.91 1988.75 405.28 327.73
1024 120 68.58 2114.06 431.77 241.50
2048 119 30.69 1915.42 444.20 263.80
4096 239 22.40 1945.26 131.07 113.92
8192 179 36.22 1009.67 132.82 123.43
16384 239 41.16 546.59 128.32 122.96
32768 300 49.18 2104.29 144.84 129.72
65536 418 55.76 3722.84 233.74 152.38
131072 479 99.86 4225.13 284.04 194.09
262144 776 150.35 1295.02 293.16 281.58
524288 537 283.50 1427.58 472.50 451.48
1048576 1436 221.45 65334959.75 46323.22 805.27
2097152 418 1286.14 6016.08 1581.52 1550.04
4194304 59 2704.32 5020.02 3093.24 3026.03
randomread
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 978 24.80 3404.31 409.35 281.40
512 175 32.42 1963.70 401.21 302.33
1024 118 39.42 3280.89 410.81 235.35
2048 110 46.95 2059.27 484.11 340.69
4096 259 26.41 2956.46 146.59 120.93
8192 154 32.25 2721.12 193.83 122.65
16384 226 29.72 2892.59 155.79 125.61
32768 306 37.83 2665.05 160.96 133.87
65536 402 58.31 3135.72 177.19 156.03
131072 448 93.62 2819.67 238.93 198.85
262144 776 86.95 3960.49 304.98 280.61
524288 547 205.03 4572.79 473.30 453.26
1048576 1458 329.52 2997.70 829.24 807.41
2097152 442 1248.43 3193.06 1550.38 1530.98
4194304 57 2630.97 3989.66 3072.72 3067.96
prune
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 40.84 5005.86 513.62 403.96
512 178 44.46 1996.12 445.74 426.13
1024 120 92.69 2088.04 503.08 397.39
2048 119 37.86 4111.10 464.45 309.05
4096 239 37.10 486.65 159.30 123.30
8192 179 39.85 3194.07 215.78 170.28
16384 239 45.23 482.02 151.93 133.48
32768 300 36.92 413.02 148.64 129.73
65536 418 67.25 3351.12 252.80 175.78
131072 479 98.84 3000.35 303.77 234.00
262144 776 172.77 690.03 340.08 313.82
524288 537 180.09 2150.12 531.66 479.48
1048576 1436 270.44 3052.51 845.20 793.21
2097152 418 1244.68 3565.65 1540.42 1473.68
4194304 59 2534.63 4184.49 2911.20 2872.00
real 0m22.239s
user 0m6.652s
sys 0m6.436s
write
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 86.45 11904.65 445.58 371.32
512 178 86.87 30917.71 725.49 380.82
1024 120 89.39 1605.19 524.85 434.94
2048 119 91.57 2147.87 470.10 411.90
4096 239 89.77 1367.99 414.97 377.24
8192 179 92.07 3730.56 461.29 386.13
16384 239 96.28 6751.55 443.23 390.10
32768 300 98.04 16183.88 517.54 406.74
65536 418 111.36 18636.28 610.94 470.07
131072 479 127.33 18111.07 712.01 534.94
262144 776 166.89 20034.34 795.98 686.42
524288 537 243.51 4059553.68 9827.23 969.31
1048576 1436 392.16 50749.64 3199.61 1570.70
2097152 418 696.82 88270.60 9984.39 2847.36
4194304 59 1378.86 54015.30 10029.08 5119.89
read
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 48.82 2293.95 91.67 61.34
512 178 50.13 1460.04 104.26 60.94
1024 120 52.21 390.27 96.77 85.00
2048 119 50.31 385.00 75.99 60.50
4096 239 50.46 405.19 78.73 60.74
8192 179 52.61 397.52 85.31 66.92
16384 239 52.89 421.08 77.66 64.04
32768 300 58.32 1388.22 103.76 68.34
65536 418 65.66 497.15 97.74 78.64
131072 479 83.02 616.19 114.22 95.85
262144 776 111.86 1037.85 155.56 135.38
524288 537 183.19 3866.04 311.28 214.02
1048576 1436 323.55 4794.65 479.79 390.10
2097152 418 656.60 10669.00 898.68 749.95
4194304 59 1296.47 3061.66 1469.63 1435.95
randomread
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 987 51.31 2044.81 78.53 59.54
512 170 51.43 2673.27 97.66 63.50
1024 111 51.70 2462.73 101.38 61.64
2048 111 54.77 263.80 76.47 60.89
4096 217 54.41 477.26 81.42 81.45
8192 154 54.20 216.61 75.00 61.09
16384 243 56.56 531.67 84.31 65.75
32768 340 60.68 540.41 84.14 67.94
65536 371 68.92 1076.17 94.92 79.10
131072 514 83.38 2674.25 115.00 92.90
262144 794 112.64 4088.67 172.95 134.46
524288 524 173.21 3490.74 274.18 214.65
1048576 1455 312.87 4022.44 449.69 383.74
2097152 407 604.45 4288.85 794.64 729.73
4194304 58 1249.94 4300.98 1462.14 1409.52
prune
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 35.99 14508.24 111.61 40.19
512 178 36.41 736.78 51.66 39.74
1024 120 36.26 13191.27 153.29 39.83
2048 119 36.40 277.58 43.96 39.61
4096 239 36.29 142.58 42.62 40.05
8192 179 36.36 495.44 45.12 40.30
16384 239 36.25 12070.51 94.24 39.95
32768 300 36.18 12249.83 84.54 40.05
65536 418 35.24 12531.98 78.81 40.11
131072 479 36.03 909.12 48.12 40.08
262144 776 35.98 14972.59 135.02 40.17
524288 537 36.00 12828.62 70.95 40.08
1048576 1436 35.89 560783.63 464.45 40.09
2097152 418 36.21 14886.01 200.19 40.18
4194304 59 36.08 276.00 46.28 40.68
real 3m5.204s
user 1m11.664s
sys 0m11.664s
write
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 2.03 140.43 4.67 3.92
512 178 2.34 22.26 4.89 4.24
1024 120 2.91 28.79 5.46 5.05
2048 119 2.68 18.14 5.39 4.80
4096 239 2.81 30.39 5.67 4.89
8192 179 3.21 63.58 8.51 6.80
16384 239 3.36 863.24 14.13 9.66
32768 300 4.10 38.10 17.02 16.44
65536 418 9.56 131.93 31.22 30.20
131072 479 9.85 2132.66 64.40 59.16
262144 776 74.03 2569.56 122.72 116.60
524288 537 139.84 2024.19 233.21 229.43
1048576 1436 246.29 3756.77 461.99 457.19
2097152 418 569.27 1552.00 905.94 917.26
4194304 59 1106.44 2451.02 1757.21 1848.71
read
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 28.11 5044.64 510.74 301.43
512 178 64.59 2015.34 410.66 318.68
1024 120 72.09 3294.69 426.51 270.92
2048 119 35.39 2120.42 434.69 321.36
4096 239 27.15 1140.52 141.55 116.14
8192 179 38.89 998.17 150.82 134.88
16384 239 31.47 1070.54 143.11 123.82
32768 300 48.75 1013.44 146.30 132.01
65536 418 61.10 5101.94 275.46 161.16
131072 479 99.78 5994.58 312.32 207.00
262144 776 170.81 1197.88 308.98 292.81
524288 537 204.76 2199.67 502.43 474.42
1048576 1436 245.57 171963533.47 120645.23 855.69
2097152 418 1196.84 4259.23 1732.00 1667.16
4194304 59 2776.82 4133.37 3365.77 3252.63
randomread
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 917 18.26 3124.99 416.64 285.15
512 174 23.60 3308.71 464.01 283.65
1024 130 34.21 1961.63 353.68 210.39
2048 139 23.19 1917.08 363.47 267.93
4096 211 20.78 2985.80 161.22 110.75
8192 186 24.08 2384.76 135.83 113.87
16384 253 25.93 3197.47 140.82 120.70
32768 302 27.92 2682.49 154.18 129.15
65536 434 31.25 3002.24 192.68 152.41
131072 452 56.94 2666.14 205.99 191.11
262144 760 126.61 4782.40 316.02 276.90
524288 585 134.31 4686.43 469.54 445.20
1048576 1451 215.59 5173.17 857.37 829.56
2097152 413 565.01 4978.11 1651.56 1603.94
4194304 49 2838.59 6676.99 3450.81 3233.71
prune
=====================================================================================
length operations min max average median
-------------------------------------------------------------------------------------
256 959 34.48 3436.97 462.07 325.07
512 178 33.91 1912.31 381.12 325.89
1024 120 47.27 3149.44 442.21 314.73
2048 119 42.30 2900.58 388.82 274.87
4096 239 34.28 1072.30 119.78 98.80
8192 179 37.77 694.91 154.28 136.70
16384 239 39.51 376.90 120.12 110.65
32768 300 45.97 436.88 128.04 110.00
65536 418 64.57 3426.78 220.88 143.42
131072 479 89.64 5142.17 265.80 193.96
262144 776 167.39 2203.09 301.35 280.47
524288 537 299.84 3371.18 504.70 450.28
1048576 1436 433.66 4188.02 854.50 803.35
2097152 418 642.75 5329.88 1694.86 1598.88
4194304 59 2734.20 4471.03 3256.74 3094.22
These benchmarks were made on February 25th, 2019 using with commits 80c179b6d71ce3aa4c5fe64d38541d503a59eec6 and 1fa7eced70765af0ebfb01b144c2438751caf42b from bcoin-org/bcoin#703
Note: These benchmarks did not await
for the write to finish for LevelBlockStore
, and results are not accurate for write times in that case. See the updated graphs at bcoin-org/bcoin#703 (comment).