-
I have tested TiTiler on a small machine and am getting very slow performance (1-2 seconds per ortho map tile), but the machine is underpowered...however TiTiler does not seem to peg the CPU. For ortho raster tiles served from mbtiles, speeds to the client can be under 100ms with a high speed connection, and usually under 50ms. The drawback here is that the mbtiles file is about 3-4x times the size of the COG if not bigger for the same area. The 50ms benchmark is about where Google's imagery comes in at so it seems like a good baseline. Is TiTiler able to reach these speeds for say a 100GB COG with three bands, or is that just not possible? Regardless, has anyone published benchmarks for various virtual hardware setups and tile serving scenarios? I would like to know if performance any where close to this is possible before I go spinning up a Kubernetes cluster. My guess right now is that the amount of CPU needed to reach these speeds will cost more then the cost for added storage space to store mbtiles on block storage. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
You're testing two completely different things. An mbtiles file is:
That will always be much faster than dynamic tiling, where that entire process happens on the fly instead of being pre-computed. But imagine you have a data source that changes, say, every hour. It would be crazy (assuming some large area) to create a new mbtiles file for every data change every hour. The point of dynamic tiling is to have flexibility in what images are chosen and displayed. If you don't care about that flexibility, a static dataset like mbtiles will always be faster. |
Beta Was this translation helpful? Give feedback.
-
1-2 seconds is quite slow, I would expect something around 200ms
TiTiler is not meant to be compared with mbtile tile server or other server working with locally stored tiles. It will never be faster than those because TiTiler (gdal/rasterio) has to do more work. if you still want to work with COG files but want something fast you should look at https://github.com/blacha/cogeotiff. TiTiler offers more than just basic tile serving. The main goal is to enable The major problem of TiTiler is GDAL. Every Tile read will block the thread because GDAL is a blocking process, sadly we are not able to There is no |
Beta Was this translation helpful? Give feedback.
-
I get that TiTiler and GeoTIFF servers in general are not specifically designed to be an XYZ tile server to replace traditional solutions, my question is whether it can and then if it should be used for this purpose. Why - mainly due to how the ortho imagery is stored - COG on very cheap object storage - vs mbtiles on slightly more costly block storage. And - the presenter from Bayer who just talked at FOSS4G said he is doing just this - they have replaced a cached tiling solution with rio-tiler and find it more performant, but he did not get into details in regards to the CPU infrastructure except that it is running on a cluster with auto-scaling. |
Beta Was this translation helpful? Give feedback.
-
After some digging I'll answer my own question. As can be seen from the comments above the answer is nuanced, but the short answer is Yes, a COG server can be used in place of an mbtiles server for serving out simple ortho image tiles. Latency or response times can be expected to be under 500ms given adequate hardware, properly formed TIFFs. https://github.com/linz/basemaps is probably more suited to this specific use case than either TiTiler of Terracotta...but all these projects are still a work in progress. |
Beta Was this translation helpful? Give feedback.
After some digging I'll answer my own question. As can be seen from the comments above the answer is nuanced, but the short answer is Yes, a COG server can be used in place of an mbtiles server for serving out simple ortho image tiles. Latency or response times can be expected to be under 500ms given adequate hardware, properly formed TIFFs. https://github.com/linz/basemaps is probably more suited to this specific use case than either TiTiler of Terracotta...but all these projects are still a work in progress.