performance with different data formats
Howard Butler
hobu at IASTATE.EDU
Tue Aug 22 19:35:57 PDT 2006
Mark,
Brock Anderson from Refractions gave a great presentation on
MapServer vs. ArcIMS using ArcSDE that included MapServer's FastCGI
implementation in the mix and found comparable results
<http://mapserver.gis.umn.edu/community/conferences/MUM3/present/session10/msvsarcims/download>.
With regard to testing, JMeter provides a nice and configurable way
to hammer a server. Apache also comes with a rather simple command
line program (ab) you can use to abuse your hardware.
Have you looked at implementing FastCGI
<http://mapserver.gis.umn.edu/docs/howto/fastcgi>? I would speculate
that some of the overhead you are seeing in both ArcSDE and Oracle is
connection overhead. This will help improve the performance of
repeat and subsequent draws.
Even with FastCGI, MapServer's performance with database backends
will not beat its performance with shapefiles (it should get
reasonably close though). Shapefiles are the "native" format for
MapServer, and much fine tuning has been done to make them render
fast. Additionally, you can add .qix indexes as you did to
shapefiles that MapServer can use to squeeze even more performance
out. Additional geometry and attribute translation required for
using database backends cannot be eliminated, so they will always be
a little bit slower than shapefiles.
Also make sure to verify that your spatial indexes in both the ArcSDE
and Oracle layers are functional. On the ArcSDE example you gave, it
appears that things are working correctly.
MapServer 4.10 will have a configuration option for ArcSDE that will
short circuit the querying process to use attribute indexes instead
of spatial ones. In certain situations, like querying to fill an
HTML form and drawquery stuff, the performance wins of using this can
be excellent with appropriate attribute indexes. I don't know how to
do this with Oracle though.
I would note that PostgreSQL/PostGIS does not have as much connection
overhead as Oracle and ArcSDE, and FastCGI in that instance will not
provide as much of a boost.
I would also like to take the opportunity to thank Frank Warmerdam
for implementing FastCGI and connection pooling. It is huge
performance boost for database drivers like ArcSDE and Oracle.
The rest of my comments are inline only apply to my experience with ArcSDE.
>
>
>1. We compared MapServer performance with SQL Server ArcSDE and
>Shapefiles (with spatial indexes defined for the Shapefiles), with a
>large polygon layer representing property parcels (329870 records). To
>draw the whole layer at full extents, it took 10 seconds with
>Shapefiles, 26 with SDE.
Is the server across the room or across the country ;) Reading
~70-100mb of data across the network is a lot slower than reading it
off of a disk. It's possible most of the overhead in this instance
is i/o.
>To zoom in to a small area, 0.3 seconds with
>Shapefiles, 2.2 seconds with SDE. These times are just the draw times
>reported from the debugging.
This tells me that your indexes for ArcSDE seem to be working, and
most of the ~2 sec draw time is probably connection overhead. Using
FastCGI to cache the connection will probably bring this draw time
(ie, zoomed in, small amounts of data and taking advantage of spatial
indexes) fairly close to the shapefile one.
>3. We compared MapServer performance with ArcIMS performance using the
>same data sources (the property parcel layer with 329870 records). This
>is an even more informal test as we didn't have access to the same
>debugging info on the ArcIMS side, so I will just say that comparing
>with Shapefiles only, the 2 platforms were roughly comparable; but
>ArcIMS speeds up a little with SDE, while MapServer slows dramatically
>with this format.=20
See Brock's presentation for some empirical data about ArcIMS and
MapServer with ArcSDE.
>4. We have even more problems when we want to use the results from the
>selection in test 2 to show the attribute data to the user on a separate
>HTML form. On the ArcIMS side we can process attribute data quick
>quickly as the server sends back an XML file with the attribute data in
>it.
I think the MapServer CGI wizards on this list would know how to have
MapServer send back XML for a query request. You might also set
things for your querying to use WFS and OGC Filter Encoding so it
wouldn't matter what your server was (GeoTools maybe?), but alas,
ArcIMS doesn't really support that ;)
Howard
More information about the MapServer-users
mailing list