PDA

View Full Version : Defragmentation



har
11-07-2012, 07:58 PM
Hi. i can't defragment the main drive on my computer. there are two drives on this PC, one is Drive D, one is Drive c,
Drive C is the drive that has 95% of the OS on it. It only has 20GB. I can defragment Drive D alright, C is not working and it doesn't do other checks properly either.
What should i do:(

Bryan
11-07-2012, 08:34 PM
What operating system are you using?
What are the sizes of the two HHD's?
What have you got on D:?

Bryan
11-07-2012, 08:36 PM
The reason I would think that you can't defrag C: is because there is not enough free space to move files around as the defrag works.

Speedy Gonzales
11-07-2012, 08:50 PM
Use something like ccleaner (http://www.piriform.com/ccleaner) and remove the temp files etc. Then try again

Chilling_Silence
11-07-2012, 09:08 PM
Aso, try Defraggler (Also by Piriform, the same people who make CCleaner) which works well while the OS is running / writing to the drive.

SolMiester
12-07-2012, 11:25 AM
Smart Defrag from I/Obits is good too!

Renegade
12-07-2012, 11:30 AM
Also run DiskCleanup to get rid of all but the last system restore snapshot (if SR is used). That can get a few GB back.

1101
12-07-2012, 11:42 AM
My advice is dont defrag, seriously.

Modern HD's with NTFS dont really need defrags
old HD's: you run the very real risk of moving data into faulty parts of the HD. Ive seen that happen. Data loss !!!

Iantech
12-07-2012, 12:31 PM
In my opinion defragging is good housekeeping on any hard drive and helps keep the data on your drive and the drive in good condition.

Modern drives do require defragging especially if the system has insufficient physical memory. One of the jobs of defragging is error checking which will hopefully detect any potentially failing sectors and mark them as bad so data can not be wrote on those areas. By not defragging (and/or error checking) you are more likely to get data corruption from the drive continuing to write to bad sectors if it has any. If you have an older drive that has bad sectors, replace it asap as it will only get worse which can result in total drive failure and/or total data loss.

If you cant defrag a drive, it is commonly for 2 reasons, as already mentioned, lack of disk space to perform the job (I think it is a minimum of 15% free space required), the other is disk errors. If you have enough drive space, run an error check on your drive and fix any errors - you may already have some corruption which can be fixed if caught in time.

Sorry 1101, but I think telling someone not to defrag is not good advice.

inphinity
12-07-2012, 12:41 PM
Don't defragment a solid-state drive. Just don't. But if it's a mechanical drive, yes, it will help performance, albeit marginally in most cases. Windows disk defrag, as iantech said, requires 15% free space to work effectively. This is approximate, and the exact amount varies depending on the size of the files & fragments moved, but it's a good rule of thumb. When you say it is "not working" what exactly happens - an errors message or something?

Chilling_Silence
12-07-2012, 01:38 PM
Modern HD's with NTFS dont really need defrags

Not true, it's just there's a scheduled task which does it automatically in Windows 7 and I think even Vista.

NTFS is just as much of a whore as ever...

But yes inphinity is right, SSD's *never* should be defragged.

1101
12-07-2012, 02:35 PM
It depends why you want to run a defrag . Its not needed, just run chkdsk's instead . Defrag every 6mnths maybe ??
The performance increase from defrag is probhably often just placebo, unless the HD is quite old/slow
- Only saying this as many still feel the need to defrag weekly.

But Im willing to test this out, my 2 HD's have NEVER been defragged (but do get chkdsk'ed).
I could defrag & see if there is any worthwhile speed difference after - perfectly happy to prove myself wrong.
:banana

From the horses mouth - interesting read.
http://blogs.msdn.com/b/e7/archive/2009/01/25/disk-defragmentation-background-and-engineering-the-windows-7-improvements.aspx
"Best practices for using defragmentation in Windows 7 are simple – you do not need to do anything! "
(as mentioned above, its automated)

Actual Testing
http://www.maximumpc.com/article/the_disk_defrag_difference?page=0%2C2
"With all of the benchmarking completed, we find it rather suspicious that disk defragmentation did nothing to improve the performance of our machine."
". Even the paid-for programs were unable to yield any positive gains—quite the opposite, in some instances. "

Rod J
12-07-2012, 02:36 PM
I wouldn't defrag USB flash drives either, for the same reason as not defragging SSD's (limited number of write cycles).

SolMiester
12-07-2012, 02:44 PM
It depends why you want to run a defrag . Its not needed, just run chkdsk's instead . Defrag every 6mnths maybe ??
The performance increase from defrag is probhably often just placebo, unless the HD is quite old/slow
- Only saying this as many still feel the need to defrag weekly.

But Im willing to test this out, my 2 HD's have NEVER been defragged (but do get chkdsk'ed).
I could defrag & see if there is any worthwhile speed difference after - perfectly happy to prove myself wrong.
:banana

