I have a system that is processing messages from an MSMQ queue (using multiple processes to do the processing).
Each message processing implies reading some rows, and making 3 updates and 1 insert. I’m processing around 60 messages per sec with this system.
What is puzzling me is that when for whatever reason, the queue has a buildup of messages, and the system is working as fast as it can to process messages, the CPU usage exhibits a cycle with peaks of 95%-100% and valleys of 50%-45%. This behavior holds even when I add more processes to do the processing.
Is it expected of SQL Server to show that behavior when the workload implies row insertion and updates (I’m thinking cache flushing, etc.)? Maybe it’s got something to do with the host (this is running on Hyper-V, instead of on real hardware)?
Here’s a link to a perfmon run: http://dl.dropbox.com/u/2200654/sql_perf_000001.rar
I’ve found the reason of the strange behavior: lack of memory. When I added the ‘Memory: Page Reads/sec’ counter, the valleys coincided with times of high page faulting.
Thanks for your answers (now the question seems silly, I’ll ask for more memory :).