Staging Bytes Cleaned up

Microsoft.Windows.DfsReplication.StagingBytesCleanedup (Rule)

This rule queries the performance counter "DFS Replicated Folders\Staging Bytes Cleaned up" on monitored computers every 15 minutes.

Knowledge Base article:

Summary

DFS Replication uses staging folders for each replicated folder to act as caches for new and changed files that are ready to be replicated from sending members to receiving members. These files are stored under the local path of the replicated folder in the DfsrPrivate\Staging folder. By default, the quota size of each staging folder is 4,096 MB. The size of each folder on a member is cumulative per volume, so if there are multiple replicated folders on a member, DFS Replication creates multiple staging folders, each with its own quota. The staging quota for DFS Replication is not a hard limit, and it can grow over its configured size. When the quota is reached, DFS Replication deletes old files from the staging folder to reduce the disk usage under the quota. The staging folder does not reserve hard disk space, and it only consumes as much disk space as is currently needed.

This rule queries the performance counter "DFS Replicated Folders\Staging Bytes Cleaned up" on monitored computers every 15 minutes. This performance counter keeps track of the amount of data that was cleaned up from each replicated folder’s staging area by the DFS Replication service. Monitoring this performance counter enables administrators to understand the usage of each replicated folder’s staging area and figure out if the staging quotas need to be increased.

Additional

Since the staging folder is used as a cache for new and changed files during replication activity, it is important to configure the size/quota of staging folders optimally, depending on the workload being replicated.

Optimize the size of staging folders

Although you can adjust the size of each staging folder, you must take the following factors into account while doing so:

Element properties:

TargetMicrosoft.Windows.DfsReplication.Service
CategoryPerformanceCollection
EnabledTrue
Instance NameDFS Replicated Folders
Counter NameStaging Bytes Cleaned up
Frequency900
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.Performance.OptimizedDataProvider System.PrivilegedMonitoringAccount
WriteToDB WriteAction Microsoft.SystemCenter.CollectPerformanceData Default
WriteToDW WriteAction Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData Default

Source Code:

<Rule ID="Microsoft.Windows.DfsReplication.StagingBytesCleanedup" Enabled="true" Target="Microsoft.Windows.DfsReplication.Service" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" RunAs="System!System.PrivilegedMonitoringAccount" TypeID="Performance!System.Performance.OptimizedDataProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<CounterName>Staging Bytes Cleaned up</CounterName>
<ObjectName>DFS Replicated Folders</ObjectName>
<InstanceName/>
<AllInstances>true</AllInstances>
<Frequency>900</Frequency>
<Tolerance>0</Tolerance>
<ToleranceType>Absolute</ToleranceType>
<MaximumSampleSeparation>1</MaximumSampleSeparation>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>