I have written a number of articles on how to create memory dumps for troubleshooting W3WP process hangs, crashes or memory consumption issues.
Those are all good techniques, IMO, but sometimes, I or you just need a quick and easy memory dump to either give to support or to analyze yourself. Again, IMO, this method is best for when CPU is 100% (or a high amount) or a request is hanging or taking some time to respond. In the first example, simply open the Task Manager, and when the CPU consumption for the W3WP process is higher than you would expect, right-click on the process, and select Create dump file, as shown in Figure 1.
You should then see the following, while the memory dump is being created, Figure 2.
Then, as shown in Figure 3, once created the location of the DMP file is provided, so you can analyze it or send it on to support.
The only difference between the capture of a memory dump for a process consuming too much CPU and a hang is that you need to make sure the hung request is running within the process when the memory dump is taken.
VERY IMPORTANT: The hanging request must be running in the process when the dump is taken
I’ll mention that point again because it is very important. When you have a hung situation, **make sure the request which is hanging is running within the process when the memory dump is taken.* If this does not happen, then the memory dump would not contain the problem and would either waste some time or lead the person analyzing the dump to wrong conclusions and suggest non-applicable resolution paths/options.