EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB442198: New in MicroStrategy Intelligent Enterprise: Release the Cached Memory in Smartheap to Avoid Intelligence Server Restart because of Memory Depletion


Community Admin

• Strategy


This article introduces a new setting to Release the Cached Memory in Smartheap to avoid Intelligence server restart because of Memory Depletion. This feature only applies to situations where there is a considerable amount of memory cached by SmartHeap. It doesn’t cover all memory depletion situations.

Starting with Strategy Secure Enterprise 2019, there is a new feature enabled by default for Intelligence Server. This feature allows Intelligence Server to release the block cache memory in SmartHeap when Intelligence Server is about to hit Memory Contract Denial.
 

What cache will be released in this feature?


SmartHeap, the memory allocator used in Strategy Intelligence Server, will cache some memory just released, to improve performance. The cache in SmartHeap can be:

  1. Block cache for big memory blocks (size > 64KiB)
  2. Free page cache for small (size < 512 bytes) and medium (512 < size < 64KiB) blocks


The cache that will be released by this feature includes the block cache for big memory blocks, but not includes the free page cache for small and medium blocks.
 

How does this feature work?


When Memory Contract Manager checks the size for the memory request, if the size is larger than the total available memory (counter in Memory Contract Manager) plus a fixed threshold as safe margin, the releasing of SmartHeap block cache will be triggered. The condition is as below:
 
RequestSize > TotalAvaiblableMemory - SafeMargin
 
SmartHeap will then try to release at least with Size of 2 * (RequestSize - ( TotalAvaiblableMemory - SafeMargin) ). The releasing order will start from largest memory blocks to smaller one, but it will keep no less than 1 GB block cache in SmartHeap. 
 
The SafeMargin is set to 5% of the system total RAM by default, and it can be tuned through a system environment variable.
 
On Linux:

export MSTR_MEM_CACHE_SAFE_MARGIN=5

 
On Windows:
 

ka04W000000OeSYQA0_0EM44000000RCY5.png

 
 

How to disable this feature?


Disable this feature by setting the system environment variable "MSTR_MEM_CACHE_RELEASABLE" to 0.
On Linux:

export MSTR_MEM_CACHE_RELEASABLE=0

 
On Windows:
 

ka04W000000OeSYQA0_0EM44000000RCYF.png

Refer to Technical Document below for more details of SmartHeap:
KB16977: What is SmartHeap and how does it work with the MicroStrategy Intelligence Server?
 
Refer to Technical Document below for more details of
KB13315: Overview of the Memory Contract Manager (MCM) behavior in MicroStrategy Intelligence Server Universal 9.4.x-10.x
 
 


Comment

0 comments

Details

Knowledge Article

Published:

November 6, 2018

Last Updated:

February 5, 2019