Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.42k stars 3.4k forks source link

Make e2e benchmarks more stable #6927

Closed SiarheiFedartsou closed 5 months ago

SiarheiFedartsou commented 5 months ago

I realised that locust is not right tool for my initial intention for these end-to-end tests: I just wanted to measure performance metrics for singular requests, but locust is designed to measure performance of services under load (roughly speaking to answer the question "how many clients my backend can serve simultaneously?"), so I decided to drop it and just write simple script which we run against osrm-routed: it seems to be much more stable (plus we have more control on how this thing works).

Benchmark Results

| Benchmark | Base | PR | |-----------|------|----| | alias | aliased u32: 1088.42
plain u32: 1075.41
aliased double: 976.189
plain double: 987.892 | aliased u32: 1092.68
plain u32: 1103.32
aliased double: 949.025
plain double: 948.202 | | e2e_match_ch | Total: 3020.1361179351807ms
Min time: 2.4335384368896484ms
Mean time: 23.054474182711303ms
Median time: 16.14093780517578ms
95th percentile: 74.6084451675415ms
99th percentile: 90.31732082366939ms
Max time: 101.44424438476562ms | Total: 3010.5719566345215ms
Min time: 2.584218978881836ms
Mean time: 22.981465317820774ms
Median time: 16.167879104614258ms
95th percentile: 73.68934154510498ms
99th percentile: 89.740252494812ms
Max time: 101.81188583374023ms | | e2e_match_mld | Total: 2053.5194873809814ms
Min time: 1.9218921661376953ms
Mean time: 15.675721277717416ms
Median time: 9.299278259277344ms
95th percentile: 49.50845241546631ms
99th percentile: 58.59007835388179ms
Max time: 67.52562522888184ms | Total: 2024.8019695281982ms
Min time: 2.1724700927734375ms
Mean time: 15.45650358418472ms
Median time: 8.729219436645508ms
95th percentile: 49.01862144470215ms
99th percentile: 58.644270896911536ms
Max time: 67.55566596984863ms | | e2e_nearest_ch | Total: 1370.525598526001ms
Min time: 1.1610984802246094ms
Mean time: 1.370525598526001ms
Median time: 1.2726783752441406ms
95th percentile: 1.774907112121582ms
99th percentile: 1.948857307434082ms
Max time: 2.2411346435546875ms | Total: 1378.0488967895508ms
Min time: 1.1670589447021484ms
Mean time: 1.3780488967895508ms
Median time: 1.2871026992797852ms
95th percentile: 1.8047332763671873ms
99th percentile: 1.8625473976135254ms
Max time: 2.084970474243164ms | | e2e_nearest_mld | Total: 1390.9969329833984ms
Min time: 1.1823177337646484ms
Mean time: 1.3909969329833984ms
Median time: 1.302957534790039ms
95th percentile: 1.8167495727539062ms
99th percentile: 1.887824535369873ms
Max time: 1.9884109497070312ms | Total: 1382.8415870666504ms
Min time: 1.1601448059082031ms
Mean time: 1.3828415870666504ms
Median time: 1.2890100479125977ms
95th percentile: 1.8177270889282227ms
99th percentile: 1.8766164779663086ms
Max time: 1.9295215606689453ms | | e2e_route_ch | Total: 3208.8401317596436ms
Min time: 1.4195442199707031ms
Mean time: 3.2088401317596436ms
Median time: 3.249645233154297ms
95th percentile: 4.2049407958984375ms
99th percentile: 4.689064025878906ms
Max time: 5.119800567626953ms | Total: 3254.8928260803223ms
Min time: 1.4653205871582031ms
Mean time: 3.2548928260803223ms
Median time: 3.3015012741088867ms
95th percentile: 4.264521598815918ms
99th percentile: 4.686849117279053ms
Max time: 5.497217178344727ms | | e2e_route_mld | Total: 3860.1200580596924ms
Min time: 1.3704299926757812ms
Mean time: 3.8601200580596924ms
Median time: 3.88491153717041ms
95th percentile: 5.312168598175049ms
99th percentile: 5.838961601257323ms
Max time: 6.595134735107422ms | Total: 3864.3553256988525ms
Min time: 1.3842582702636719ms
Mean time: 3.8643553256988525ms
Median time: 3.9125680923461914ms
95th percentile: 5.32221794128418ms
99th percentile: 5.737259387969971ms
Max time: 6.646871566772461ms | | e2e_table_ch | Total: 17156.60524368286ms
Min time: 2.0542144775390625ms
Mean time: 17.15660524368286ms
Median time: 16.37256145477295ms
95th percentile: 31.3234806060791ms
99th percentile: 33.16184997558594ms
Max time: 43.32256317138672ms | Total: 17195.815324783325ms
Min time: 2.2089481353759766ms
Mean time: 17.195815324783325ms
Median time: 16.62766933441162ms
95th percentile: 31.308233737945553ms
99th percentile: 33.37952375411987ms
Max time: 34.783124923706055ms | | e2e_table_mld | Total: 65905.26032447815ms
Min time: 4.603385925292969ms
Mean time: 65.90526032447815ms
Median time: 62.540650367736816ms
95th percentile: 127.98451185226439ms
99th percentile: 135.07933139801025ms
Max time: 167.42205619812012ms | Total: 65389.28771018982ms
Min time: 4.3201446533203125ms
Mean time: 65.38928771018982ms
Median time: 62.259793281555176ms
95th percentile: 126.63334608078003ms
99th percentile: 135.02937078475952ms
Max time: 141.98589324951172ms | | e2e_trip_ch | Total: 11596.420049667358ms
Min time: 1.9011497497558594ms
Mean time: 11.596420049667358ms
Median time: 11.13903522491455ms
95th percentile: 19.943320751190186ms
99th percentile: 21.72452688217163ms
Max time: 25.699138641357422ms | Total: 11723.994970321655ms
Min time: 1.718759536743164ms
Mean time: 11.723994970321655ms
Median time: 11.216282844543457ms
95th percentile: 19.947946071624756ms
99th percentile: 22.086760997772217ms
Max time: 28.75804901123047ms | | e2e_trip_mld | Total: 18968.85108947754ms
Min time: 1.9826889038085938ms
Mean time: 18.96885108947754ms
Median time: 18.50736141204834ms
95th percentile: 30.307972431182858ms
99th percentile: 33.10990333557129ms
Max time: 42.36292839050293ms | Total: 18795.0439453125ms
Min time: 1.8734931945800781ms
Mean time: 18.7950439453125ms
Median time: 18.346309661865234ms
95th percentile: 30.144953727722168ms
99th percentile: 32.2248649597168ms
Max time: 36.01717948913574ms | | json-render | String: 6.57991ms
Stringstream: 9.31487ms
Vector: 6.91397ms | String: 6.55007ms
Stringstream: 9.33229ms
Vector: 6.94991ms | | match_ch | Default radius:
4.44212ms/req at 82 coordinate
0.0541722ms/coordinate
Radius 5m:
4.4251ms/req at 82 coordinate
0.0539646ms/coordinate
Radius 10m:
15.4078ms/req at 82 coordinate
0.1879ms/coordinate
Radius 15m:
36.5705ms/req at 82 coordinate
0.445981ms/coordinate
Radius 30m:
313.592ms/req at 82 coordinate
3.82429ms/coordinate | Default radius:
4.42772ms/req at 82 coordinate
0.0539966ms/coordinate
Radius 5m:
4.42033ms/req at 82 coordinate
0.0539065ms/coordinate
Radius 10m:
15.1491ms/req at 82 coordinate
0.184745ms/coordinate
Radius 15m:
36.8513ms/req at 82 coordinate
0.449406ms/coordinate
Radius 30m:
313.921ms/req at 82 coordinate
3.82831ms/coordinate | | match_mld | Default radius:
2.7886ms/req at 82 coordinate
0.0340074ms/coordinate
Radius 5m:
2.7461ms/req at 82 coordinate
0.033489ms/coordinate
Radius 10m:
10.1172ms/req at 82 coordinate
0.123381ms/coordinate
Radius 15m:
25.8181ms/req at 82 coordinate
0.314855ms/coordinate
Radius 30m:
303.603ms/req at 82 coordinate
3.70248ms/coordinate | Default radius:
2.79265ms/req at 82 coordinate
0.0340567ms/coordinate
Radius 5m:
2.75403ms/req at 82 coordinate
0.0335857ms/coordinate
Radius 10m:
10.2031ms/req at 82 coordinate
0.124428ms/coordinate
Radius 15m:
25.8187ms/req at 82 coordinate
0.314862ms/coordinate
Radius 30m:
302.438ms/req at 82 coordinate
3.68827ms/coordinate | | osrm_contract | Time: 95.62s Peak RAM: 185.58MB | Time: 95.64s Peak RAM: 187.73MB | | osrm_customize | Time: 1.33s Peak RAM: 115.12MB | Time: 1.34s Peak RAM: 114.95MB | | osrm_extract | Time: 12.22s Peak RAM: 412.05MB | Time: 12.38s Peak RAM: 407.05MB | | osrm_partition | Time: 2.30s Peak RAM: 148.50MB | Time: 2.27s Peak RAM: 148.48MB | | packedvector | random write:
std::vector 9864.1 ms
util::packed_vector 83305.1 ms
slowdown: 8.44528
random read:
std::vector 8560.88 ms
util::packed_vector 34049.8 ms
slowdown: 3.97737 | random write:
std::vector 9803.85 ms
util::packed_vector 83247.4 ms
slowdown: 8.49129
random read:
std::vector 8523.32 ms
util::packed_vector 34015.3 ms
slowdown: 3.99085 | | route_ch | 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
512.896ms
0.512896ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
353.193ms
0.353193ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
629.824ms
0.629824ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.888ms
0.151888ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
97.251ms
0.097251ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
133.286ms
0.133286ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
151.855ms
0.151855ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
97.0303ms
0.0970303ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
139.854ms
0.139854ms/req | 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
511.484ms
0.511484ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
351.783ms
0.351783ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
629.865ms
0.629865ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
151.3ms
0.1513ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
96.4286ms
0.0964286ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
132.22ms
0.13222ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
162.144ms
0.162144ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
96.4002ms
0.0964002ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
131.251ms
0.131251ms/req | | route_mld | 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
643.418ms
0.643418ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
439.773ms
0.439773ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
817.063ms
0.817063ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
266.84ms
0.26684ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
160.953ms
0.160953ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
287.715ms
0.287715ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
262.433ms
0.262433ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
160.7ms
0.1607ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
288.713ms
0.288713ms/req | 1000 routes, 3 coordinates, no alternatives, overview=full, steps=true
642.086ms
0.642086ms/req
1000 routes, 2 coordinates, no alternatives, overview=full, steps=true
454.098ms
0.454098ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=full, steps=true
832.13ms
0.83213ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false
268.607ms
0.268607ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false
159.485ms
0.159485ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false
285.314ms
0.285314ms/req
1000 routes, 3 coordinates, no alternatives, overview=false, steps=false, radius=750
255.545ms
0.255545ms/req
1000 routes, 2 coordinates, no alternatives, overview=false, steps=false, radius=750
159.86ms
0.15986ms/req
1000 routes, 2 coordinates, 3 alternatives, overview=false, steps=false, radius=750
287.728ms
0.287728ms/req | | rtree | 1 result:
208.809ms -> 0.0208809 ms/query
10 results:
244.473ms -> 0.0244473 ms/query | 1 result:
206.455ms -> 0.0206455 ms/query
10 results:
242.095ms -> 0.0242095 ms/query |