hbui-sbcpro.de
2 Bronze

Windows Server 2008 R2 and defrag

Jump to solution

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

0 Kudos
1 Solution

Accepted Solutions
rmack1
2 Iron

RE: Windows Server 2008 R2 and defrag

Jump to solution

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.

View solution in original post

4 Replies
DELL-Jon Ro
2 Iron

RE: Windows Server 2008 R2 and defrag

Jump to solution

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.

sgravel
2 Bronze

RE: Windows Server 2008 R2 and defrag

Jump to solution

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.

0 Kudos
DELL-Jon Ro
2 Iron

RE: Windows Server 2008 R2 and defrag

Jump to solution

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.

0 Kudos
rmack1
2 Iron

RE: Windows Server 2008 R2 and defrag

Jump to solution

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.

View solution in original post