DiagnosticMonitorConfiguration.OverallQuotaInMB Property
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
/** @property */ /** @attribute CompilerGeneratedAttribute() */ public int get_OverallQuotaInMB () /** @property */ /** @attribute CompilerGeneratedAttribute() */ public void set_OverallQuotaInMB (int value)
CompilerGeneratedAttribute public function get OverallQuotaInMB () : int CompilerGeneratedAttribute public function set OverallQuotaInMB (value : int)
Property Value
Type: System.Int32Returns Int32.The OverallQuotaInMB property specifies the amount of local storage allocated for the combined total of all the data buffers’ BufferQuotaInMB properties.
By default, the OverallQuotaInMB is set to 4GB. If you want to specify a smaller amount, you can set this property to your desired value. You cannot specify a larger value using this property; instead you must add a <LocalStorage> element for DiagnosticStore to your ServiceDefinition.csdef file and change the sizeInMB attribute accordingly. For example:
ServiceDefinition.csdef
<LocalResources>
<LocalStorage name="DiagnosticStore" sizeInMB="8192" cleanOnRoleRecycle="false"/>
</LocalResources>
Note that if you specify a larger size in your ServiceConfiguration.cscfg file, such as 8GB in the example above, you must also set the OverallQuotaInMB property to the same value or a smaller value. If you make no changes to the value of the OverallQuotaInMB property, your data buffers will be limited to the original 4GB value.
For more information see How to Configure Local Storage Resources and Code Quick Start: Capturing diagnostics in your Windows Azure application.
Example 1
The following snippet creates a new diagnostic monitor configuration and specifies a smaller overall quota.
// Get the default initial configuration for DiagnosticMonitor. DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Set an overall quota of 2GB. diagnosticConfiguration.OverallQuotaInMB = 2048;
Example 2
The following snippet from a ServiceConfiguration.cscfg file sets the DiagnosticStore maximum size to 8GB.
<LocalResources>
<LocalStorage name="DiagnosticStore" sizeInMB="8192" cleanOnRoleRecycle="false"/>
</LocalResources>
The following snippet creates a new diagnostic monitor configuration and specifies the same size as the ServiceConfiguration.cscfg file above.
// Get the default initial configuration for DiagnosticMonitor. DiagnosticMonitorConfiguration diagnosticConfiguration = DiagnosticMonitor.GetDefaultInitialConfiguration(); // Set an overall quota of 8GB. diagnosticConfiguration.OverallQuotaInMB = 8192;
Development Platforms
Windows Vista, Windows 7 and Windows Server 2008Target Platforms