Select to view content in your preferred language

Cache running service/application

2148
7
12-13-2013 03:18 AM
BeraAkamole
Deactivated User
Hi

Im going to cache a web service for the first time and have some questions:

We are running a number of web applications consisting of about 4 services each. I want to cache one of these services (DVA_Fastighetskartan)

I cant shut down the service so i need it to run in 'Dynamic mode' while the caching process is running. The caching process will go on for 2-3 days. I set the service to run on 'tiles from a cache memory' and 'Update cache manually' (screenshot below) in the Service editor and then execute the Server tool 'Manage Map Server Cache Tiles'

1. Is this the best way of caching this service?
2. Do i need to set the service to run on 'Tiles from a cache memory' or can i have the service running dynamic and then activate the usage of tiles after caching is performed?
3. If i set the service on running on tiles from a cache today (tiles which does not yet exist , and then start caching (which will not be ready for 2-3 days), what will happen witch users trying to use the service while the caching process is performed, will it run dynamically until caching is completed?

[ATTACH=CONFIG]29849[/ATTACH]
0 Kudos
7 Replies
MichaelVolz
Esteemed Contributor
What version of ArcGIS Server are you using?

Will you be using compact or exploded cache (I would recommend compact)?

Do you have a development environment where you can build this cache while your production dynamic mapservice is still running?  If so, I would then copy the compact cache to the location where you need it in the production environment as this should be faster than creating the cache?  Once the copy is complete I would change the mapservice from dynamic to cached.
0 Kudos
by Anonymous User
Not applicable
Original User: crafty762

Starting at version 10.1, ArcGIS Server provides a Caching geoprocessing service to perform the creation of the tiles during the cache process so it's much lighter on your web map service than with previous versions of the software.  At 10.0 and earlier, requesting the map service while it was being cached would be very slow and would render tiles that happened to already be generated for the scale and extent you're requesting. 

While the cache tiles are in the process of being created at 10.1 and later, the individual cache files are written to a temporary directory on the server.  Requesting the map service during the caching process will still yield dynamic responses rather than tiles.  In other words, the user should still see that the service responds as a dynamic (non-cached) service.  Once the caching service has completed successfully, the generated image tiles will be copied or moved (I can't recall which it is specifically) to the final directory as part of the process and the map service will begin responding to web requests with tiled images. 

Based on your screenshots, it looks like you're setting the cache to be created manually.  That means that you'll need to open the Manage Map Cache Tiles GP tool (http://resources.arcgis.com/en/help/main/10.2/index.html#//00540000000p000000) when you're ready to generate the tiled images.
0 Kudos
BeraAkamole
Deactivated User
What version of ArcGIS Server are you using?

Will you be using compact or exploded cache (I would recommend compact)?

Do you have a development environment where you can build this cache while your production dynamic mapservice is still running?  If so, I would then copy the compact cache to the location where you need it in the production environment as this should be faster than creating the cache?  Once the copy is complete I would change the mapservice from dynamic to cached.


Compact mode

Im not sure. How can i find out? I will only use some of the server instances for caching
0 Kudos
BeraAkamole
Deactivated User
[ATTACH=CONFIG]29853[/ATTACH]
Starting at version 10.1, ArcGIS Server provides a Caching geoprocessing service to perform the creation of the tiles during the cache process so it's much lighter on your web map service than with previous versions of the software.  At 10.0 and earlier, requesting the map service while it was being cached would be very slow and would render tiles that happened to already be generated for the scale and extent you're requesting. 

While the cache tiles are in the process of being created at 10.1 and later, the individual cache files are written to a temporary directory on the server.  Requesting the map service during the caching process will still yield dynamic responses rather than tiles.  In other words, the user should still see that the service responds as a dynamic (non-cached) service.  Once the caching service has completed successfully, the generated image tiles will be copied or moved (I can't recall which it is specifically) to the final directory as part of the process and the map service will begin responding to web requests with tiled images. 

Based on your screenshots, it looks like you're setting the cache to be created manually.  That means that you'll need to open the Manage Map Cache Tiles GP tool (http://resources.arcgis.com/en/help/main/10.2/index.html#//00540000000p000000) when you're ready to generate the tiled images.


Thank you for the detailed response, im pretty sure i understand.

Yes i will run the cache manually. For smaller scales i will cache the entire map and for larger scales i will use a polygon to define the cache areas. The polygon  was created by buffering communties, roads, etc. and is pretty detail (se attached image). Is there a point having it so detailed or are the tile images so large in extent that i could use a much less detailed polygon? From what i have read a detailed polygon (whith many vertices) will slow down the caching process. I use the polygon to limit the size of the cache created. It will still end up at about 2 TB
0 Kudos
by Anonymous User
Not applicable
Original User: crafty762

[ATTACH=CONFIG]29853[/ATTACH]

Thank you for the detailed response, im pretty sure i understand.

Yes i will run the cache manually. For smaller scales i will cache the entire map and for larger scales i will use a polygon to define the cache areas. The polygon  was created by buffering communties, roads, etc. and is pretty detail (se attached image). Is there a point having it so detailed or are the tile images so large in extent that i could use a much less detailed polygon? From what i have read a detailed polygon (whith many vertices) will slow down the caching process. I use the polygon to limit the size of the cache created. It will still end up at about 2 TB


In terms of which tiles get created within the overall extent of your polygon feature class, I think you would get the same results if you simply took a rectangular polygon (i.e., the bounding box, essentially) of the entire area you're wanting to cache.  Therefore, using the "detailed polygon" as you state shouldn't make any difference.  In the end, tiles that would intersect that polygon would be generated during the cache.  That being said, it's tough to be sure of the exact outcome because I don't know the scale at which your screenshot was taken versus the scale(s) you would like to cache.  Moreover, I don't know much about the service definition that you're planning to cache... I don't know the number of layers, features in each data source within the extent, scale thresholds, draw times, symbology complexity, etc. so it's hard to know how long it will take to complete. 

On another note, does your polygon feature class contain a single polygon feature which was created / dissolved into a buffer?  Or, does it contain multiple polygons?  If it's multiple polygons, it might be good to merge all of those polygon features into a single feature before you use it as the mask for your cache creation.  I've found in the past, at least with previous versions, that cache creation takes much longer when there are multiple mask features as opposed to one.  I've seen the cache process iterate through all of the features for all areas of the extent for every scale.
0 Kudos
BeraAkamole
Deactivated User
[ATTACH=CONFIG]29854[/ATTACH]
In terms of which tiles get created within the overall extent of your polygon feature class, I think you would get the same results if you simply took a rectangular polygon (i.e., the bounding box, essentially) of the entire area you're wanting to cache.  Therefore, using the "detailed polygon" as you state shouldn't make any difference.  In the end, tiles that would intersect that polygon would be generated during the cache.  That being said, it's tough to be sure of the exact outcome because I don't know the scale at which your screenshot was taken versus the scale(s) you would like to cache.  Moreover, I don't know much about the service definition that you're planning to cache... I don't know the number of layers, features in each data source within the extent, scale thresholds, draw times, symbology complexity, etc. so it's hard to know how long it will take to complete. 

On another note, does your polygon feature class contain a single polygon feature which was created / dissolved into a buffer?  Or, does it contain multiple polygons?  If it's multiple polygons, it might be good to merge all of those polygon features into a single feature before you use it as the mask for your cache creation.  I've found in the past, at least with previous versions, that cache creation takes much longer when there are multiple mask features as opposed to one.  I've seen the cache process iterate through all of the features for all areas of the extent for every scale.


Ok. Its a single polygon. The map is pretty detailed (screenshot at about 1:5000), all layers will of course not be visible att smaller scales

Im going to cache scales 1:
100
250
500
1'
2,5'
5'
10'
25'
50'
100'
250'
500'

The screenshot of the polygon was scale 1:250 000. The polygon will be used for caching scales 1:100 to 1:500. A less detailed will be used for scales 1'-5' and whole map extent for smaller scales.
0 Kudos
by Anonymous User
Not applicable
Original User: crafty762

In order to use two different polygon feature classes as a mask for different sets of scales, I think you would have to build two different caches I think.  I'm not sure if that is supported with the software when looking at the Advanced Settings UI under Caching service properties.  The "Area of interest to cache" does show the option to specify an input feature class, but it appears to be one and only one for all scales.  However, you may be able to generate the tiles you want using one of your input polygon masks for a few of the scales, then copy those tiles to a safe location, then create a second cache using the other input (less detailed) polygon mask for the remainder of the scales you desire.  Once the second cache creation process is complete, you could try merging the output of the first cache with the output of the second cache via Windows Explorer.  Probably not supported, but it might work. 

For now, go ahead and build the cache with one of the input polygon masks, making sure you have enough disk space to support the cache size.  As a suggestion, you might want to attempt creating the cache on a very small area for all of the scales you mentioned as a first step and then review it to make sure the results are what you'd expect.  It would be unfortunate to wait for days and days only to find out that the tiles don't look as expected.  Once you're happy with the "test cache" you can delete it and start over with the full geographic area.
0 Kudos