From the horses mouth - interesting read.
http://blogs.msdn.com/b/e7/archive/2009/01/25/disk-defragmentation-background-and-engineering-the-windows-7-improvements.aspx
"Best practices for using defragmentation in Windows 7 are simple – you do not need to do anything! "
(as mentioned above, its automated)

Actual Testing
http://www.maximumpc.com/article/the_disk_defrag_difference?page=0%2C2
"With all of the benchmarking completed, we find it rather suspicious that disk defragmentation did nothing to improve the performance of our machine."
". Even the paid-for programs were unable to yield any positive gains—quite the opposite, in some instances. "

That is from over 4 yrs ago...you should see performance degraded on a SATA SAN connected to ESX hosts with thin provisioning!...Benchmarking I/O needs to have queue depth otherwise your not seeing max IOPS!.....

inphinity
12-07-2012, 02:48 PM
It depends why you want to run a defrag . Its not needed, just run chkdsk's instead . Defrag every 6mnths maybe ??
The performance increase from defrag is probhably often just placebo, unless the HD is quite old/slow
- Only saying this as many still feel the need to defrag weekly.

weekly is a complete waste of time, imo, and will achieve nothing. If your drive is getting so fragmented within a week that it is worthwhile running a defragmentation you need to reassess your storage methodology. 6-monthly, even annually, will help to improve access times on a heavily fragmented drive, especially so on older drives, or an older OS (and given the OP mentions it being only 20GB, I'm guessing it's either an old drive/OS, or an SSD, which should NOT be defragged).

Have seen plenty of situations, both desktop and enterprise storage, where defragmentation assists. Some of the more advanced file systems it is not an issue, but NTFS it surely is. Windows 7 does do some background defragmentation to help reduce it, but there's a reason they still include the utility (even in Windows 8) ;)

Chilling_Silence
12-07-2012, 02:51 PM
"Best practices for using defragmentation in Windows 7 are simple – you do not need to do anything! "
(as mentioned above, its automated)

Yes, it's automated, but it still *happens*. On top of that, arguably 3rd party ones do a better job too than the built-in windows one.

Nick G
12-07-2012, 04:40 PM
Yes, it's automated, but it still *happens*. On top of that, arguably 3rd party ones do a better job too than the built-in windows one.

Would the auto defrag still happen if you had an SSD? Just wondering

SolMiester
12-07-2012, 04:42 PM
Would the auto defrag still happen if you had an SSD? Just wondering
NO, W7 is programmed NOT to defrag SSDs

Iantech
12-07-2012, 05:29 PM
Its not about speed or performance as much (any gain on a modern computer is probably not noticable), its about reliability. Your drive can be more prone to developing bad sectors (resulting in data loss) and data errors if you dont do it. If it is a heavy data usage computer (such as video editing or graphics usage), weekly would probably be better, for the average user, probably monthly is ok. Its called 'preventative maintenance', it is automated in Vista up for a good reason.

Nick G
12-07-2012, 08:22 PM
NO, W7 is programmed NOT to defrag SSDs
That's good, I was wondering. You never know with windows.

mikebartnz
12-07-2012, 08:41 PM
I- Only saying this as many still feel the need to defrag weekly.
The trouble with leaving it too long is that it takes for ever to do its job. I've had them take up to about 3/4 of an hour.

mzee
13-07-2012, 07:11 PM
I have not done a defrag on any of my computers for several years. No problems.

Iantech
14-07-2012, 12:54 AM
... that you know of at least. I would make sure you are all backed up before hand if you did decide to do one. Occassionally when you get one that hasnt been done for years or never been done, when you do go to clean it up you create more problems initially as it starts detecting data corruption etc. Had a drive fail once while running a backup off it. It was the first long read period it had to do in years and that was enough to crash what was an already corrupt file structure. It was working fine doing little reads/writes but couldnt handle any sort of loading. Long story short, took out drive, slaved it, backed it all up, formatted it, reinstalled and all is fine. (well not any more, it died under tons of bricks when they pulled down Community House in the CBD).

So just saying, you run a risk by not doing a bit of "house keeping" once in a while. The old story, "If you look after it, it will look after you".

Agent_24
14-07-2012, 02:52 AM
old HD's: you run the very real risk of moving data into faulty parts of the HD. Ive seen that happen. Data loss !!!

