SlideShare una empresa de Scribd logo
1 de 26
W W W . R E F R A C T I O N S . N E T




WMS Performance Tests!
Mapserver & Geoserver

     FOSS4G 2007
  Shapefiles vs. PostGIS,
  Concurrency,
  and other exciting tests...



                                               Presented by
                                               Brock Anderson and
                                               Justin Deoliveira
W W W . R E F R A C T I O N S . N E T




Presentation Outline

• Goals of testing.

• Quick review of WMS.

• Description of the test environment.

• Discussion of performance tests and results.

• Questions.
W W W . R E F R A C T I O N S . N E T




Goals
1. Compare performance of WMS GetMap
  requests in Mapserver and Geoserver.

2. Identify configuration settings that will
  improve performance.

3. Identify and fix inefficiencies in Geoserver.

    We do not test stability, usability, etc.,

*   We do not test styling or labelling.
    We focus on vector input.
W W W . R E F R A C T I O N S . N E T




Keeping the tests fair




• Not an easy job!

• We tried to understand what each server does
under the hood to ensure we're not accidentally
performing unnecessary processing on either server.
W W W . R E F R A C T I O N S . N E T




Web Map Service (WMS)


        http://server.org/wms?
         request=getmap&
         layers=states,lakes&
         bbox=-85,36,-60,49&
         format=png&...                             WMS


User           A Map
W W W . R E F R A C T I O N S . N E T




Test Environment

Client Computer                              Server Computer
                                                Apache 2.2.4 (with mod_fcgi)




                                                                                                   Vector Data
                                                    Mapserver
                                                      4.10.2
                         WMS requests
       JMeter                                                              Data
         2.2                                    Tomcat 6.0.14
                         WMS requests                                              Shapefiles
                                                    Geoserver
                                                    1.6 beta 3




  Additional Server Specs: Dual core (1.8Ghz per core). 2GB RAM. 7200RPM disk. Linux. PostgreSQL
  8.2.4. PostGIS 1.2.
W W W . R E F R A C T I O N S . N E T




Test #1: PostGIS vs. Shapefiles
• Two Data Sets:
   3,000,000 Tiger roads in Texas
   10,000 Tiger roads in Dallas, Texas

•   Both data sets are in PostGIS and shapefile format.
•   Spatial indexes on both data sets.
•   Mapserver and Geoserver layers point at the data.
•   Minimal styling.
•   JMeter issues WMS requests to fetch ~1,000
    features, limited by the 'bbox' parameter.

                                                     And the results are...
W W W . R E F R A C T I O N S . N E T




                                  Test #1: PostGIS vs. Shapefiles

                                                             Mapserver                                                     Geoserver
                                400                                                  386      400

                                350                                                           350
Response time (millisec onds)




                                300                                                           300

                                250                                                           250

                                200                                                           200

                                150                                                           150

                                100                                                           100
                                           50          39                 47                            42                             42            33
                                 50                                                            50                    27

                                  0                                                             0
                                           1,000 of 10,000               1,000 of 3,000,000              1,000 of 10,000               1,000 of 3,000,000




                                  Notes: This test uses two different data sets: one with 3 million features, the other with 10,000. Each bar is
                                  an average of 30 sample WMS requests, each using a different bounding box to fetch and draw appx. 1000
                                  features (+/- 15%). The same 30 requests are executed for each scenario. One request at a time (no
                                  concurrency). Mapserver and Geoserver use the same data. Mapserver is using FastCGI via Apache/mod_fcgi.
                                   Spatial indexes on both data sets. Quadtree indexes generated by 'shptree'. No reprojection required.
                                  Minimal styling. Responses are 1-bit PNG images.
W W W . R E F R A C T I O N S . N E T




Test #2: Concurrent Requests



• Using the same tiger roads data set with 10,000
  records.

• We issue multiple requests with pseudo-random
  BBOXes that fetch approximately 1,000 features.

• The main difference is that now we're issuing
  multiple concurrent requests.

                                       Let's see what happened...
W W W . R E F R A C T I O N S . N E T




                                 Test #2: Concurrent Requests

                                                  Mapserver                                                     Geoserver
                               1500
                                                                                       1400
Response time (milliseconds)




                               1300
                                                                                       1200
                               1100
                                                                                       1000
                               900
                                                                                        800
                               700

                               500                                                      600

                               300                                                      400

                               100                                                      200

                               -100                                                      0
                                      1     2     5     10    15    20     40    60           1      2      5      10     15     20    40      60




                                 Notes: Data in PostGIS and shapefile formats. Mapserver and Geoserver use the same data. Mapserver is
                                 using FastCGI via Apache/mod_fcgi. 20 FastCGI mapserv processes. Geoserver uses connection pooling with
                                 20 connections. Spatial indexes on both data sets. No reprojection required. Minimal styling. Responses are
                                 2-color PNG images. More details in the appendix.
W W W . R E F R A C T I O N S . N E T




                            ... or Throughput, if you prefer

                                    Mapserver Throughput                                         Geoserver Throughput
                       80                                                        80

                       70                                                        70
Responses per second




                       60                                                        60

                       50                                                        50

                       40                                                        40

                       30                                                        30

                       20                                                        20

                       10                                                        10

                        0                                                         0
                            1   2     5      10       15    20      40    60          1   2      5         10      15        20   40   60


                                    # Concurrent Requests                                            # Concurrent Requests




                            An alternative way to summarize the data collected
                            for the concurrency test. (Higher lines are better
                            here.)
W W W . R E F R A C T I O N S . N E T




                                    Test #3: Reprojection
                                    Mapserver (using PROJ to reproject)                                       Geoserver (using Geotools to reproject)
                               80                                                                        80
                                                                                                                                                                 31
                               70
                                                             22                                          70
                                                                                                                                      19           21
                                               6                              9            12
