[postgis-devel] Kmeans Multi-thread

Paul Ramsey pramsey at cleverelephant.ca
Tue Jul 27 13:59:09 PDT 2021


Sidebar on multi-threading, you stripped the multi-threading (pthreads) out of the kmeans for various (good) reasons at the time, but it always seemed to me that kmeans was a perfect target for multi-threading, lots of very straight-forward looping and so on. Any thoughts on whether it is worth spending time trying to bring it back?

P

> On Jul 27, 2021, at 1:53 PM, Дорофей Пролесковский <me at komzpa.net> wrote:
> 
> OpenMP is cool.
> 
> I'd say the "take all cores" compile time switch will be a good start for pure analytical workloads like mine. Machine is oversaturated anyways, if it can return back to shell some minutes faster that would be great already.
> 
> My previous experiments with instrumenting PostGIS for that exploded on the fact that palloc is not openmp-safe.
> 
> 
> 
> вт, 27 июл. 2021 г. в 23:18, Paul Ramsey <pramsey at cleverelephant.ca>:
> Interested in knowing what people's general reaction to OpenMP work is. 
> 
> https://github.com/libgeos/geos/pull/468
> 
> Going from PoC to something committable will involve a reasonable amount of CMake twiddling to detect support on multiple platforms and get the right linking info and so on. It can be flipped off as necessary. The biggest implementation thing missing is some kind of run-time API to signal to OpenMP the maximum number of cores to commit, since we'll want to at least wave our hands at trying to avoid capping out server resources.
> 
> On the one hand it's kind of cool. On the other there's limited places to put it to work, and it adds complexity for certain.
> 
> P.
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel



More information about the postgis-devel mailing list