GeoServer operation optimization can be carried out at several levels, 1, hardware, operating system level, 2, Java Operating environment level, 3, Application server level, 4, Spatial data organization management level.
The hardware is of course the more memory the better, the higher the CPU running efficiency, the more CPU number the better. Java programs are generally more memory-consuming, geoserver managing large amounts of space and attribute data increases the amount of memory used. However, the memory usage is limited, the Windows program 4G process space memory allocation is the operating system occupied 2G, application 2g;linux program allocation is operating system 1G, application 3G, so, General Linux Java program Stack maximum can be larger than Windows. The number of CPUs can give full play to the advantages of Java multi-threaded operation, CPU operating efficiency is high calculation speed, for GIS needs a lot of space operations, can significantly improve the user's response. If you use the WMS service to get pictures instantly, the graphics card with excellent performance can improve the rendering speed of the map very well.
Java Runtime Environment, you can refer to the GeoServer documentation, HTTP://DOCS.GEOSERVER.ORG/1.7.4/USER/PRODUCTION/CONTAINER.HTML#OPTIMIZE-YOUR-JVM, Configure Java Virtual machines,-server in server mode, precompiled bytecode and optimized bytecode;-xmx1024m-xms48m, set the minimum, maximum stack, and recommend that physical memory allow the stack to be set as large as possible;-XX: softreflrupolicymspermb=36000, as far as possible delay soft reference cache object is garbage collection,-xx:maxpermsize=128m, increase the Java class own data description object storage space, because geoserver involves a relatively many classes, Plus part containers (tomcat, etc.) also have many other classes;-XX:XX:+USEPARALLELGC, turn on parallel garbage collection.
Application server-level optimization involves areas such as GeoServer container, GeoServer service policy settings, available caching, and log output. Tomcat, jetty, etc. have different optimization schemes, you can refer to the relevant documents; The service policy setting can be: SPEED BUFFER File Partial-buffer, Can be set in Web.xml, speed is the fastest policy, the cache that can be used includes Geowebcache, Tilecache, etc., you can refer to related documentation for detailed configuration and integration instructions; the more logs output, the slower the service responds.
GeoServer uses Geotools Toolkit to implement related WMS, WFS and other services, Geotools uses JTS as its spatial object model, the memory cache of spatial data and the use of spatial index can significantly improve service performance.