Response time (milliseconds)




                               60
                                                                                                         60


                               50   0                                                                    50
                                                                                                              0           4
                                                                                                         40
                               40
                                                                                                         30
                               30
                                                                                                         20
                               20
                                                                                                         10
                               10
                                                                                                          0
                               0                                                                              None    Geog WGS84 – Geog WGS84 – Geog WGS84 –   UTM 14N
                                                                                                                      UTM 14N      UTM 14N      SPS NAD83      WGS84 - SPS
                                     None   Geog WGS84 –  Geog WGS84 –    Geog WGS84 –   UTM 14N WGS84
                                            UTM 14N WGS84 UTM 14N NAD27   SPS NAD83      - SPS NAD83                  WGS84        NAD27                       NAD83




PROJ optimizes by assuming these source                                                                              Geotools is slightly faster than
and target datums are equivalent.                                                                                    PROJ for these cases.

Currently Mapserver calls PROJ for every                                                                             Geoserver simplifies geometry
                                                                                                                     before reprojecting.
vertex, but it could improve by batching
those into a single call.
W W W . R E F R A C T I O N S . N E T




CGI vs. FastCGI (Mapserver only)

                                          90
                                               81
                                          80
           Response time (milliseconds)



                                          70

                                                          57
                                          60
                                                                              52
                                          50
                                                                                        42   PostGIS
                                          40                                                 Shapefile

                                          30

                                          20

                                          10

                                          0

                                                    CGI                         FastCGI

 Notes: Average of 30 samples. One request at a time (no concurrency). Each request fetches one
 layer with 1000 features from a data set of 10,000. Spatial indices on both data sets. No
 reprojection required. Minimal styling. Responses are 1-bit PNG images. The same binary file was
 used for both CGI and FastCGI. FastCGI through Apache and mod_fcgi.
W W W . R E F R A C T I O N S . N E T




  Breakdown of Mapserver Response Time
                                90
       Time (in milliseconds)

                                80

                                70
                                                                                 Network delay
                                60                                               Write image
                                50                                               Draw
                                                                                 Fetch & store
                                40                                               Query
                                30                                               Connect to DB
                                                                                 Load map file
                                20
                                                                                 Start mapserv process
                                10

                                0
                                     PostGIS                    Shapefile




• FastCGI eliminates Start mapserv process and
  Connect to DB costs.
• The Write image step is dependant on output format.
W W W . R E F R A C T I O N S . N E T




 Breakdown of Geoserver Response Time

404: Document not found
W W W . R E F R A C T I O N S . N E T



                                     Servlet Container and Java (Geoserver
                                                      only)
                                                 Jetty 6.0.2                                       Tomcat 6.0.14
Response time (milliseconds)




                               200     179                                     200

                               160                                             160

                               120                                             120      Tomcat 6
                                                        95                                               95
                                                                                        doesn't
                                80                                   64         80      support                     63
                                                                                        Java 1.4
                                40                                              40

                                 0                                               0
                                      Java 1.4         Java 5      Java 6               Java 1.4        Java 5     Java 6




• These results show average response times for the same
  WMS request when Geoserver is backed by different
  Servlet containers and Java versions.
• Using shapefile backend.
• Conclusion: Use Java 6!
W W W . R E F R A C T I O N S . N E T




  Outcome of the tests
• Lots of performance optimizations to Geoserver
  which will be available in version 1.6.

• Identified a few places where Mapserver can
  improve too. (These will be reported as “bugs”
  as time permits.)

• Both servers can be FAST, but require some
  special configuration.
W W W . R E F R A C T I O N S . N E T




                                  The Road to Speed

                                                        Mapserver                                                 Geoserver
Response time (milliseconds)




                               1000                                                    1000


                                800                                                     800


                                600                                                     600


                                400                                                     400


                                200                                                     200


                                                                                          0
                                  0
                                      Start (CGI)   Switch to   Re-order      Output          Start   Logging Transp. Output      JVM      Code
                                                    FastCGI     'epsg' file   format                  Off     styles off format   settings change



                                Data sources with high                                                 All will be in Geoserver 1.6
                                connection overhead will
                                benefit much more from
                                FastCGI.
W W W . R E F R A C T I O N S . N E T




  Performance Tips (Mapserver)
• Beware of
  PROJECTION
    'init=epsg:4326'
  END
  The “init=” syntax causes one lookup in the PROJ4 'epsg'
  file for every occurrence in the map file. (Move your
  most-used EPSG codes to the top of the 'epsg' file.)

• Use FastCGI instead of ordinary CGI. Instruction here:
  http://mapserver.gis.umn.edu/docs/howto/fastcgi

• Ensure you have enough FastCGI processes.
W W W . R E F R A C T I O N S . N E T




  Performance Tips (Geoserver)
• Geoserver has many features enabled by default. Gain
  performance by disabling features you don't need.
   – Transparent styles double draw time. Use opacity=1
     in your SLD to disable.
   – Antialiasing linework is costly. Try
     '&format_options=antialias:none' to disable.
   – Experiment with disabling “PNG native acceleration”
• Favour Java 6 over Java 5 over Java 1.4.
• JVM Settings: Increase heap size. Use -server switch.
• Experiment with different shapefile index depths.
• Turn off logging
W W W . R E F R A C T I O N S . N E T




  How can the servers improve?
Mapserver                                 Geoserver
• More efficient scanning                 • Various optimizations to
  of shapefile quadtree                     the renderer.
  indexes. [ Bug Reported ]                     [ Fixes Committed ]



• Batch PROJ calls when                   • More efficient scanning
  doing on-the-fly                          of shapefile quadtree
  reprojection.                             index. [ Fixes Committed ]


• Reduce number of 'epsg'
  lookups on map files.
W W W . R E F R A C T I O N S . N E T




Questions? Contact Us.


Brock Anderson:
  banders@refractions.net

Justin Deolivera:
  jdeolive@openplans.org
W W W . R E F R A C T I O N S . N E T




  General WMS Performance Tips
• Only fetch from your data source the features that will
  be drawn, otherwise the servers have to spend time
  scanning and discarding the unused ones.

• Output format affects response time. 256 color PNG is
  faster to create than PNG24 on both servers.

• On-the-fly reprojection has a price. Store data in the
  same projection it's most commonly requested in.
