MarkLogic 10 Product Documentation
admin.groupSetCacheSizing

admin.groupSetCacheSizing(
   config as element(configuration),
   group-id as (Number|String),
   value as String
) as element(configuration)

Summary

This function sets the cache sizing method. You can set the cache sizing method to enable you to manually set the settings for your caches, or have MarkLogic automatically set the cache settings. If you select automatic, MarkLogic automatically sizes the caches based on the available memory resources allocated at startup time. If you select enode, MarkLogic automatically sizes the caches, but the sizes are tuned for better memory utilization of an Evaluation Node. If you select dnode, MarkLogic automatically sizes the caches as well, but the sizes are tuned for better memory utilization of a Data Node. When the Cache Sizing method is set to automatic, enode, or dnode, all cache settings, such as List Cache Size, Compressed Tree Cache Size and so on, are set in the group configuration, but are not used until the Cache Sizing method is set to manual.

Switching the cache sizing method from manual to automatic, enode, or dnode restarts MarkLogic Server. Switching from automatic, enode, or dnode to manual restarts MarkLogic Server if the current configuration does not match the saved configuration. Otherwise, MarkLogic Server does not restart.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
group-id The ID of the group. Typically, this is the result of an admin:group-get-id call.
value Specify manual to enable you to manually set the cache settings. Specify automatic, enode, or dnode to have MarkLogic automatically size the caches based on the available memory resources allocated at startup time.

Example

  
 
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  const groupid = admin.groupGetId(config, "Default")
  admin.groupSetCacheSizing(config, groupid, "automatic")  

   //Sets the cache sizing method to "automatic." 
 
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy