[Qgis-developer] [Server] performance questions

Jörg Habenicht jh at mwerk.net
Fri Apr 22 09:27:27 PDT 2016


Hello Marco.

Am 22.04.2016 um 17:44 schrieb Marco Hugentobler:
> Hi
> 
> Yes, rendering multithreaded in the server is possible (but needs some
> work of course).
> 
> What I said was that the effect is probably not that big, because the
> fcgi module already distributes concurrent requests to different
> processes.

we already got this technology, but in those cases described below the
work distribution does not help. Currently we got around 10
clicks/second at max, but the user has to wait an awful long time for
the map to update in his/her session.

We have measured the average response time which is around 1 second. But
using FCGI and parallel QGis-server processes does not help in this case.


> In the special case of very rare requests to the server, it
> might have a considerable effect. But even then it is very unlikely that
> a 20sec request will render in 1-2 sec (what you need for interactive
> web maps).

I'd estimate it to be nearly linear for painting the pictures (and maybe
also for calling the DB). On your server we can see one core to be fully
utilized calculating with low IO and all others idling around.

I'd like to give it a try in the below mentioned method. Do I have to
expect serious side effects? Do I have to consider something I forgot in
my design?


> 
> Regards,
> Marco

cu
Jörg

> 
[snip]
>>> Il 22 apr 2016 3:27 PM, "Jörg Habenicht" <jh at mwerk.net
>>> <mailto:jh at mwerk.net>> ha scritto:
>>>
>>>     Hi Andreas, dear list,
>>>
[snip]
>>>
>>>     I have scanned the git-Qgis sources (commit
>>>     81744ecf90a8f6c1e2e94fdacb07e3dca6987dcc) for a suitable
>>>     multithreading
>>>     entry. Found QgsMapRenderer::render() because of the line "while (
>>>     li.hasPrevious() )". It seems in this loop the layers are painted in
>>>     serial onto the resulting picture.
>>>     If I can build an auto parallel computing with QtConcurrent in this
>>>     place there seems to be the most gain. I mean to parallelize the loop
>>>     with concurrent DB requests, concurrent painting in separate pictures
>>>     and in serial map the single pictures onto the result picture.
>>>
>>>     Right now I don't know if I can do DB requests in parallel, or
>>>     where the
>>>     code for database requests is buried.
>>>     And how about the calls inside the loop, are there side effects
>>>     preventing multi threading?
>>>
>>>
>>>     Do you got hints, flames or suggestions?
>>>
>>>
>>>     cu
>>>     Jörg
>>>
>>>
[snip]

-- 

mWerk GmbH
Dipl.-Ing. Jörg Habenicht
Landwehrstr. 76
30519 Hannover
(T) +49 511 9999 8033
(F) +49 511 9999 8041
(E) jh at mwerk.net
Amtsgericht Hannover HRB 206522
Geschäftsführer
Reiner Brachvogel
Dennis Kornehl


More information about the Qgis-developer mailing list