W W W . R E F R A C T I O N S . N E T




Appendix
Breakdown of Mapserver Response Time
The graph represents mapserv running in CGI mode to show all startup costs. Metrics for “Load map file”,
“Connect to DB”, “Fetch & store”, “Draw” and “Write image” were collected by modifying source code to
capture and log durarions of those operations. “Query” time measured with PostgreSQL's explain analyze
command. “Start mapserv process” + “Network delay” = difference between response times recorded by
JMeter and my custom mapserv logging which recorded the total time servicing a request.

                                                   PostGIS   Shapefile
                           Start mapserv process   15ms      15ms
                           Load map file           3ms       3ms
                           Connect to DB           14ms      n/a
                           Query                   20ms      n/a
                           Fetch                   7ms       n/a
                           Draw                    11ms      28ms
                           Write image             8ms       8ms
                           Network delay           3ms       3ms
PostGIS vs Shapefiles
This test uses two different data sets: one with 3,000,000 features, the other with 10,000. Each request
fetches 1000 features by limiting with a 'bbox' WMS parameter. Each bar is an average of 30 samples.
One request at a time (no concurrency). Mapserver and Geoserver use the same data. Mapserver is using
FastCGI via Apache/mod_fcgi. Spatial indices on both data sets. The shapefile indices were generated
with 'shptree'. No reprojection required. Minimal styling. Responses are 2-color PNG images (indexed
color).
The unusual Mapserver result for the case of a 3 million record shapefile has been reported to the
Mapserver bug tracker: http://trac.osgeo.org/mapserver/ticket/2282
W W W . R E F R A C T I O N S . N E T




Appendix
Concurrency and Throughput
Notes: Data in PostGIS and shapefile formats. Mapserver and Geoserver use the same data. Mapserver is
using FastCGI via Apache/mod_fcgi. 20 FastCGI mapserv processes. Geoserver uses connection pooling
with 20 connections. Spatial indexes on both data sets. No reprojection required. Minimal styling.
Responses are 2-color PNG images (indexed color). “Concurrent” requests were fired in bursts with zero
ramp up (as near to simultaneously as possible). I.e. For the test of 10 concurrent requests, all ten
requests were fired at the same time. Once all the responses came back then the next burst of requests
went out. Requests use random bboxes which fetch ~1000 features. The same random bboxes are used
against both servers.
   Mapserver (Response times)           Geoserver (Response times)
   PostGIS       Shapefile              PostGIS       Shapefile
 1            50            39        1            42            27
 2            51            40
                                                                       Response times are measured in
                                      2            43            30
 5            91            75        5            81            47
                                                                       milliseconds. Throughput times
10          182            147       10           166           103
                                                                       represent responses per second.
15          269            229       15           261           162    The concurrency level is the left-most
20          315            283       20           378           252    column in each table (1, 2, 5, 10, ...).
40          784            612       40           747           514
60         1269            905       60         1170            773

    Mapserver (Throughput times)        Geoserver (Throughput times)
    PostGIS       Shapefile             PostGIS       Shapefile
  1          19.6           24.9      1          24.6           35.6
  2          28.2           33.4      2          32.3           41.8
  5          35.4           51.6      5          47.1           68.6
 10          38.4           53.8     10          49.9           74.1
 15          42.5             55     15          49.2           73.3
 20          42.4           54.1     20          47.7             68
 40          43.2           54.9     40          48.3             68
 60          43.1           51.5     60          47.8           70.7
W W W . R E F R A C T I O N S . N E T




Appendix
Summary of Geoserver code changes made to improve performance:


• optimized access to the shapefile spatial index (it was reading tiny sections of the file instead of doing
some buffered access)
• figure out the optmimal palette out of the SLD style (when possible, that is, when antialiasing is off)
* don't access the dbf file when not necessary
* avoid unecessary operations, like duplicating over and over the same coordinate[] during rendering
(loading it, generalize, reproject, copy back in the geometry and so on, now the array it's copied just
once)


Raw list of changes here:
http://jira.codehaus.org/secure/ManageLinks.jspa?id=55176

Más contenido relacionado

La actualidad más candente

GeoServer on Steroids
GeoServer on SteroidsGeoServer on Steroids
GeoServer on SteroidsGeoSolutions
 
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판BJ Jang
 
PostGIS and Spatial SQL
PostGIS and Spatial SQLPostGIS and Spatial SQL
PostGIS and Spatial SQLTodd Barr
 
DATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPDATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPKevin Ng'eno
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018Jody Garnett
 
OpenLayers vs. Leaflet
OpenLayers vs. LeafletOpenLayers vs. Leaflet
OpenLayers vs. Leafletdasjo
 
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...vasuballa
 
Portal vs. ArcGIS Online
Portal vs. ArcGIS OnlinePortal vs. ArcGIS Online
Portal vs. ArcGIS OnlineSSP Innovations
 
Architecting the ArcGIS Platform
Architecting the ArcGIS PlatformArchitecting the ArcGIS Platform
Architecting the ArcGIS PlatformEsri UK
 
Working with Routes and Linear Referencing in ArcGIS
Working with Routes and Linear Referencing in ArcGISWorking with Routes and Linear Referencing in ArcGIS
Working with Routes and Linear Referencing in ArcGISJohn Schaeffer
 
Spatial Data Infrastructure Best Practices with GeoNode
Spatial Data Infrastructure Best Practices with GeoNodeSpatial Data Infrastructure Best Practices with GeoNode
Spatial Data Infrastructure Best Practices with GeoNodeSebastian Benthall
 
ESRI Mapping & Charting Solution: ArcGIS 10 Production Mapping
ESRI Mapping & Charting Solution: ArcGIS 10 Production MappingESRI Mapping & Charting Solution: ArcGIS 10 Production Mapping
ESRI Mapping & Charting Solution: ArcGIS 10 Production Mappingmmarques_esri
 
지리정보체계(GIS) - [2] 좌표계 이해하기
지리정보체계(GIS) - [2] 좌표계 이해하기지리정보체계(GIS) - [2] 좌표계 이해하기
지리정보체계(GIS) - [2] 좌표계 이해하기Byeong-Hyeok Yu
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정BJ Jang
 
