Table request time complexity #6817
Replies: 8 comments
-
The original implementation is based on this paper: http://algo2.iti.kit.edu/schultes/hwy/distTable.pdf
As you can see, there are a lot of pieces in the complexity puzzle. Your best bet is to try. One observation to make though - you will pay the coordinate snapping price multiple times if you make multiple requests. To address that, @oxidase made a PR a few years ago that made the |
Beta Was this translation helpful? Give feedback.
-
Interesting. Does it mean that the parallelization approach used back then was only viable for CH and would not have been usable with MLD? |
Beta Was this translation helpful? Give feedback.
-
@jcoupey I honestly don't remember, but I'm sure we can dig up the commits where it happened and see if the commit messages give more context. It's a bit of a tradeoff - if you're only handling your own requests, then it makes sense to split a single request across many processors to make it fast. If you're handling public traffic (like we do at Mapbox), then it can make sense to limit a request to a single CPU, despite the slower response time. If there are enough other concurrent requests occurring that you can utilize all your compute, it is arguably better to provide consistent latency based on request shape, rather than variable performance depending on load (which is what would happen if large requests were allowed to use other CPU cores and fight with other concurrent smaller requests). |
Beta Was this translation helpful? Give feedback.
-
That's a fair assessment. |
Beta Was this translation helpful? Give feedback.
-
For practical purposes the CH based many-to-many implementation is in O(S*T). |
Beta Was this translation helpful? Give feedback.
-
Sure, totally get that eating up all cores is not always desired. But this means it would probably be possible to pass the number of cores allowed as a runtime option, a bit like what |
Beta Was this translation helpful? Give feedback.
-
Thank you for the clarifications This might be a silly question but assuming we are pre-processing our map data using |
Beta Was this translation helpful? Give feedback.
-
Yes - the access method ( |
Beta Was this translation helpful? Give feedback.
-
Hi folks, was curious about knowing that given
S
sources andD
destinations, what is the time complexity for the table retrieval request? Is itS * D
?In our use-case, we would like to understand how to tackle our ever increasing request runtime based on the increasing source/destination points. So if, for e.g., a
5000*5000
request takes around5 seconds
, would we receive some speed-up by splitting them into 51000*5000
requests across multiple instances? Thanks.Beta Was this translation helpful? Give feedback.
All reactions