Databases Reference
In-Depth Information
You can retrieve statistics about memory usage using a DISCOVER_MEMORY request or monitor-
ing key performance monitor counters.
Memory Cleanup
After the amount of memory used by the system rises above the LowMemoryLimit , Analysis
Services periodically (the period is defined by the Cleaning Period - LimitSystemFileCache
Period configuration property) wakes up a special cleaning thread, which iterates over the
memory holders in one memory holder list, collects statistics about each memory holder,
and sends an internal request to shrinkable memory holders to clean some memory.
When a shrinkable memory holder gets this request, it calculates the tax, which it has to
pay, and readjusts its balance. If the balance is negative, the memory holder returns
memory to the system. When making a decision about the amount of memory a memory
holder has to release to the system, it uses the strategy specific to each type of memory
holder (we discuss the strategy later in this chapter) that would enable the memory holder
to get to the positive balance in the next cleaning period.
When the used memory is getting close to the TotalMemoryLimit (by default, “close” is
12% percent below the TotalMemoryLimit ), the Memory Manager starts additional clean-
ing threads. This lowers the performance of the system because a large part of CPU time is
now used for cleaning.
When memory reaches the TotalMemoryLimit , the Memory Manager starts to work in
crisis mode. In crisis mode, Analysis Services starts as many threads as there are processors
on the machine and raises the priority of those threads. The cleaning operation practically
blocks all other server operations until enough memory is released. When a shrinkable
memory holder gets a command about a crisis release of memory, it has to release all the
memory that it can release, regardless of its balance. It also reinitializes its data structures.
When release of the memory decreases the amount of memory used in the system to below
the LowMemoryLimit , the Memory Manager drops the memory price to zero, and the Memory
Manager starts to work in sleepy mode. It does not send requests to shrink the memory, and
only periodically pings memory holders and adjusts the memory state statistics.
NOTE
The system can react slowly to the changes of the memory conditions, so it is theoreti-
cally possible that memory usage could go above the amount defined by the
TotalMemoryLimit when memory is allocated faster than the cleaning threads can
clean the memory. Similarly, the memory can be cleaned very aggressively and usage
could go below the amount defined by the LowMemoryLimit .
Analysis Services monitors an event that the operating system sends when a computer
runs out of memory and increases the memory price when it detects an out-of-memory
condition. In this case, the memory price grows even faster, which speeds up the release of
the memory to the system.
Search WWH ::




Custom Search