Enterprise GIS
Enterprise GIS Enterprise GIS
Enterprise GIS Esri
 
Building Enterprise SDI with Geonode
Building Enterprise SDI with GeonodeBuilding Enterprise SDI with Geonode
Building Enterprise SDI with GeonodeRafael Soto
 

La actualidad más candente (20)

GeoServer on Steroids
GeoServer on SteroidsGeoServer on Steroids
GeoServer on Steroids
 
Web Based GIS
Web Based GISWeb Based GIS
Web Based GIS
 
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
Open Source GIS 기초교육 4일차 - GeoServer 기초 2014년 7월판
 
PostGIS and Spatial SQL
PostGIS and Spatial SQLPostGIS and Spatial SQL
PostGIS and Spatial SQL
 
DATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMPDATABASE & WEBGIS - GIS BOOTCAMP
DATABASE & WEBGIS - GIS BOOTCAMP
 
GeoServer Ecosystem 2018
GeoServer Ecosystem 2018GeoServer Ecosystem 2018
GeoServer Ecosystem 2018
 
OpenLayers vs. Leaflet
OpenLayers vs. LeafletOpenLayers vs. Leaflet
OpenLayers vs. Leaflet
 
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
OOW16 - Technical Upgrade Best Practices for Oracle E-Business Suite 12.2 [CO...
 
Portal vs. ArcGIS Online
Portal vs. ArcGIS OnlinePortal vs. ArcGIS Online
Portal vs. ArcGIS Online
 
Architecting the ArcGIS Platform
Architecting the ArcGIS PlatformArchitecting the ArcGIS Platform
Architecting the ArcGIS Platform
 
Working with Routes and Linear Referencing in ArcGIS
Working with Routes and Linear Referencing in ArcGISWorking with Routes and Linear Referencing in ArcGIS
Working with Routes and Linear Referencing in ArcGIS
 
Spatial Data Infrastructure Best Practices with GeoNode
Spatial Data Infrastructure Best Practices with GeoNodeSpatial Data Infrastructure Best Practices with GeoNode
Spatial Data Infrastructure Best Practices with GeoNode
 
ESRI Mapping & Charting Solution: ArcGIS 10 Production Mapping
ESRI Mapping & Charting Solution: ArcGIS 10 Production MappingESRI Mapping & Charting Solution: ArcGIS 10 Production Mapping
ESRI Mapping & Charting Solution: ArcGIS 10 Production Mapping
 
Basic Gis
Basic GisBasic Gis
Basic Gis
 
OpenLayer's basics
OpenLayer's basicsOpenLayer's basics
OpenLayer's basics
 
지리정보체계(GIS) - [2] 좌표계 이해하기
지리정보체계(GIS) - [2] 좌표계 이해하기지리정보체계(GIS) - [2] 좌표계 이해하기
지리정보체계(GIS) - [2] 좌표계 이해하기
 
공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정공간정보거점대학 1.geo server_고급과정
공간정보거점대학 1.geo server_고급과정
 
Basic introduction to GIS and GIS Softwares (QGIS and ArcGIS)
Basic introduction to GIS and GIS Softwares (QGIS and ArcGIS)Basic introduction to GIS and GIS Softwares (QGIS and ArcGIS)
Basic introduction to GIS and GIS Softwares (QGIS and ArcGIS)
 
Enterprise GIS
Enterprise GIS Enterprise GIS
Enterprise GIS
 
Building Enterprise SDI with Geonode
Building Enterprise SDI with GeonodeBuilding Enterprise SDI with Geonode
Building Enterprise SDI with Geonode
 

Destacado

WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010Jeff McKenna
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009Jeff McKenna
 
Wms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerWms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerDonnyV
 
FieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedFieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedAddy Pope
 
mod-geocache / mapcache - A fast tiling solution for the apache web server
mod-geocache / mapcache - A fast tiling solution for the apache web servermod-geocache / mapcache - A fast tiling solution for the apache web server
mod-geocache / mapcache - A fast tiling solution for the apache web servertbonfort
 
MongoDB + GeoServer
MongoDB + GeoServerMongoDB + GeoServer
MongoDB + GeoServerMongoDB
 
State of GeoServer 2015
State of GeoServer 2015State of GeoServer 2015
State of GeoServer 2015Jody Garnett
 
State of GeoServer
State of GeoServerState of GeoServer
State of GeoServerJody Garnett
 
QGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyQGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyRoss McDonald
 
Giving MongoDB a Way to Play with the GIS Community
Giving MongoDB a Way to Play with the GIS CommunityGiving MongoDB a Way to Play with the GIS Community
Giving MongoDB a Way to Play with the GIS CommunityMongoDB
 
Fossgis 2013 GeoServer Presentation
Fossgis 2013 GeoServer PresentationFossgis 2013 GeoServer Presentation
Fossgis 2013 GeoServer PresentationGeoSolutions
 
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms  tjänster och punktmoln i novapoint dcm basHantering av kartor wms  tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms tjänster och punktmoln i novapoint dcm basVianova Systems Sweden AB
 
Time, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsTime, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsGeorge Percivall
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015Jeff McKenna
 
Common Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingCommon Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingGeorge Percivall
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0hchen1
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.OReillyWhere20
 
Dotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes
 
Understanding Open Source
Understanding Open SourceUnderstanding Open Source
Understanding Open SourceJody Garnett
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011Jeff McKenna
 

Destacado (20)

WMS Performance Shootout 2010
WMS Performance Shootout 2010WMS Performance Shootout 2010
WMS Performance Shootout 2010
 
WMS Performance Shootout 2009
WMS Performance Shootout 2009WMS Performance Shootout 2009
WMS Performance Shootout 2009
 
Wms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo ServerWms Performance Tests Map Server Vs Geo Server
Wms Performance Tests Map Server Vs Geo Server
 
FieldtripGB - data capture simplified
FieldtripGB - data capture simplifiedFieldtripGB - data capture simplified
FieldtripGB - data capture simplified
 
mod-geocache / mapcache - A fast tiling solution for the apache web server
mod-geocache / mapcache - A fast tiling solution for the apache web servermod-geocache / mapcache - A fast tiling solution for the apache web server
mod-geocache / mapcache - A fast tiling solution for the apache web server
 
MongoDB + GeoServer
MongoDB + GeoServerMongoDB + GeoServer
MongoDB + GeoServer
 
State of GeoServer 2015
State of GeoServer 2015State of GeoServer 2015
State of GeoServer 2015
 
State of GeoServer
State of GeoServerState of GeoServer
State of GeoServer
 
QGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyQGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the ugly
 
Giving MongoDB a Way to Play with the GIS Community
Giving MongoDB a Way to Play with the GIS CommunityGiving MongoDB a Way to Play with the GIS Community
Giving MongoDB a Way to Play with the GIS Community
 
Fossgis 2013 GeoServer Presentation
Fossgis 2013 GeoServer PresentationFossgis 2013 GeoServer Presentation
Fossgis 2013 GeoServer Presentation
 
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms  tjänster och punktmoln i novapoint dcm basHantering av kartor wms  tjänster och punktmoln i novapoint dcm bas
Hantering av kartor wms tjänster och punktmoln i novapoint dcm bas
 
Time, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information StandardsTime, Change and Habits in Geospatial-Temporal Information Standards
Time, Change and Habits in Geospatial-Temporal Information Standards
 
MapServer #ProTips 2015
MapServer #ProTips 2015MapServer #ProTips 2015
MapServer #ProTips 2015
 
Common Approach for UAS Data Geoprocessing
Common Approach for UAS Data GeoprocessingCommon Approach for UAS Data Geoprocessing
Common Approach for UAS Data Geoprocessing
 
Semantic Web 2.0
Semantic Web 2.0Semantic Web 2.0
Semantic Web 2.0
 
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.Building a mobile, cloud, checkin app in 75 minutes -  zero to hero.
Building a mobile, cloud, checkin app in 75 minutes - zero to hero.
 
Dotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and DataDotted Eyes - Open Software, Standards and Data
Dotted Eyes - Open Software, Standards and Data
 
Understanding Open Source
Understanding Open SourceUnderstanding Open Source
Understanding Open Source
 
WMS Performance Shootout 2011
WMS Performance Shootout 2011WMS Performance Shootout 2011
WMS Performance Shootout 2011
 

Similar a Mapserver vs. geoserver

Map Server comparison, OGC WMS - Random Extent
Map Server comparison, OGC WMS - Random ExtentMap Server comparison, OGC WMS - Random Extent
Map Server comparison, OGC WMS - Random ExtentGeoCommunity
 
第三回月次セミナー(公開版)
第三回月次セミナー(公開版)第三回月次セミナー(公開版)
第三回月次セミナー(公開版)moai kids
 
Geoint2017 training open interfaces - luis bermudez
Geoint2017 training   open interfaces - luis bermudezGeoint2017 training   open interfaces - luis bermudez
Geoint2017 training open interfaces - luis bermudezLuis Bermudez
 
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...MLconf
 
Evaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated DatabasesEvaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated DatabasesMiguel Araújo
 
Stress Testing and Analysing MapServer Performance
Stress Testing and Analysing MapServer PerformanceStress Testing and Analysing MapServer Performance
Stress Testing and Analysing MapServer PerformanceCompassInformatics
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Gridsgojkoadzic
 
Introduction to nexux from zero to Hero
Introduction to nexux  from zero to HeroIntroduction to nexux  from zero to Hero
Introduction to nexux from zero to HeroDhruv Sharma
 
Modernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricModernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricSoftware Guru
 
State of GeoServer 2012
State of GeoServer 2012State of GeoServer 2012
State of GeoServer 2012Jody Garnett
 
IPW2008 - my.opera.com scalability
IPW2008 - my.opera.com scalabilityIPW2008 - my.opera.com scalability
IPW2008 - my.opera.com scalabilityCosimo Streppone
 
What's new in GeoServer 2.2
What's new in GeoServer 2.2What's new in GeoServer 2.2
What's new in GeoServer 2.2GeoSolutions
 
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)Ontico
 
