Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

29553

October 14th, 2010 09:00

Windows Server 2008 R2 and defrag

Hey guys,

what are your personal opinions about defrag the volume/s on a Windows Server 2008 R2 x64 with Remote Desktop Services enabled?

Do you think it makes sense because of performance reasons?

Would you judge this different if it comes to VDI in conjunction with Windows XP/7?

Thanks

Holger

48 Posts

October 14th, 2010 20:00

Defrag is useful and desirable on a physical server, and as mentioned above, a pain in a virtual environment.

If you haven't set up your R2 server with a contiguous fixed (nonmanaged) size page file, not defragging will inevitably result in a hugely fragmented page file which will impact paging and system performance.

The one time I do a defrag in a virtual environment is as the final step to preparing a virtual machine template, but that's probably going a bit overboard.

64 Posts

October 14th, 2010 13:00

On Windows 7 VDI the first thing you should do is disable defrag in the virtual desktops. XP doesn't have a background defrag task by default.

As for the server: if you're on Hyper-V Server then I don't know if you even can defrag? There's probably a command-line way to do it, although I would think it's most important to defrag the storage where all the virtual hard disk files are stored, more so if you're using local storage.

On Terminal Server/Session Host, I haven't seen any research. You need to make sure you have a ton of RAM in that server anyway, so there is as little pagefile activity as possible, and so I wonder how much disk IO there is in TS/SH that would be affected by defrag? Not much would be my guess.

34 Posts

October 14th, 2010 15:00

We've also found that vSphere hosted thin provisioned VDI desktops will bloat up to full disk size with the defragmenter turned on, and if I remember correctly, they don't even recover any space if you do a storage vmotion to thin provisioned format.  It's like the defragmenter "touches" all the space in a way that makes it look like it has data - at least for purposes of thin provisioning.

64 Posts

October 14th, 2010 20:00

Yes Steve - that's exactly what happens. Defrag moves every occupied disk block one-by-one, which means it gets a write to the child disk and it is permanently marked as a used block.

There's a great tool from Microsoft MCS here which disables a lot of this stuff.

No Events found!

Top