Setting storage quotas for multiple instances of MSMQ on a cluster
Microsoft Message Queuing is capable of handling a large volume of messages at any one time but this ability is not limitless. The performance of any machine, no matter the specification, will degrade eventually and to prevent this it is recommended to make use of storage limits (also known as system quotas). Default values are usually 1GB but it is advisable to review your needs and raise (or lower) the value as appropriate.
There are two ways of setting the storage limit, depending on how MSMQ was installed.
- Active Directory integrated mode - use either the 'Computer Management' or the 'Active Directory: Users and Computers' snapin
- Worksgroup mode - use RegEdit.exe to edit the registry
Active Directory integrated mode
Here is an example of setting the storage limit for the clustered MSMQ resource that uses the network name "VirtualMSMQ"; MSMQ was installed in Active Directory integrated mode so changes need to be made to the msmq child object:
- Run the 'Active Directory: Users and Computers' snapin
- On the View menu, select 'Advanced Features' and 'Users, Groups and Computers as containers'
- Drill down to the network name used by the clustered MSMQ resource
- Right-click on the msmq folder below it and select Properties
- Enter a value (in kilobytes) for the new storage limit
- Press OK
Workgroup mode
There is no user interface to set the storate limits if MSMQ has been installed in workgroup mode and it is necessary to edit the registry and change MachineQuota.
Here is an example of setting the storage limit for the clustered MSMQ resource called 'MSMQ Service':
- Run REGEDIT.EXE
- Navigate to HKey_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Clustered QMs\MSMQ$MSMQ Service\Parameters\MachineCache
- Double-click the MachineQuota registry value
- Change the 'Value data' to the required storage limit
- Press OK
Here is an example of setting the storage limit for the local node's MSMQ service:
- Run REGEDIT.EXE
- Navigate to HKey_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Parameters\MachineCache
- Double-click the MachineQuota registry value
- Change the 'Value data' to the required storage limit
- Press OK
Note that the service will need to be restarted for any changes to take effect.
References
899612 How to set up computer quotas and queue quotas in Microsoft Message Queuing