Dirty - How simple is your database?
Dirty - How simple is your database?Dirty - How simple is your database?
Dirty - How simple is your database?Felix Geisendörfer
 
Geographical Data Management for Web Applications
Geographical Data Management for Web ApplicationsGeographical Data Management for Web Applications
Geographical Data Management for Web ApplicationsSymeon Papadopoulos
 
Fabio Ghioni Asymmetric Warfare and Interception revealed
Fabio Ghioni Asymmetric Warfare and Interception revealedFabio Ghioni Asymmetric Warfare and Interception revealed
Fabio Ghioni Asymmetric Warfare and Interception revealedFabio Ghioni
 
The State of the GeoServer project
The State of the GeoServer projectThe State of the GeoServer project
The State of the GeoServer projectGeoSolutions
 
(ATS4-PLAT07) Interactive Charts Revamped
(ATS4-PLAT07) Interactive Charts Revamped(ATS4-PLAT07) Interactive Charts Revamped
(ATS4-PLAT07) Interactive Charts RevampedBIOVIA
 

Similar a Mapserver vs. geoserver (20)

Map Server comparison, OGC WMS - Random Extent
Map Server comparison, OGC WMS - Random ExtentMap Server comparison, OGC WMS - Random Extent
Map Server comparison, OGC WMS - Random Extent
 
第三回月次セミナー(公開版)
第三回月次セミナー(公開版)第三回月次セミナー(公開版)
第三回月次セミナー(公開版)
 
Geoint2017 training open interfaces - luis bermudez
Geoint2017 training   open interfaces - luis bermudezGeoint2017 training   open interfaces - luis bermudez
Geoint2017 training open interfaces - luis bermudez
 
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
Alex Smola, Professor in the Machine Learning Department, Carnegie Mellon Uni...
 
