On a server where memory is limited you might have noticed that the IIS worker processes (W3WP) and the ArcGIS Server SOM process may begin to adversely affect other applications by consuming large amount of memory when the ArcGIS Server services are under heavy load.
ESRI has provided an explanation and workaround for this problem. The reason that this occurs:
The .NET garbage collection has a concept of generations (Garbage Collector Basics and Performance Hints). Local variables and short term objects are classified as generation one and are cleaned up frequently when garbage collection is called. Objects that have longer lifetimes are classified as generation two or higher and are less frequently cleaned up when garbage collection is called.
ArcGIS Server DCOM runtime callable wrapper (RCW) proxies and their references to DCOM objects in the SOM process are particularly susceptible to being pushed into higher generations and accumulate on the Web server and SOM until the less frequent second or third generation garbage collection algorithm occurs.
Under load, when second and third generation garbage collection may be delayed due to its high CPU utilization cost, the W3WP and SOM process memory utilization can grow rapidly.
The workaround for this is quite simple. It’s a matter of decreasing the the .NET Garbage Collection (GC) internal to force the recovery of resources. This is just a one line change to the web.config for the services.
If memory is a critically limiting resource on the Web services machine, it may be desirable to force recovery of resources by decreasing the default .NET Garbage Collection (GC) interval. Decreasing the GC interval encourages the GC algorithms to clear out generation two and three objects no longer being used.
To address this issue, the ArcGIS Server Web services use a web.config setting to force garbage collection after a specified number of requests.
The default GC Interval (every 10,000 requests) has been chosen to address the memory consumption problem described above based on testing representative services under load.
If a problem with memory growth in the W3WP worker process or SOM process persists, the GC interval can be lowered from 10,000 to a smaller number (for example: 1000). This results in more frequent garbage collection. However, garbage collection is a CPU intensive operation and decreasing the GC interval results in the reduction of throughput. If a more frequent GC interval than 10,000 is chosen, select a number cautiously so that the throughput is not significantly affected.
At the moment it looks like this only applies to ArcGIS Server 9.2 services. I have yet to experience this problem in ArcGIS Server 9.3.
Instructions on how to go about adding this interval into the web.config and making this change can be found on the ESRI Support Centre here: http://support.esri.com/index.cfm…
Thanks for the heads up.
Was wondering – a lot of people (especially with EDN license) must have ArcGIS Server installed all on one machine for self-development purposes.
I have 9.2 set up on my one machine running through IIS, and find it very very slow, sometimes not even getting map services to display in browsers.
Any other tips on how to speed things up? I find I spend a lot of my time troubleshooting things like the above, when id rather be spending my time getting into the nitty gritty.
Hi Simon,
There are a few things you can look at to speed things up. Stopping any unused services is probably the first. Also having a look at the startup items for the server using msconfig. This is will with memory.
Also you could look at running the ArcGIS Server service under a seperate application pool which could help in stability as it will have its own process. This is if you are running other websites on the same server.
Hope this helps,
Cheers
that speeds things up a lot, cheers.