It can take a long time to create a cache that covers large scales over a broad area. This topic describes some of the biggest factors that affect caching speed. You can read more detailed considerations in Tips and best practices for map caches.
Use local file geodatabases
If you can place a copy of the source GIS datasets on the server, you’ll notice greater speed and stability during cache creation. The caching process makes thousands or even millions of requests for data, and if those requests don’t have to leave the machine, your tiles will draw more rapidly.
The ideal approach is to place an identical file geodatabase at an identical path on each GIS server machine in your cluster. Register the file geodatabase’s local folder with ArcGIS Server as a data store item. Within your map document, use local paths to the data.
Avoid projection on the fly
For the best performance, project your source data into the same coordinate system as your map to avoid projection on the fly. People naturally hesitate to put their working databases in a projection such as Web Mercator. However, the data you put on the server could be a one-way replica of your production database that might only exist for the purpose of creating the cache and satisfying user queries.
Choose antialiasing levels carefully
Antialiasing is a technique that ArcGIS uses to smooth the edges of lines and labels so they don’t appear pixilated. Text antialiasing has little impact on performance, but feature antialiasing is a computationally intensive action that slows caching.
Applying at least some level of feature antialiasing can make your vector map look more professional. Just be aware that each increase in antialiasing quality can greatly extend the amount of time it takes to make a cache. The Fastest or Fast settings are good enough for most caches. Avoid the higher quality settings such as Best unless your own test caches have shown you need that level of quality.
Fully utilize your CPU without overworking it
For the fastest tile creation, your CPU should be working near 100 percent during the tile creation, but should not be maxed out at 100 percent. You can watch your system activity using tools such as Windows Task Manager or Performance Monitor.
Because each map is different, achieving this level of CPU usage may require some trial and error with your cache settings. There are two major settings that affect how much server power you dedicate toward caching:
- The maximum number of instances of the CachingTools service allowed to run on each machine in the cluster—A good starting value for this is n + 1, where n is the number of CPU cores in a typical machine in your cluster.
- The maximum number of instances of CachingTools that your cache job is allowed to utilize for the cluster as a whole—A good starting value is the default you see when you run Manage Map Server Cache Tiles. This reflects the number of machines in your cluster and the maximum number of CachingTools instances each is allowed to run. If you anticipate adding other GIS server machines during the caching job, enter -1 to remove the cap on the number of instances.
The values recommended above are just a starting point for your own testing and iteration. See Allocation of server resources to caching for more details and formulas for setting these values.
Create only the tiles you need
You don't always need to create tiles across the full extent of your map at all scales. Some tiles are visited frequently and other tiles are never visited, especially in places where data is sparse at large scales.
Before starting a cache job, carefully plan which geographies and scales you must pregenerate and which tiles could be generated on demand (or displayed with a "Data not available" tile as described in Common caching questions). The small scales aren’t a problem because they require relatively few tiles. It’s the large scales that require a more strategic approach.
Create a feature class to delineate the most interesting and important areas of your map. When you cache your large scales, use this feature class to constrain tile creation. A feature class with many thousands of vertices can slow down the caching tools, so you may need to generalize it first using a tool such as Simplify Polygon.
With some planning, you can avoid creating thousands of tiles outside your geography of interest or tiles devoid of features.
Finally, consider these additional tips for accelerating your caching:
- Avoid the exploded format cache. It takes longer to generate and is more cumbersome to move around. Stay with the default compact format.
- Sometimes antivirus software can drain resources from the cache generation, especially if the new files are being scanned at creation time. If you suspect that your antivirus software is competing with ArcGIS Server for memory or CPU resources, get permission from your system administrator to temporarily disable or suppress the antivirus software while you build the cache.
- If speed is more of a problem than amount of required disk space, avoid the optimized PNG format cache introduced at ArcGIS 10.1. This format is great for keeping cache size small, but it can take longer to build because it must determine the optimal bit depth for each tile. Consider using the MIXED format as an alternative.
- When you analyze your map document before publishing, fix as many of the performance warnings as possible. For example, you will see an analyzer warning if your dataset does not have a spatial index. Taking the time to build a spatial index could result in faster map service draw times and tile creation.