NoSQLを知る
NoSQLを知るNoSQLを知る
NoSQLを知る
 
Evaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated DatabasesEvaluating Data Freshness in Large Scale Replicated Databases
Evaluating Data Freshness in Large Scale Replicated Databases
 
Mvc express presentation
Mvc express presentationMvc express presentation
Mvc express presentation
 
Stress Testing and Analysing MapServer Performance
Stress Testing and Analysing MapServer PerformanceStress Testing and Analysing MapServer Performance
Stress Testing and Analysing MapServer Performance
 
Betting On Data Grids
Betting On Data GridsBetting On Data Grids
Betting On Data Grids
 
Introduction to nexux from zero to Hero
Introduction to nexux  from zero to HeroIntroduction to nexux  from zero to Hero
Introduction to nexux from zero to Hero
 
Modernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabricModernización del manejo de datos con v fabric
Modernización del manejo de datos con v fabric
 
State of GeoServer 2012
State of GeoServer 2012State of GeoServer 2012
State of GeoServer 2012
 
IPW2008 - my.opera.com scalability
IPW2008 - my.opera.com scalabilityIPW2008 - my.opera.com scalability
IPW2008 - my.opera.com scalability
 
What's new in GeoServer 2.2
What's new in GeoServer 2.2What's new in GeoServer 2.2
What's new in GeoServer 2.2
 
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)
Database sharding the right way: еasy, reliable, and open source (Esen Sagynov)
 
Dirty - How simple is your database?
Dirty - How simple is your database?Dirty - How simple is your database?
Dirty - How simple is your database?
 
Geographical Data Management for Web Applications
Geographical Data Management for Web ApplicationsGeographical Data Management for Web Applications
Geographical Data Management for Web Applications
 
Fabio Ghioni Asymmetric Warfare and Interception revealed
Fabio Ghioni Asymmetric Warfare and Interception revealedFabio Ghioni Asymmetric Warfare and Interception revealed
Fabio Ghioni Asymmetric Warfare and Interception revealed
 
The State of the GeoServer project
The State of the GeoServer projectThe State of the GeoServer project
The State of the GeoServer project
 
(ATS4-PLAT07) Interactive Charts Revamped
(ATS4-PLAT07) Interactive Charts Revamped(ATS4-PLAT07) Interactive Charts Revamped
(ATS4-PLAT07) Interactive Charts Revamped
 

