Fragmentation
Posted in Uncategorized on January 22nd, 2011 by adminA good bit of a system slowing down over time is related to the hard drive, the slowest part of any computer, their are several levels to this that can effect performance, file level fragmenation, free space fragmentation and mft fragmentation. File level is usually all you have to look at but when your disk begins to fill and you have lots of small files (temp internet) your mft can fragment causing extreme speed loss and possible crash (on workstations at least, not suppose to be an issue on nt6+ vista or higher, 2008 or higher)
Some good tools to deal with this are defraggler and smart defrag. defraggler is great at file level fragmentation but that about where it ends. smart defrag however has alot of the feature of premium products such as boot time defrag (to defrag system files that are normally locked during normal operation, reg hives, mft, system dll’s). It also offer contiuous defragmentation which runs defrags when system usage is below a specified level. Both these products offer the ability to easily schedule defrags to run at off hours.
Server fragmentation can slow down an entire network so its always a good idea to stay on top of these, both of these program will work, would not use the auto feature on a server though, and be sure to put in exceptions for things like database files and database backup files. Since these are going to always be fragmented. But if you follow best practices with disk fragmenation you can minimize the amount that they will fragment. Both of these will allow single file defrag and files this comes in handy for are outlook datafiles and sql database files, you need to close outlook or sql to run these to remove the file locks, and especially with sql you need to make sure their is enough continous free space for the defrag to have any effect. So running regular defrags before attemping sql defrag, or exchange defrag (see microsoft kb article not recommened to use these tools on stores) will provide better results.
For those interested, you can also check fragmentation on linux system, and if your so inclined recompile your kernel and compile the defrag tools for ext4. Or just wait a few more years for these tools to make it into mainstream releases.
for software raids
sudo e2fsck -nfv /dev/md0 (number of the md device)
regular scsi disk (most kern now see sata as scsi)
sudo e2fsck -nfv /dev/sda1 (letter of device and number of partition)
system that see your disk as ide
sudo e2fsck -nfv /dev/hda1 (letter of device and number of partition)
http://www.iobit.com/iobitsmartdefrag.html
http://www.piriform.com/defraggler
Server supported defrag solutions that will provide continuous and idle defrag and further fragmentation protection
http://www.iobit.com/iobitsmartdefrag.html
http://www.diskeeper.com/business/diskeeper/server/default.aspx
The only exception to this rule is SSD you do not defrag SSD and in system with SSD such as 2008 R2 or windows 7 you should disable the defrag service and manually defrag any conventional disk.
NTFS is not much better off at dealing with this then FAT32, the real benifit with NTFS is longer file names, larger files, file system journaling
Virtualization is also not immune to fragmentation, and when hosting vm’s on windows, make sure you always allocate all space at the creation of a virtual disk, then check fragmentation level of the allocated disk prior to first boot, if you allocate at once, and insure fragmentation of the file is within reason you won’t have to worry so much about dual level fragmentation between the host and guest os. You will however still need to consider guest level fragmentation of your virtual machines.
With Pagefile fragmentation, you can avoid this all together by calculating a safe size for your pagefile in advance, which is usually recommended to be 1.5x phycial memory, setting it to allocate the entire size from the start will ensure it does scrink and grow and risk fragmentation.
Keeping up with file level fragmentation can also reduce the chances of registry hives becoming heavily fragmented, their is however a special tool for checking these hive files and boot time defragging them if needed.