ImagePixelCache
, IndexPixelCache
, and WarpPixelCache
ElementsDecoding imagery requires CPU processing. Express Server can reduce these CPU requirements by saving raw pixels in the disk cache. This can improve performance significantly for active sites. However, this comes at the expense of increased disk usage.
Express Server offers three distinct strategies for caching pixels, each represented by a distinct cache. Each of these caches lives on disk and its size, location and pruning interval are all determined by the DiskCache
element, of which these are subelements.
ImagePixelCache
This strategy involves caching the pixels from images as they are decoded. This strategy may be useful for sites that have many different images to serve, and are not using the spatial index or WMS features of Express Server.
Recommendation: enable for non-WMS sites
IndexPixelCache
This strategy involves caching the pixels decoded from a spatial index. A spatial index is a special type of Express Server catalog that dynamically combines a collection of spatially related images into a single mosaic. WMS GetMap
requests, and getimage?item=iserv-catalog-index
are using the spatial index.
When this strategy is employed, the pixels from the index are cached, rather than from the individual images that are included in the index.
Recommendation: enable for WMS sites
WarpPixelCache
This strategy involves caching pixels after they have been reprojected (warped). This only affects WMS GetMap
requests which require reprojection.
Recommendation: enable for WMS sites in which most requests require reprojection
Each of these elements, ImagePixelCache
, IndexPixelCache
, and WarpPixelCache
, supports the following editable attributes:
enabled
If "true", then this cache is enabled. Otherwise, this cache will not be used.
NOTE: The ImagePixelCache
, IndexPixelCache
, and WarpPixelCache
can be used in combination with one another, but to reduce the performance costs associated with filling the caches, it is recommended that you enable only one pixel caching strategy.
tileWidth
This indicates width in pixels of each block saved in the cache. The default value is 200.
tileHeight
This indicates the height in pixels of each block saved in the cache. The default value is 200.
utility
The utility parameter specifies the minimum allowable ratio of scene pixels to tile pixels. The pixel caches sort an image into tiles of fixed width and height. When Express Server receives a request to decode an image (i.e. the getimage
or GetMap
requests), the pixel cache will decode all the tiles that intersect with the specified scene.
In most cases the area of all the tiles will be larger than the area of the requested scene. The result of this is that more pixels will be decoded than are necessary to satisfy the given request, initially hurting the performance of the server. However, because these tiles are then cached, subsequent requests will not have to decode any pixels, improving performance of the server.
The utility parameter specifies the minimum allowable ratio of scene pixels to tile pixels. If the number of pixels in the requested scene divided by the number of pixels required to decode the intersecting tiles is less than this value, then the tiles will be clipped.
Here are some examples of using the utility
parameter:
A utility of 1.0 (or more) specifies that no extra pixels will ever be decoded, and only those tiles that fall completely within the bounds of a requested scene will be cached. This setting causes the least initial overhead, but because fewer tiles are cached, performance improvements resulting from the cache will take longer to accrue.
A utility of 0 indicates that all intersecting tiles will be decoded, regardless of the size of the requested scene. This is the default value. This may cause some initial performance degradation, but since all tiles are cached, performance will quickly improve.
A utility of .85 specifies that the pixel cache will always make sure that 85% of the pixels it decodes for a particular scene will be used in that scene. If the number of pixels required to fill the intersecting tiles exceeds that percentage, then they will be clipped.
The default and recommended value for utility is 0.
maxMag
This specifies the maximum image magnification at which caching occurs. All requests for scenes at magnifications higher than this value will not be cached; all requests for scenes at or below this magnification will be cached. Decimal values greater than 0 and less than or equal to 1 are valid.
The default value is 1.0, indicating that decode requests at full resolution (1.0) will be cached, as will all decode requests at lower magnifications (i.e. zoomed out).
Requests at magnifications greater than 1 will not be cached.