Performance tips for Web applications

Performance of a Web application involves both the speed at which the application responds to users and the number of users that an application can accommodate. When you think about improving the performance of your ArcGIS Server Web applications, the first thing that may come to mind is adding or upgrading hardware. However, there may be other things you can adjust in your application, your map, or your server settings that will improve the performance of your Web applications.

Design your map for performance

Designing maps for the Web is very different from designing paper maps, or even maps that you commonly work with in desktop applications such as ArcMap. If you have a map document that you commonly use in ArcMap, you may want to save a copy instead of publishing the map directly to ArcGIS Server. Using the copy, you can make some optimizations specifically for Web viewing.

What's so different about maps that you'll view on the Web? To get the best performance of your map over the Web, it's recommended that you use the Map Service Publishing Toolbar in ArcMap to examine your map document. Resolve all the Errors and as many of the Warnings as you can, then publish the map using the toolbar. This bases your service on a map service definition (.msd, or MSD) file, which is the way to publish your service for the fastest drawing available.

Regardless of whether your map service is MSD-based, you should still consider caching it for performance. Caching a map means that you create and store a set of prerendered map images that can very quickly be used by the application instead of waiting for the map to draw each time. If caching the map, you'll need to design the map to look good at all the scales at which it will be cached. See Planning a map cache for ideas on how to do this.

Cache your map services

Cached map services distribute predrawn map tiles instead of drawing map images on the fly. Cached services not only improve the display speed of your map but also greatly increase the number of users your server can accommodate. For a public-facing Web application, you should always cache the basemap service and attempt to cache all the operational overlay services that are feasible to cache.

Evaluate the image format that your map cache is built with

The image format that you choose affects the performance, appearance, and size on disk of your cache. PNG 8 works well for many MXD-based overlay services, while PNG 32 is a better choice for MSD-based overlay services. For basemaps, JPEG is often the best choice, especially if the map has a lot of color variation. See Available map cache properties to learn more about each image format.

Avoid caching map services in PNG 24

Internet Explorer 6 has limitations in its ability to display transparency for PNG 24 images. Avoid this scenario by doing the following:

Use ArcGIS Server Internet connections when possible

Connect to your server using ArcGIS Server Internet connections to make more efficient use of server context requests. ArcGIS Server Local connections should be used only when the application requires changing the state of the service, which includes editing data with the Web ADF.

Remove unnecessary Web controls

The default Web Mapping Application that you see in Manager or your IDE includes Web controls such as the TableOfContents, OverviewMap, and Scalebar. As you interact with your application, these controls request new images and updated status information. Eliminating controls from the application that are rarely used will help improve the application performance and scalability of the system.

Deploy to a production quality Web server

For optimum performance, it's recommended that you deploy the Web applications and the REST and Web Services Handlers to a production quality Web server. The Web servers used internally by ArcGIS Server are not intended to be used in a production environment. Please refer to the System Requirements for a full list of supported servers. Among the popular ones are IBM WebSphere, BEA Weblogic, and so on.

It's also recommended that you configure an appropriate heap size for your Web server's JVM using the -Xms and -Xmx JVM flags. This will greatly enhance the scalability of your Web applications. For example, starting with an initial heap size of 256 MB and going up to a maximum of 1 GB by using the JVM options -Xms256m -Xmx1024m is usually sufficient. Please check your Web server's documentation for details on how to configure the heap size.

Avoid unnecessarily large queries

ArcGIS Server map services limit the number of records that can be returned by a query to 1,000 by default. Keep this value or lower it for best performance with queries. You can change the number of allowable result records by editing the MaxRecordCount property in the map service configuration file.

Use caution if you raise the default value. Queries that return more than 2,000 records require the software to create scratch workspaces in your system TEMP directory to manage the result records. This can cause performance to degrade.

Use local paths

Using local paths to source maps and data tends to give better performance than using network or Universal Naming Convention (UNC) paths. If you use local paths and have more than one server object container (SOC) machine in your deployment, you'll need to duplicate the data on each machine using identical paths.

For help deciding whether to use a central ArcSDE server or local file geodatabases, see Data storage considerations for ArcGIS Server.


11/18/2013