Mapserver vs. geoserver

  • 1. W W W . R E F R A C T I O N S . N E T WMS Performance Tests! Mapserver & Geoserver FOSS4G 2007 Shapefiles vs. PostGIS, Concurrency, and other exciting tests... Presented by Brock Anderson and Justin Deoliveira
  • 2. W W W . R E F R A C T I O N S . N E T Presentation Outline • Goals of testing. • Quick review of WMS. • Description of the test environment. • Discussion of performance tests and results. • Questions.
  • 3. W W W . R E F R A C T I O N S . N E T Goals 1. Compare performance of WMS GetMap requests in Mapserver and Geoserver. 2. Identify configuration settings that will improve performance. 3. Identify and fix inefficiencies in Geoserver. We do not test stability, usability, etc., * We do not test styling or labelling. We focus on vector input.
  • 4. W W W . R E F R A C T I O N S . N E T Keeping the tests fair • Not an easy job! • We tried to understand what each server does under the hood to ensure we're not accidentally performing unnecessary processing on either server.
  • 5. W W W . R E F R A C T I O N S . N E T Web Map Service (WMS) http://server.org/wms? request=getmap& layers=states,lakes& bbox=-85,36,-60,49& format=png&... WMS User A Map
  • 6. W W W . R E F R A C T I O N S . N E T Test Environment Client Computer Server Computer Apache 2.2.4 (with mod_fcgi) Vector Data Mapserver 4.10.2 WMS requests JMeter Data 2.2 Tomcat 6.0.14 WMS requests Shapefiles Geoserver 1.6 beta 3 Additional Server Specs: Dual core (1.8Ghz per core). 2GB RAM. 7200RPM disk. Linux. PostgreSQL 8.2.4. PostGIS 1.2.
  • 7. W W W . R E F R A C T I O N S . N E T Test #1: PostGIS vs. Shapefiles • Two Data Sets: 3,000,000 Tiger roads in Texas 10,000 Tiger roads in Dallas, Texas • Both data sets are in PostGIS and shapefile format. • Spatial indexes on both data sets. • Mapserver and Geoserver layers point at the data. • Minimal styling. • JMeter issues WMS requests to fetch ~1,000 features, limited by the 'bbox' parameter. And the results are...
  • 8. W W W . R E F R A C T I O N S . N E T Test #1: PostGIS vs. Shapefiles Mapserver Geoserver 400 386 400 350 350 Response time (millisec onds) 300 300 250 250 200 200 150 150 100 100 50 39 47 42 42 33 50 50 27 0 0 1,000 of 10,000 1,000 of 3,000,000 1,000 of 10,000 1,000 of 3,000,000 Notes: This test uses two different data sets: one with 3 million features, the other with 10,000. Each bar is an average of 30 sample WMS requests, each using a different bounding box to fetch and draw appx. 1000 features (+/- 15%). The same 30 requests are executed for each scenario. One request at a time (no concurrency). Mapserver and Geoserver use the same data. Mapserver is using FastCGI via Apache/mod_fcgi. Spatial indexes on both data sets. Quadtree indexes generated by 'shptree'. No reprojection required. Minimal styling. Responses are 1-bit PNG images.
  • 9. W W W . R E F R A C T I O N S . N E T Test #2: Concurrent Requests • Using the same tiger roads data set with 10,000 records. • We issue multiple requests with pseudo-random BBOXes that fetch approximately 1,000 features. • The main difference is that now we're issuing multiple concurrent requests. Let's see what happened...
  • 10. W W W . R E F R A C T I O N S . N E T Test #2: Concurrent Requests Mapserver Geoserver 1500 1400 Response time (milliseconds) 1300 1200 1100 1000 900 800 700 500 600 300 400 100 200 -100 0 1 2 5 10 15 20 40 60 1 2 5 10 15 20 40 60 Notes: Data in PostGIS and shapefile formats. Mapserver and Geoserver use the same data. Mapserver is using FastCGI via Apache/mod_fcgi. 20 FastCGI mapserv processes. Geoserver uses connection pooling with 20 connections. Spatial indexes on both data sets. No reprojection required. Minimal styling. Responses are 2-color PNG images. More details in the appendix.
  • 11. W W W . R E F R A C T I O N S . N E T ... or Throughput, if you prefer Mapserver Throughput Geoserver Throughput 80 80 70 70 Responses per second 60 60 50 50 40 40 30 30 20 20 10 10 0 0 1 2 5 10 15 20 40 60 1 2 5 10 15 20 40 60 # Concurrent Requests # Concurrent Requests An alternative way to summarize the data collected for the concurrency test. (Higher lines are better here.)
  • 12. W W W . R E F R A C T I O N S . N E T Test #3: Reprojection Mapserver (using PROJ to reproject) Geoserver (using Geotools to reproject) 80 80 31 70 22 70 19 21 6 9 12 Response time (milliseconds) 60 60 50 0 50 0 4 40 40 30 30 20 20 10 10 0 0 None Geog WGS84 – Geog WGS84 – Geog WGS84 – UTM 14N UTM 14N UTM 14N SPS NAD83 WGS84 - SPS None Geog WGS84 – Geog WGS84 – Geog WGS84 – UTM 14N WGS84 UTM 14N WGS84 UTM 14N NAD27 SPS NAD83 - SPS NAD83 WGS84 NAD27 NAD83 PROJ optimizes by assuming these source Geotools is slightly faster than and target datums are equivalent. PROJ for these cases. Currently Mapserver calls PROJ for every Geoserver simplifies geometry before reprojecting. vertex, but it could improve by batching those into a single call.
  • 13. W W W . R E F R A C T I O N S . N E T CGI vs. FastCGI (Mapserver only) 90 81 80 Response time (milliseconds) 70 57 60 52 50 42 PostGIS 40 Shapefile 30 20 10 0 CGI FastCGI Notes: Average of 30 samples. One request at a time (no concurrency). Each request fetches one layer with 1000 features from a data set of 10,000. Spatial indices on both data sets. No reprojection required. Minimal styling. Responses are 1-bit PNG images. The same binary file was used for both CGI and FastCGI. FastCGI through Apache and mod_fcgi.
  • 14. W W W . R E F R A C T I O N S . N E T Breakdown of Mapserver Response Time 90 Time (in milliseconds) 80 70 Network delay 60 Write image 50 Draw Fetch & store 40 Query 30 Connect to DB Load map file 20 Start mapserv process 10 0 PostGIS Shapefile • FastCGI eliminates Start mapserv process and Connect to DB costs. • The Write image step is dependant on output format.
  • 15. W W W . R E F R A C T I O N S . N E T Breakdown of Geoserver Response Time 404: Document not found
  • 16. W W W . R E F R A C T I O N S . N E T Servlet Container and Java (Geoserver only) Jetty 6.0.2 Tomcat 6.0.14 Response time (milliseconds) 200 179 200 160 160 120 120 Tomcat 6 95 95 doesn't 80 64 80 support 63 Java 1.4 40 40 0 0 Java 1.4 Java 5 Java 6 Java 1.4 Java 5 Java 6 • These results show average response times for the same WMS request when Geoserver is backed by different Servlet containers and Java versions. • Using shapefile backend. • Conclusion: Use Java 6!
  • 17. W W W . R E F R A C T I O N S . N E T Outcome of the tests • Lots of performance optimizations to Geoserver which will be available in version 1.6. • Identified a few places where Mapserver can improve too. (These will be reported as “bugs” as time permits.) • Both servers can be FAST, but require some special configuration.
  • 18. W W W . R E F R A C T I O N S . N E T The Road to Speed Mapserver Geoserver Response time (milliseconds) 1000 1000 800 800 600 600 400 400 200 200 0 0 Start (CGI) Switch to Re-order Output Start Logging Transp. Output JVM Code FastCGI 'epsg' file format Off styles off format settings change Data sources with high All will be in Geoserver 1.6 connection overhead will benefit much more from FastCGI.
  • 19. W W W . R E F R A C T I O N S . N E T Performance Tips (Mapserver) • Beware of PROJECTION 'init=epsg:4326' END The “init=” syntax causes one lookup in the PROJ4 'epsg' file for every occurrence in the map file. (Move your most-used EPSG codes to the top of the 'epsg' file.) • Use FastCGI instead of ordinary CGI. Instruction here: http://mapserver.gis.umn.edu/docs/howto/fastcgi • Ensure you have enough FastCGI processes.
  • 20. W W W . R E F R A C T I O N S . N E T Performance Tips (Geoserver) • Geoserver has many features enabled by default. Gain performance by disabling features you don't need. – Transparent styles double draw time. Use opacity=1 in your SLD to disable. – Antialiasing linework is costly. Try '&format_options=antialias:none' to disable. – Experiment with disabling “PNG native acceleration” • Favour Java 6 over Java 5 over Java 1.4. • JVM Settings: Increase heap size. Use -server switch. • Experiment with different shapefile index depths. • Turn off logging
  • 21. W W W . R E F R A C T I O N S . N E T How can the servers improve? Mapserver Geoserver • More efficient scanning • Various optimizations to of shapefile quadtree the renderer. indexes. [ Bug Reported ] [ Fixes Committed ] • Batch PROJ calls when • More efficient scanning doing on-the-fly of shapefile quadtree reprojection. index. [ Fixes Committed ] • Reduce number of 'epsg' lookups on map files.
  • 22. W W W . R E F R A C T I O N S . N E T Questions? Contact Us. Brock Anderson: banders@refractions.net Justin Deolivera: jdeolive@openplans.org
  • 23. W W W . R E F R A C T I O N S . N E T General WMS Performance Tips • Only fetch from your data source the features that will be drawn, otherwise the servers have to spend time scanning and discarding the unused ones. • Output format affects response time. 256 color PNG is faster to create than PNG24 on both servers. • On-the-fly reprojection has a price. Store data in the same projection it's most commonly requested in.
  • 24. W W W . R E F R A C T I O N S . N E T Appendix Breakdown of Mapserver Response Time The graph represents mapserv running in CGI mode to show all startup costs. Metrics for “Load map file”, “Connect to DB”, “Fetch & store”, “Draw” and “Write image” were collected by modifying source code to capture and log durarions of those operations. “Query” time measured with PostgreSQL's explain analyze command. “Start mapserv process” + “Network delay” = difference between response times recorded by JMeter and my custom mapserv logging which recorded the total time servicing a request. PostGIS Shapefile Start mapserv process 15ms 15ms Load map file 3ms 3ms Connect to DB 14ms n/a Query 20ms n/a Fetch 7ms n/a Draw 11ms 28ms Write image 8ms 8ms Network delay 3ms 3ms PostGIS vs Shapefiles This test uses two different data sets: one with 3,000,000 features, the other with 10,000. Each request fetches 1000 features by limiting with a 'bbox' WMS parameter. Each bar is an average of 30 samples. One request at a time (no concurrency). Mapserver and Geoserver use the same data. Mapserver is using FastCGI via Apache/mod_fcgi. Spatial indices on both data sets. The shapefile indices were generated with 'shptree'. No reprojection required. Minimal styling. Responses are 2-color PNG images (indexed color). The unusual Mapserver result for the case of a 3 million record shapefile has been reported to the Mapserver bug tracker: http://trac.osgeo.org/mapserver/ticket/2282
  • 25. W W W . R E F R A C T I O N S . N E T Appendix Concurrency and Throughput Notes: Data in PostGIS and shapefile formats. Mapserver and Geoserver use the same data. Mapserver is using FastCGI via Apache/mod_fcgi. 20 FastCGI mapserv processes. Geoserver uses connection pooling with 20 connections. Spatial indexes on both data sets. No reprojection required. Minimal styling. Responses are 2-color PNG images (indexed color). “Concurrent” requests were fired in bursts with zero ramp up (as near to simultaneously as possible). I.e. For the test of 10 concurrent requests, all ten requests were fired at the same time. Once all the responses came back then the next burst of requests went out. Requests use random bboxes which fetch ~1000 features. The same random bboxes are used against both servers. Mapserver (Response times) Geoserver (Response times) PostGIS Shapefile PostGIS Shapefile 1 50 39 1 42 27 2 51 40 Response times are measured in 2 43 30 5 91 75 5 81 47 milliseconds. Throughput times 10 182 147 10 166 103 represent responses per second. 15 269 229 15 261 162 The concurrency level is the left-most 20 315 283 20 378 252 column in each table (1, 2, 5, 10, ...). 40 784 612 40 747 514 60 1269 905 60 1170 773 Mapserver (Throughput times) Geoserver (Throughput times) PostGIS Shapefile PostGIS Shapefile 1 19.6 24.9 1 24.6 35.6 2 28.2 33.4 2 32.3 41.8 5 35.4 51.6 5 47.1 68.6 10 38.4 53.8 10 49.9 74.1 15 42.5 55 15 49.2 73.3 20 42.4 54.1 20 47.7 68 40 43.2 54.9 40 48.3 68 60 43.1 51.5 60 47.8 70.7
  • 26. W W W . R E F R A C T I O N S . N E T Appendix Summary of Geoserver code changes made to improve performance: • optimized access to the shapefile spatial index (it was reading tiny sections of the file instead of doing some buffered access) • figure out the optmimal palette out of the SLD style (when possible, that is, when antialiasing is off) * don't access the dbf file when not necessary * avoid unecessary operations, like duplicating over and over the same coordinate[] during rendering (loading it, generalize, reproject, copy back in the geometry and so on, now the array it's copied just once) Raw list of changes here: http://jira.codehaus.org/secure/ManageLinks.jspa?id=55176

