Closed arbakker closed 3 years ago
Thanks a lot for the investigation! The task queue size should be greater or equal than the number of available CPU cores. Instead of detecting the available cores, I've set the size to the highest number of cores I could imagine. But when all these tasks use a DB connection, then we should definetively reduce them to the minimum. I will check whether we loose performance with setting the queue size to the number of cores.
The build failure on Mac comes from an incompatibility of the DummyDatasource
replacing the optional GDALDatasource
. But I'll try to avoid the datasource check anyway.
Aah, that makes sense. I already thought the task queue was quite big, but that explains. I suppose that the queue size should be limited to 64 for spatialite formats, if number of available cores > 64, in case the queue size is set to the number of cores.
In a quick test, num_cpus * 2
was faster than num_cpus
and 128
. See f4d0665
Fixes https://github.com/t-rex-tileserver/t-rex/issues/234
The libspatialite max connections limitation is solved with libspatialite v4.4.0 (when compiled against GEOS 3.5.0), see https://groups.google.com/g/spatialite-users/c/xrV7CA_GlwM .
Commented the fix, so it can be removed at some later point in time.