Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "In Production Juan Marin. Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment."— Presentation transcript:

1 In Production Juan Marin

2 Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment Monitoring your environment Example

3 Introduction No recipes, just guidelines Security Criteria for the quality of a production deployment: – Reliability – Availability – Performance

4 Change default admin user!!! Block geoserver/web, access only internally Use roles New security subsystem coming in 2.2 Dont forget about security

5 Reliability Disable unused services Control server resources – Set WMS rendering memory allocation and processing time limits – Set WFS response size limits – Optimize WFS response types Limit concurrent requests – Limit available server threads to reduce concurrency – Implement control flow to queue requests and avoid server overload

6 Change default logging

7 Avoid system overload Use control flow plugin Limits # of concurrent requests by: – Service type (i.e. WMS, WFS, global) – User (cookie based, browsers) – IP address (any client)

8 Control Flow

9

10 Availability Use mechanism to detect server unresponsiveness and restart if necessary (i.e. watchdog) Use load balancing across a pool of servers Provide high availability by using redundant hardware and software components throughout the system

11 Data Optimizations Sometimes the most important thing to do!! Prepare your maps – Symbology that makes sense – Scale dependency Store vector and raster data in the most frequently requested coordinate system

12 High Availability Configurations Load Balancer (i.e. HAProxy)

13 Performance Optimize data and map configuration – Optimize raster and vector data storage – Dont show too much data at once (~1000 features per map request) Use most recent version of Oracle JVM – Run in server mode – Configure options for maximum performance Install native code extensions for JAI and Image I/O Cluster your deployment – Better performance under load

14 Data optimizations Raster optimizations – Use correct format (GeoTiff, BigTiff, etc.) – Use ImageMosaic – Use ImagePyramid Vector optimizations – Make sure proper Spatial Index is being used – Use a spatial database Validate connections Use connection pooling – Generalize features for higher zoom levels – Avoid shapefile when filtering on attributes

15 GeoWebCache Cache tiles for fast map rendering Performance is sometimes orders of magnitude faster than regular WMS GeoWebCache is extremely fast, with some unique features – Integrated with GeoServer or standalone with any WMS – Can expire tiles by reading a GeoRSS feed – Seed tile cache down to a certain zoom level, dynamically cache below that

16 Runtime optimizations JVM settings for production (example) – -server: run in server mode – -Xms2048m -Xmx2048m: maximum heap size, allocates it all at startup – -XX:PermSize=128m -XX:MaxPermSize=256m: sets size and maximum size of permanent collection memory. Very important since GeoServer uses a lot of classes – -XX: SoftRefLRUPolicyMSPerMB=3600: Increases the effectiveness of datastore cache references by increasing the lifetime of soft references – -XX:+UserParalleGC: enables multi-threaded garbage collection. Use with multicore systems only – -XX:+AggressiveOpt: enables experimental optimizations that will be defaults in future versions of the JVM

17 Container tuning: Optimize Tomcat Limit number of concurrent threads in Tomcat ( /conf/server.xml) Install Apache Portable Runtime (APR) more info here doc/apr.html doc/apr.html

18 Measuring your environment JMeter VisualVM

19 Monitoring your environment

20 Example Data – Washington DC OSM Software – Ubuntu – PostgreSQL Postgis 2.0 – Tomcat – GeoServer – JVM: OpenJDK6, Oracle JDK6 and Oracle JDK7 Hardware – 4 cores – 8GB RAM

21 Example data

22 Results

23 References GeoServer in Production White Paper production/register/?target=/publications/geoserver- production/ GeoServer on steroids steroids

24 Questions? Thank You


Download ppt "In Production Juan Marin. Agenda Introduction Reliability Availability Performance Data optimizations Runtime optimizations Measuring your environment."

Similar presentations


Ads by Google