Notas del editor

  1. Brock:
  2. Brock: WMS Performance
  3. Brock: WMS Performance
  4. Justin: -explain the two out of the box behave quite differently - fast cgi vs database connection pooling - tried to make as equal possible ==> GeoSever doing < 1 bit png output (ask andrea about appropriate terminology)
  5. Justin: - Breif overview of WMS for the layman WMS Performance
  6. Brock: WMS Performance
  7. Brock: - random bounding box generation - exact same requests for each server - 10,000 subset of 3 million WMS Performance
  8. Brock: Response time in milliseconds on the Y-axis. Three interesting ways to look at the graph - PostGIS vs. Shapefile - Indexing (large data set vs. small data set) - Mapserver vs. Geoserver - Geoserver had many code changes to improve performance. WMS Performance
  9. Justin: - explain how the concurrency, we chose a “worst case” concurrency model, there are many others WMS Performance
  10. Justin: - suprising results - expected postgis to perform much better under a load - however, read-only access means no locking for shapefiles - Mapserver with fast cgi with 20 processes - GeoServer with connectino pooling at 20 connections WMS Performance
  11. Justin: - same data, different metric, througput - mapserver remains consistent for longer, geoserver starts to degrade around 15 concurrent requests (garbage collector?) Wms Performance
  12. Brock: This test only scratches the surface. At least it gives a sense of how much on-the-fly reprojection affects response time. WMS Performance
  13. Brock: What is FastCGI? Conclusion: use FastCGI unless you have compelling reasons no to. WMS Performance
  14. Brock WMS Performance
  15. WMS Performance
  16. Justin WMS Performance
  17. WMS Performance
  18. Brock does mapserver Justin does GeoServer - out of the box geoserver much slower ==> defautl 24 bit rendering, logging on, default styling has transparency , anti-aliasing on by default
  19. Brock WMS Performance
  20. WMS Performance
  21. WMS Performance
  22. Introduction to uDig
  23. WMS Performance
  24. WMS Performance
  25. WMS Performance
  26. WMS Performance