Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
74:cms_prefetch [2020/08/25 07:57] – created tssr74:cms_prefetch [2024/02/15 00:00] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +[[:72:configure_stages|Configure the Stages Server]]
 +
 ====== CMS Prefetch Configuration ====== ====== CMS Prefetch Configuration ======
  
 The CMS prefetch is a Stages system service. It ensures that Stages displays up to date information of documents that are managed by an external configuration management system (CMS). Therefore the CMS prefetch is scheduled periodically to retrieve the latest revision information for all documents of active projects. The CMS prefetch is a Stages system service. It ensures that Stages displays up to date information of documents that are managed by an external configuration management system (CMS). Therefore the CMS prefetch is scheduled periodically to retrieve the latest revision information for all documents of active projects.
  
-//Note//: All changes of the configuration described in this document require a restart of the Stages service.\\+//Note//: All changes of the configuration described in this document require a restart of the Stages service.
 === Configuration of the CMS Prefetch === === Configuration of the CMS Prefetch ===
  
-The default configuration of the CMS prefetch is found in <font inherit/Courier New,Courier,monospace;;inherit;;inherit>''<Stages installation path>/stages/conf/config.xml''</font> file:<code>+The default configuration of the CMS prefetch is found in ''<Stages installation path>/stages/conf/config.xml'' file:<code>
  
-<stages-config>\\ +<stages-config> 
-<properties>+ <properties>
  
-<property name="cms.prefetch.activated" value="true"/>\\ + <property name="cms.prefetch.activated" value="true"/> 
-<property name="cms.cache.refreshIntervalInMinutes" value="60"/>\\ + <property name="cms.cache.refreshIntervalInMinutes" value="60"/> 
-<property name="cms.prefetch.sleepMillisBetweenDocuments" value="0"/>\\ + <property name="cms.prefetch.sleepMillisBetweenDocuments" value="0"/> 
-<property name="cms.prefetch.workersCount" value="1"/>\\ + <property name="cms.prefetch.workersCount" value="1"/> 
-<property name="cms.prefetch.strategy.class"\\ + <property name="cms.prefetch.strategy.class" 
-value="de.methodpark.pkit.cms.prefetch.ClassicAllDocumentsStrategy"/>\\ + value="de.methodpark.pkit.cms.prefetch.ClassicAllDocumentsStrategy"/> 
-</properties>\\ + </properties> 
-<cms> ... </cms>\\+ <cms> ... </cms>
 </stages-config> </stages-config>
- 
  
 </code> </code>
Line 32: Line 33:
 The following prefetch strategies are currently available. The following prefetch strategies are currently available.
  
-//Classic all documents available//\\ +//Classic all documents available// 
-<code>\\+<code>
 class=de.methodpark.pkit.cms.prefetch.ClassicAllDocumentsStrategy class=de.methodpark.pkit.cms.prefetch.ClassicAllDocumentsStrategy
- 
  
 </code> </code>
Line 41: Line 41:
 This strategy ignores the maxParallelTasks properties. (cms.prefetch.maxParallelTasks.<CMSType>) It is the default strategy. In case of a single worker thread the documents are prefetched sequentially. In case of multiple worker threads the prefetch of single documents is arbitrarily distributed among all workers. This strategy ignores the maxParallelTasks properties. (cms.prefetch.maxParallelTasks.<CMSType>) It is the default strategy. In case of a single worker thread the documents are prefetched sequentially. In case of multiple worker threads the prefetch of single documents is arbitrarily distributed among all workers.
  
-//Prefetch by CMS type strategy//\\ +//Prefetch by CMS type strategy// 
-<code>\\+<code>
 class=de.methodpark.pkit.cms.prefetch.PrefetchByCMSTypeStrategy class=de.methodpark.pkit.cms.prefetch.PrefetchByCMSTypeStrategy
- 
  
 </code> </code>
Line 52: Line 51:
 cms.prefetch.maxParallelTasks. allows to specify the maximum number of workers that are allowed to process documents of that CMS type. This is useful in case different CMS types are used by one Stages deployment and the CM systems have very different performance characteristics. So it is e.g. possible to specify that there is only one worker for SVN and all other workers should be used for Integrity. This example would need the following configuration: cms.prefetch.maxParallelTasks. allows to specify the maximum number of workers that are allowed to process documents of that CMS type. This is useful in case different CMS types are used by one Stages deployment and the CM systems have very different performance characteristics. So it is e.g. possible to specify that there is only one worker for SVN and all other workers should be used for Integrity. This example would need the following configuration:
  
-<code>\\ +<code> 
-<stages-config>\\ +<stages-config> 
-<properties>\\ + <properties> 
-<property name="cms.prefetch.workersCount" value="8"/>\\ + <property name="cms.prefetch.workersCount" value="8"/> 
-<property name="cms.prefetch.strategy.class"\\ + <property name="cms.prefetch.strategy.class" 
-value="de.methodpark.pkit.cms.prefetch.PrefetchByCMSTypeStrategy"/>\\ + value="de.methodpark.pkit.cms.prefetch.PrefetchByCMSTypeStrategy"/> 
-<property name="cms.prefetch.maxParallelTasks.SVN" value="1"/>\\ + <property name="cms.prefetch.maxParallelTasks.SVN" value="1"/> 
-<!--0 is mapped to unlimited, if nothing were configured it would\\ + <!--0 is mapped to unlimited, if nothing were configured it would 
-default to 1 -->+ default to 1 -->
  
-<property name="cms.prefetch.maxParallelTasks.Integrity" value="0"/>\\ + <property name="cms.prefetch.maxParallelTasks.Integrity" value="0"/> 
-</properties>+ </properties>
  
-<cms> ... </cms>\\+ <cms> ... </cms>
 </stages-config> </stages-config>
- 
  
 </code> </code>
  
-=== Cache Persistence ===+==== Cache Persistence ====
  
 Stages caches two different levels of information regarding files in external configuration management systems. It collects infomation about the folder structure of a CMS and the files contained within these folders. This information is then used for displaying document information such as the version or state of a file. Stages caches two different levels of information regarding files in external configuration management systems. It collects infomation about the folder structure of a CMS and the files contained within these folders. This information is then used for displaying document information such as the version or state of a file.
Line 77: Line 75:
 These caches are persisted in the file system on the application server that runs Stages. These caches are persisted in the file system on the application server that runs Stages.
  
-The cache size has a fixed size but will be configurable from Version 7.4.6.1, 7.5.2.and above.+✘ **Since 7.4.6.1**: 
 + 
 +The properties 
 + 
 +  * //cms.prefetch.memorycache.max.documents// 
 +  * //cms.structure-prefetch.memorycache.max.repositories// 
 +can be used to set the maximum amount of objects, which should be cached in memory for the documents-cache and the repository-cache. 
 + 
 +The default values are **4096**  documents and **20**  repositories.