There are a number of areas that affect MSMQ performance (memory, CPU, network) but for this post I'll just concentrate on disk throughput.
MSMQ uses a lot of disk I/O when you are requesting transactional or recoverable messaging. Not only do the messages have to be written to disk (to survive a server shutdown, for example) but also the sequencing information used to keep transactional messages in order needs to be persisted.
The Storage tab on Message Queuing Properties shows how these areas are divided up:
So by default everything goes to the same physical location but you can split them up. In an ideal world, each folder would be located on a dedicated disk with its own disk controller for optimal throughput but this isn't usually going to be practical and in most cases is probably going to be overkill anyway. A single dedicated disk (and not just a partition on the main disk) should do - make sure it isn't being use for anything else like the pagefile.
How To Optimize MSMQ Performance
To dig deeper into what goes into which folder, have a look at
Interpreting file names in the Storage directory
Message files folder
R - Express messages (Note that express messages are normally held in RAM, not disk. This file is used when there is no more available RAM.) P - Persistent (recoverable) messages; transactional messages are, by definition, recoverable. J - Journal messages
Message logger folder
L - Indexing bitmap for interpreting the journal or recoverable files.
Transaction logger folder
You may encounter a slow performance issue that causes any program to stop responding for several minutes along with some hotfixes to make this process more disk-friendly.
You may encounter a slow performance issue that causes any program to stop responding for several minutes
along with some hotfixes to make this process more disk-friendly.