By Joseph Yedid
There are times when you might find your VMs running, shall we say… a bit slow. They will seem to be sluggish and not performing as expected. What do you do?
I came across a TechNet forum post about a person having trouble with their VM and why it took forever to do something, so I decided to simulate this as a demonstration.
I took one of my VMs, reduced its dynamic memory to 1GB and 3GB for the startup and maximum amounts. I then set the maximum SQL memory to 8GB and 8GB for the minimum and maximum amounts. I then let the VM run for a bit. Watching Hyper-V Manager, the memory status entered the Warning state.
I then managed to get into the VM to look around. Boy was it slow. Since the VM was starving for memory, it must be doing something, right? Let’s look at the Performance Monitor. I brought up the Memory counters and selected the Pages/sec counter.
Holy Motherboard Batman!! Will you look at that? The memory is paging through the roof. Looks like my VM is really starving for memory!
The high memory paging is happening because there is not enough memory to run everything; most notably SQL. SQL has high memory demands.
In order to compensate for the lack of memory, the VM has to pass everything through the memory that is available. Ideally, the average should be around 50 pages/sec.
Before I forget, to correct this issue, I reset the SQL maximum memory back to 10GB and the maximum dynamic memory to its default of 6553MB.
The long and short of it is, you need to consider proper memory allocation for your VMs and the loads that they will be carrying.