Then you have a problem anyway and should have replaced the HDD already.

Besides, it's always advised to actually backup (if not already done) and run CHKDSK before doing defrag.

dugimodo
14-07-2012, 05:31 PM
I don't defrag either for three reasons
1. My C: drive is an SSD
2. After checking the scan results of defrag a few times the only things that were actually fragmented were completely unimportant, windows 7's automatic background housekeeping seems very good to me.
3. I just can't be bothered... Anything critical is backed up and I have no performance issues.

Back to the OP's problem, another option if the swap file is set to be on the C: drive is to move it to the D: either temporarily so you can defrag or permanently to free up space for the OS. A bonus here is is that windows won't defrag the swap file so the only way to do that is to move it or disable it temporarily (or use a different program).

Agent_24
14-07-2012, 06:15 PM
But, if Windows 7 does automatic defrag and SSDs are not supposed to be defragged, where does that leave people who run Windows 7 on an SSD?

b....
14-07-2012, 06:29 PM
DON'T DEFRAG SSD's?

Is it because;
They are so fast you don't get/see any performance boost,
Windows spots the SSD and decides to save files in contiguous blocks, instead of all over the place,
SSD's have short lives and the extra activity shortens it even further,
A rumour started by someone who didn't know any better.

dugimodo
14-07-2012, 07:10 PM
Windows 7 doesn't auto defrag SSD's it knows better.

And as for the reasons;
Yeah SSD's are fast enough in access time to make it unecessary
No windows doesn't magically save files contiguously, on an SSD there's no need anyway
Yes it shortens the life of an SSD unecessarily but the lifespan although shorter than a HDD is still 10 years+ under normal usage.

Chilling_Silence
15-07-2012, 10:06 AM
Yeah because the SSD doesn't have to physically move a head from one side of a physical disc and back again, it makes it irrelevant.

On a normal HDD it has to actually move a head, similar to the way a record player works (Ahhh good old 45s), and the seek times as it goes from the inside to the outside etc can be a *real* pain!

Agent_24
15-07-2012, 12:23 PM
Windows 7 doesn't auto defrag SSD's it knows better.

Are you sure? do you really trust Microsoft to give windows a feature like that which is guaranteed to work?

How does it know the difference between a HDD and SSD anyway?

dugimodo
16-07-2012, 02:35 PM
Are you sure? do you really trust Microsoft to give windows a feature like that which is guaranteed to work?

How does it know the difference between a HDD and SSD anyway?

Well ok it was a generalisation and not 100% true. There must be something in the hardware ID that identtifies an SSD and if you install windows 7 on one it will disable auto-defrag and a few other things by default. If however you add an SSD to an existing machine with a running OS or clone windows from a HDD to an SSD then it pays to go and check the settings and disable it yourself if required.

Chilling_Silence
16-07-2012, 03:14 PM
http://lifehacker.com/5640971/check-if-trim-is-enabled-for-your-solid-state-drive-in-windows-7

http://en.wikipedia.org/wiki/TRIM

Chilling_Silence
16-07-2012, 03:22 PM
See my SSD vs my other normal HDDs:
3998

Never had to set that up, Win7 was clever enough to just *know* it's a SSD when I installed it, AFAIK based on a few things like TRIM.

Nick G
16-07-2012, 04:49 PM
See my SSD vs my other normal HDDs:
3998

Never had to set that up, Win7 was clever enough to just *know* it's a SSD when I installed it, AFAIK based on a few things like TRIM.
Win7? Clever? :D

har
16-07-2012, 07:43 PM
C: drive can hold 20GB and has 15% free space. Drive D can hold 56GB, 95% free on D. D holds little folders and 5% of system space

lakewoodlady
16-07-2012, 08:08 PM
C: drive can hold 20GB and has 15% free space. Drive D can hold 56GB, 95% free on D. D holds little folders and 5% of system space

And that is relevant?

LL

har
17-07-2012, 07:27 PM
this person asked so ya:help:

Agent_24
17-07-2012, 08:18 PM
Well at only 15% free you are pushing the limit for a proper defrag.

Free up some more space and try again

zqwerty
17-07-2012, 09:26 PM
Yep 15% is too little.

mikebartnz
17-07-2012, 10:38 PM
15% will do it but going under that will be problematic. The more free space the better though.

har
19-07-2012, 08:29 PM
i did manage to ge it up 20 % once though :illogical

har
25-07-2012, 07:47 PM
hello????

Chilling_Silence
25-07-2012, 09:05 PM
hi! :)

Agent_24
25-07-2012, 09:12 PM
You said you got it up to 20% - what does that mean? That you made 20% free? And when was that?