[mapserver-users] Enhancing MapServer performance with GPUs

Adam Eskreis aeskreis at gmail.com
Mon Jun 23 10:57:25 PDT 2014


Mapserver does include an OpenGL renderer, but it isn't optimized for
modern graphics hardware, so it would be unlikely to provide any
improvement over the AGG renderer.  You would likely find yourself writing
the OpenGL renderer from scratch to support OpenGL 4.x, in order to take
advantage of modern shader cores.  It would be a huge undertaking, and the
tessellation step may negate any performance benefits you may have received
from using the GPU.

If you don't mind me asking, why is caching an unacceptable solution?
 Mapserver isn't intended to be run in production on a large scale.
 Mapserver is a tool for generating images from GIS data, but any
production map application does offline caching, and then serves up cached
map tiles to a user.  If you have components of your map that change in
real time, perhaps mapserver is not the correct solution for those
components.  What is the nature of your application, and what sort of data
are you serving up?  Also, what platforms are you looking to support? Web?
Mobile phones? Tablets?

Some more information could go a long way to helping you find an ideal
solution.


On Mon, Jun 23, 2014 at 11:35 AM, Visit Hirankitti <v.hirankitti at gmail.com>
wrote:

>
> Many thanks for your advices, I made a survey on a graphic card for a Dell
> server, such as NVIDIA Tesla K4, the price is so high, something like
> $6,700, so I have to evaluate whether I worth the money.
>
> Is the OpenGL included and used by MapServer as a default or we need to
> compile it ourselves in order to use it? If that is the case, how can we do
> that?
>
> Visit
>
> On Tue, Jun 17, 2014 at 5:50 AM, Adam Eskreis <aeskreis at gmail.com> wrote:
>
>> It's been a while since I've looked at the Mapserver code, but if I'm not
>> mistaken it uses the fixed function pipeline for OpenGL which isn't going
>> to be able to take advantage of all of those wonderful shader cores very
>> well.  If you wrote your own renderer using OpenGL 4.0+, you might be able
>> to get a substantial boost in rendering performance, but as Paul said,
>> rendering may not be your bottleneck.  You should ensure that it is before
>> spending a lot of money on GPU servers.  Also something to keep in mind,
>> when you render with OpenGL you must convert all of your polygons into
>> triangle meshes, which can be an extremely costly operation, especially for
>> concave polygons that contain holes, which are quite common in GIS data.
>>
>>
>> On Mon, Jun 16, 2014 at 5:42 PM, Paul Ramsey <pramsey at cleverelephant.ca>
>> wrote:
>>
>>> Non-trivial places time can be spent:
>>>
>>> - CGI startup (if you aren't using FastCGI)
>>> - reading layers (if you have a lot of them! it's only a ms or two per
>>> layer, but if you have 100 layers...)
>>> - reading data
>>> - rendering data
>>> - compressing output images (more than you'd expect)
>>>
>>> I'd expect GPU assisted rendering to be a win only for a narrow
>>> minority of cases, it's not a predominant time sink as often as one
>>> would expect. Plus for all the speed once you have the GPU chain set
>>> up, the setting up of the GPU can be costly, and for a CGI program
>>> like MapServer, that's a big deal.
>>>
>>> P
>>>
>>>
>>> On Sun, Jun 15, 2014 at 2:57 PM, Even Rouault
>>> <even.rouault at mines-paris.org> wrote:
>>> > Le dimanche 15 juin 2014 23:50:05, Visit Hirankitti a écrit :
>>> >> Dear list memers,
>>> >>
>>> >> My name is Visit, a newbie of this forum. I have been using MapServer
>>> for
>>> >> at least 4 years now on many research projects. It has served my
>>> research
>>> >> projects quite well.
>>> >>
>>> >> Recently I am using MapServer to develop a real-world enterprise web
>>> >> application.
>>> >> I am developing a web-based GIS application using MapServer to serve
>>> >> thousands of users, and one of overheads of the system is on the map
>>> >> rendering provided by MapServer.
>>> >>
>>> >> At the moment the server I use to run MapServer doesn't have a
>>> graphic card
>>> >> (i.e. GPUs), but I wonder if I really want high performance of
>>> >> map-rendering from MapServer, can a graphic card (i.e. GPUs) equipped
>>> with
>>> >> the server enhance MapServer's map rendering speed and hence improve
>>> its
>>> >> map service speed?
>>> >>
>>> >> As a graphic card contains hundreds of GPU cores, e.g. NVDIA CUDA
>>> platform,
>>> >> and each core can compute and draw polygons in parallel, so I think
>>> this
>>> >> can improve the speed of map rendering (if used with MapServer)
>>> >> substantially. Do I understand this correctly?
>>> >
>>> > You'll have to profile where the time is exactly spent in MapServer.
>>> If it is
>>> > in pulling data from sources, or in the rendering part itself. There's
>>> a
>>> > OpenGL backend available in recent MapServer versions that could
>>> potentially
>>> > speed up rendering, but it is likely a bit experimental and might need
>>> more
>>> > work.
>>> >
>>> >>
>>> >> Thanks for your advice in advance,
>>> >>
>>> >> Visit Hirankitti Ph.D.
>>> >>
>>> >> Intelligent Communication and Transportation Lab
>>> >> King Mongkut's Institute of Technology Ladkrabang
>>> >> Thailand
>>> >
>>> > --
>>> > Geospatial professional services
>>> > http://even.rouault.free.fr/services.html
>>> > _______________________________________________
>>> > mapserver-users mailing list
>>> > mapserver-users at lists.osgeo.org
>>> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140623/43b28db2/attachment.htm>


More information about the MapServer-users mailing list