Skip to main content
GameDev.net gamedev.net
🔒 Locked

why does hard-disk space relate to performance?

Started by graveyard filla Mar 10, 2009 at 5:41 PM 5 replies 1.3k views
Original Post
graveyard filla
graveyard filla
hi, Just wondering why I need to keep my HD 20% free space, otherwise I suffer from performance issues... Can someone explain this to me in a low level way exactly what is going on here?? thanks
FTA, my 2D futuristic action MMORPG
zer0wolf
zer0wolf
"20%" free is a bit of an arbitrary number, but the reason why the more space not used makes things faster is two reason:

1) Your operating system (presumably Windows) will use available space for keeping track of applications and whatnot you're using as expanded "RAM".

2) Your actual disk itself is circular. The further out it gets from the center the longer it takes to read around the disc. The more full it gets the further out it has to read and thus the slower it reads. This is why defragging is important. Defragging keeps data that is supposed to be together actually together, which means your drive doesn't have to go as far to get the next piece of data. Defragging will also relocate outer files on the disc closer to the inside.
Promit
Promit
Quote:
Original post by zer0wolf
2) Your actual disk itself is circular. The further out it gets from the center the longer it takes to read around the disc.
While this is true, it's hardly the major motivation behind defragmentation.

When you're using a hard drive, there's some file system on top of it. This file system needs to do accounting, matching up files to sectors. It needs some of your hard drive space for its own records. It also needs to slot files of all kinds of varying sizes into places on the hard drive in some kind of preferably-optimal fashion. As the drive fills up, holes which allow files to be placed contiguously become more and more difficult to find. As you get into the sub-20% free range, these holes can become very problematic to find, and it becomes more and more involved to trace the internal file system data structures to find suitable blocks.

That's the short, mile high overview that I can give without cracking my operating systems textbook, anyway.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Degra
Degra
Quote:
Original post by Promit
Quote:
Original post by zer0wolf
2) Your actual disk itself is circular. The further out it gets from the center the longer it takes to read around the disc.
While this is true, it's hardly the major motivation behind defragmentation.


Actually IIRC it's false, modern hard disks will maintain storage density towards the edge of the platter. So it makes no difference to the read speed whether data is at the edge or not.
Antheus
Antheus
Quote:
Original post by Degra
Actually IIRC it's false, modern hard disks will maintain storage density towards the edge of the platter. So it makes no difference to the read speed whether data is at the edge or not.


HdTach provides the definitive answer.
Fussion289
Fussion289
Quote:
Original post by zer0wolf
"20%" free is a bit of an arbitrary number, but the reason why the more space not used makes things faster is two reason:

1) Your operating system (presumably Windows) will use available space for keeping track of applications and whatnot you're using as expanded "RAM".



This is the most proper/true answer. Basicly it's what windows refers to as "paged" file usage. Basicly you use it for a number of reason the most common is you simply can't fit the file in your ram or you don't have enough ram. Plus windows likes to use it as a quick refrence for files it uses ALOT while its operating or atleast that's my understanding on everything past sentence 2 LoL.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.