How to cache map services with several computers
I have a mapservice on large area (a national map) and I want cache it on 12 scale levels. I try to use ArcCatalog to do this, but it cannot complete the job. The reference on "http://blogs.esri.com/Support/blogs/mappingcenter/archive/2009/07/02/tips-for-caching-arcgis-server-map-services-faster.aspx" has the item "Use more than one computer to cache". How do I do this? Thanks.
Mapping Center Answer:
The basic idea is to replicate the caching environment on a second computer and subdivide the caching job by either cache scale or geographically. That also means having ArcGIS Server running on each additional computer where you have defined an identical map service to be the basis for caching.
When we do this, we expect to copy the cache files into a master service's cache to test and verify the complete product. We also run one last caching process on this master service after all the other files have been copied with the intent of caching any empty tiles to ensure all the tiles are present.
Managing disk resources is important--you do not want to have the other computers caching into the same cache location--that will make that location become file I/O-bound, meaning that all processes will be slowed down while waiting to write to that disk. The same goes for the data being used in the MXDs that are the basis of the cached services. Ideally, all the data is replicated for each computer that is caching.
We also prefer to have the data for the map on a different physical drive than the arcgisserver folder from where the cache is being stored.
In all cases, we use a rounded down 5/4 instances for caching per CPU on each computer. So, a 2 CPU computer would have 2 instance, and an 8 CPU computer could have 9 or 10. Any more than this and we become CPU-bound. For instance, 3 instances per CPU actually takes longer to complete caching a map than 2. We have also found that for that last caching run on the master service using 1 instance, regardless of the number of CPUs is the most stable way to guarantee that a complete cache is produced.
To copy the cached files between computers we use SecureCopy or RichCopy. We have both software applications in-house and I cannot advocate one over the other--both are sufficient for the task; and there are likely others. The important issue is that the Windows Operating system is not capable of moving millions of files around at once.
That said, all of this applies to ArcGIS 9.3.1. or exploded cache (versus managed cache) in ArcGIS 10. We have not tried this yet with a managed cache in ArcGIS 10.
Last, this is not a precise science and took an accumulated set of experiences for us to learn. Expect to have some trials (plural) and errors (plural). Ideally, plan on it taking four to five times longer to actually get done than it will take to complete the caching. We also check our caches within the arcgiscache folder initially to verify that we are getting what we expect from each computer caching--this allows us to find errors immediately and correct them, rather than wait until the caching job is done to find issues.
If you would like to post a comment, please login.