W W W. R E F R A C T I O N S. N E T WMS Performance Tests! Mapserver & Geoserver FOSS4G 2007 Presented by Brock Anderson and Justin Deoliveira Shapefiles.

Slides:



Advertisements
Similar presentations
In Production Juan Marin. Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment.
Advertisements

XIr2 Recommended Performance Tuning Andy Erthal BI Practice Manager.
R2: An application-level kernel for record and replay Z. Guo, X. Wang, J. Tang, X. Liu, Z. Xu, M. Wu, M. F. Kaashoek, Z. Zhang, (MSR Asia, Tsinghua, MIT),
Adobe Photoshop CS Design Professional FOR THE WEB CREATING IMAGES.
Chapter 17 Creating Images for the Web. Chapter Lessons Learn about Web features Optimize images for Web use Create a button for a Web page Create slices.
External Sorting CS634 Lecture 10, Mar 5, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Adobe Photoshop 6 Advanced Level Course. Easy Fixes Photoshop is the best tool to fix old, torn and faded photographs, and can fix almost all flaws in.
Efficient Instruction Set Randomization Using Software Dynamic Translation Michael Crane Wei Hu.
Web Feature Service and Web Map Service WATER FOR A HEALTHY COUNTRY FLAGSHIP SISS Workshop v2.3 Pavel Golodoniuc, Josh Vote 8 May 2013.
Chocolate Bar! luqili. Milestone 3 Speed 11% of final mark 7%: path quality and speed –Some cleverness required for full marks –Implement some A* techniques.
CS 345: Topics in Data Warehousing Tuesday, October 19, 2004.
David Blasby The Open Planning Project New York. Goals Explain what a WFS and WMS are, and when to use them Be able to create simple spatial web applications.
Lecture Set 14 B new Introduction to Databases - Database Processing: The Connected Model (Using DataReaders)
© Dennis Shasha, Philippe Bonnet – 2013 Communicating with the Outside.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
Copyright © 2006 by Maribeth H. Price 2-1 Chapter 2 Working with ArcMap.
Extension to Geoserver for reading ESRI Mapcaches Pär Jonsson Project manager Lantmäteriet, Sweden Mauritz Bomark System architect Lantmäteriet,
CMAQ Runtime Performance as Affected by Number of Processors and NFS Writes Patricia A. Bresnahan, a * Ahmed Ibrahim b, Jesse Bash a and David Miller a.
Preparing and Deploying Data to ArcPad Juan Luera.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 External Sorting Chapter 13.
Section 9: Configuring Roaming Profiles and Folder Redirection Managing User Profiles Configuring Folder Redirection Using Folder Redirection and Roaming.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
A GeoSpatial Mapping Architecture
Adobe Photoshop CS3 Revealed – Chapter 16 FOR THE WEB CREATING IMAGES.
GIS in the cloud: implementing a Web Map Service on Google App Engine Jon Blower Reading e-Science Centre University of Reading United Kingdom
Thread basics. A computer process Every time a program is executed a process is created It is managed via a data structure that keeps all things memory.
1 Introduction To Geographical Data and TEISS Maps Angelique Luedeker, ITEP/TAMS Center.
Apache Solr Dima Ionut Daniel. Contents What is Apache Solr? Architecture Features Core Solr Concepts Configuration Conclusions Bibliography.
Uploading Data Matthew Hanson  GeoNode made up of several components  Web Framework – Django  OGC Server – GeoServer  Database – PostGIS.
GeoServer Prof. Wenwen Li School of Geographical Sciences and Urban Planning 5644 Coor Hall
SSE WebMapViewer Recent Developments Steven Smolders SSE Workshop ESA - ESRIN, Frascati, Rome.
Oracle Announced New In- Memory Database G1 Emre Eftelioglu, Fen Liu [09/27/13] 1 [1]
A Web Based Job Submission System for a Physics Computing Cluster David Jones IOP Particle Physics 2004 Birmingham 1.
09/09/201009/09/2010 Open Source Geospatial Foundation 1 1 ERDAS : Overview Background – First participation – Tested on Windows server – Java based for.
Open Source Geospatial Foundation 1 Cadcorp GeognoSIS, Constellation-SDI, GeoServer, Mapnik, MapServer, QGIS Server WMS Benchmarking 2011.
Open Source Geospatial Foundation1 Andrea Aime (GeoServer) Jeff McKenna (MapServer) WMS Performance Shootout.
GENERAL SCALABILITY CONSIDERATIONS
2D Graphics Optimizations
Bishnu Priya Nanda , Tata Consultancy Services Ltd.
CS222: Principles of Data Management Lecture #4 Catalogs, Buffer Manager, File Organizations Instructor: Chen Li.
Understanding and Improving Server Performance
Data Virtualization Demoette… Packaged Query Single Select Option
Designing High Performance BIRT Reports
Processes and threads.
Chapter 3: Process Concept
Topics Introduction Hardware and Software How Computers Store Data
Software Architecture in Practice
LOCO Extract – Transform - Load
Processes and Threads Processes and their scheduling
MCTS Guide to Microsoft Windows 7
Database Performance Tuning and Query Optimization
Spatial Online Sampling and Aggregation
Data Structures and Algorithms
Query Optimization Techniques
Lecture 08: Memory Hierarchy Cache Performance
Computer Architecture
Moodle Scalability What is Scalability?
Topics Introduction Hardware and Software How Computers Store Data
Geographic Data Primitives
Electronic Field Study Advanced User Training
CS222/CS122C: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
Creating Images for the Web
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Chapter 11 Database Performance Tuning and Query Optimization
CS222p: Principles of Data Management Lecture #4 Catalogs, File Organizations Instructor: Chen Li.
Little Man Computer There’s a little man in the mailroom that follows each instruction to the letter but he can only follow one instruction at a time.
Database Systems (資料庫系統)
Query Optimization Techniques
Survey Results Respondents: 39 of 51 – 76%
Presentation transcript:

W W W. R E F R A C T I O N S. N E T WMS Performance Tests! Mapserver & Geoserver FOSS4G 2007 Presented by Brock Anderson and Justin Deoliveira Shapefiles vs. PostGIS, Concurrency, and other exciting tests...

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 TGoals 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) WMS User request=getmap& layers=states,lakes& bbox=-85,36,-60,49& format=png&... A Map

W W W. R E F R A C T I O N S. N E T Test Environment Shapefile s Mapserve r Server ComputerClient Computer JMeter 2.2 WMS requests Data Additional Server Specs: Dual core (1.8Ghz per core). 2GB RAM. 7200RPM disk. Linux. PostgreSQL PostGIS 1.2. Apache (with mod_fcgi) Geoserve r 1.6 beta 3 Tomcat WMS requests Vector Data

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 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 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 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 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 Currently Mapserver calls PROJ for every vertex, but it could improve by batching those into a single call. PROJ optimizes by assuming these source and target datums are equivalent. Geotools is slightly faster than PROJ for these cases. Geoserver simplifies geometry before reprojecting

W W W. R E F R A C T I O N S. N E T CGI vs. FastCGI (Mapserver only) 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 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) 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! Tomcat 6 doesn't support Java 1.4

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 All will be in Geoserver 1.6 Data sources with high 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: 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 More efficient scanning of shapefile quadtree indexes. [ Bug Reported ] Batch PROJ calls when doing on-the-fly reprojection. Reduce number of 'epsg' lookups on map files. Geoserver Various optimizations to the renderer. [ Fixes Committed ] More efficient scanning of shapefile quadtree index. [ Fixes Committed ]

W W W. R E F R A C T I O N S. N E T Questions? Contact Us. Brock Anderson: Justin Deolivera:

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 TAppendix 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 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:

W W W. R E F R A C T I O N S. N E TAppendix 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. Response times are measured in milliseconds. Throughput times represent responses per second. The concurrency level is the left-most column in each table (1, 2, 5, 10,...).

W W W. R E F R A C T I O N S. N E TAppendix 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: