© J.C. Kessels 2009
MyDefrag Forum
May 21, 2013, 10:20:47 pm
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
MyDefrag Forum
>
MyDefrag v4 Forum
>
Questions and help
>
Where does Windows put new files
Pages: [
1
]
« previous
next »
Print
Author
Topic: Where does Windows put new files (Read 2055 times)
Mohaine
JkDefrag Supporter
Posts: 13
Where does Windows put new files
«
on:
September 07, 2009, 03:06:34 am »
Where on the disk does Windows place a new file that gets created? I.e. what gap does it choose? Does it always find an appropriately sized gap as close as possible to the start of the disk?
What I'm really wondering about is when you create a gap after a zone, there's no guarantee that new files that would belong in that zone are created there, is there? Is the gap only for edited files growing in size? So if files in a zone are relatively static - i.e. not edited - then there's not much point in leaving a gap after the zone, is there?
Windows might decide to place new files in your gap after a zone, I guess, which would clutter up the zone in any case.
Just trying to understand gaps after zones...
«
Last Edit: September 07, 2009, 03:09:37 am by Mohaine
»
Logged
jeroen
Administrator
JkDefrag Hero
Posts: 7155
Re: Where does Windows put new files
«
Reply #1 on:
September 07, 2009, 06:53:40 am »
Quote from: Mohaine on September 07, 2009, 03:06:34 am
Where on the disk does Windows place a new file that gets created?
I don't know how Windows decides where to place new files. I'm sure there is some kind of optimization there, for example the closest gap to wherever the harddisk heads happen to be, or whatever. But new files can basically be placed anywhere.
Quote
then there's not much point in leaving a gap after the zone, is there?
If a disk were perfectly optimized and there were no gaps at all, so the only free space is at the end behind all the other data, then all temporary files would have to be placed behind all the other data. That's the slowest part of the disk, and the harddisk heads will have to travel very far. MyDefrag makes gaps in various places to give Windows a chance to place temporary files at a faster part of the disk.
Logged
Kasuha
JkDefrag Hero
Posts: 595
Re: Where does Windows put new files
«
Reply #2 on:
September 07, 2009, 09:53:15 am »
Quote from: Mohaine on September 07, 2009, 03:06:34 am
then there's not much point in leaving a gap after the zone, is there?
I always thought the point in gaps is to let previous zone gain a few new files without need to move files at the start of the next zone, thus reducing number of file moves when optimizing the disk.
It's impossible to prevent the system creating fragmented files - it is creating and removing various files all the time leaving gaps between them and then filling these gaps with other new files that don't always fit. When creating two files at the same time they often interleave which results in these files being highly fragmented (all it takes is to download two big files at once but system often does such things internally).
There's no point in getting too stressed about it. Defragmenting what's left time to time is enough.
Logged
poutnik
JkDefrag Hero
Posts: 1105
Re: Where does Windows put new files
«
Reply #3 on:
September 07, 2009, 05:29:37 pm »
I have noticed 2 different interesting patterns,
considered by myself as extremes of NTFS behavior.
1st, when copying photos from camera to disk,
there are often placed equidistantly( maybe in clusters) in free place,
to create many same-size gaps between.
2nd, I noticed once,when recording large file by TV card,
it seemed to ignore big gaps, and tried to fill
all smaller ones within a zone.
.
Logged
It can be fast, good or easy. You can pick just 2 of them....
Treating Spacehog zone by the same effort as Boot zone is like cleaning a garden by the same effort as a living room.
Mohaine
JkDefrag Supporter
Posts: 13
Re: Where does Windows put new files
«
Reply #4 on:
September 08, 2009, 04:20:47 am »
Quote from: jeroen on September 07, 2009, 06:53:40 am
Quote from: Mohaine on September 07, 2009, 03:06:34 am
Where on the disk does Windows place a new file that gets created?
I don't know how Windows decides where to place new files. I'm sure there is some kind of optimization there, for example the closest gap to wherever the harddisk heads happen to be, or whatever. But new files can basically be placed anywhere.
Quote
then there's not much point in leaving a gap after the zone, is there?
If a disk were perfectly optimized and there were no gaps at all, so the only free space is at the end behind all the other data, then all temporary files would have to be placed behind all the other data. That's the slowest part of the disk, and the harddisk heads will have to travel very far. MyDefrag makes gaps in various places to give Windows a chance to place temporary files at a faster part of the disk.
Thanks - makes sense!
Logged
Wolfmight
JkDefrag Senior
Posts: 29
Re: Where does Windows put new files
«
Reply #5 on:
September 08, 2009, 01:56:21 pm »
Yes, windows' new file placement is rather arbitrary. Microsoft is probably testing a strict sorting method or perhaps Windows 7 is already testing one (haven't used Win7 yet), but perhaps the method would use extra disk resources to sort files while it stores them. Maybe Microsoft figured using the quickest most unorganized placement method would prove to be the fastest for the current user's activities. Higher end systems wouldn't notice a reduction of speed unless the file were over 100mb in my opinion, even then, perhaps over 300mb+ for faster disks like RAID striping mode and SSD. Now I'm curious if SSD can be set up in RAID striping mode lol.
I have yet to read into the file placement methods of most linux distros and Apple's latest Macintosh OS (unix using HFS).
Linux distros use many different file systems: ext2,ext3,ext4, XFS, JFS, ReiserFS and btrfs - also including 3rd party support for other popular file systems in Windows and perhaps Macintosh but I cannot be too sure.
«
Last Edit: September 08, 2009, 02:01:56 pm by Wolfmight
»
Logged
peters40
JkDefrag Hero
Posts: 61
Re: Where does Windows put new files
«
Reply #6 on:
September 08, 2009, 03:10:53 pm »
Quote
Now I'm curious if SSD can be set up in RAID striping
See this !!
http://www.youtube.com/watch?v=96dWOEa4Djs
Logged
bob es ponja
JkDefrag Junior
Posts: 5
Re: Where does Windows put new files
«
Reply #7 on:
November 16, 2009, 12:50:50 pm »
I defragged moving some .rar files and stuff like that to the end of disk, and often accesed files to the start of disk. There appeared a big gap between them (see 1st image attached).
Then, I copied a new file and Windows placed it... In the middle of the gap??!!
(see 2nd image)
I thought that part of the defragmentation strategy was not only keep files defragmented, but also keep gaps! Gaps are important, because they will be the files of the future. The more healthy (defragmented) the gaps are, the more defragmented will be the files when they get dropped into, because these
will inherit
the previous gap fragmentation!
Why does Windows enjoy fragmenting gaps when it would be soo easy to keep them as big as possible, by choosing their start or end areas to place new files? Is it the old Wintel paranoia again? (i.e.: Windows contributes making your computer slower, so you go and buy another one, so Intel earns money, and Microsoft too, and the cycle repeats again). Please let me know it isn't, and that this is part of a more complex algorythm that my mind will never grasp.
Thanks!
1-before file placement.JPG
(41.51 KB, 662x460 - viewed 333 times.)
2-after file placement.JPG
(37.97 KB, 600x400 - viewed 331 times.)
Logged
slender
JkDefrag Hero
Posts: 51
Re: Where does Windows put new files
«
Reply #8 on:
November 16, 2009, 01:03:08 pm »
Hmm. You could also think that itīs actually really clever to put files in middle of big gap. Now there is evenly long way from outer zone and inner zones to the new data.
Logged
BloodySword
JkDefrag Hero
Posts: 1113
Re: Where does Windows put new files
«
Reply #9 on:
November 16, 2009, 01:06:04 pm »
I think the windows API and the developpers should give the an estimated size of a file that will be created. In case of a HTTP download where the Content-length is defined, the file could be created with a given size and windows seareches for the first gap wich will hold this file. The program can the write the file step by step without fragmenting. But today it seems that the file is just created step by step and this will lead to create fragments in size of the download buffer. This will lead into HUGE fragmentation. There seems to be no optimization in ntfs drivers or so. It seems as if windows uses a dice and writes the file where he wants to write it depending of it's current fad ?!...
Logged
Greetings from Germany!
quanthero
JkDefrag Hero
Posts: 234
Re: Where does Windows put new files
«
Reply #10 on:
November 16, 2009, 01:34:39 pm »
@BloodySword
I believe new file placement in Windows is not random. By creating files using different mehods (e.g. direct copy, download, save a document, etc.), one can observe that file placement in each case follows certain patterns. And, by definition, if something has a pattern, this something is not random. So, I think Windows (and NTFS in general) does have certain 'rules' as to where and how to place newly created files. We just don't know anything about these 'rules' (NTFS = the most closed filesystem out there, Windows = proprietory
dll
hell).
Logged
BloodySword
JkDefrag Hero
Posts: 1113
Re: Where does Windows put new files
«
Reply #11 on:
November 16, 2009, 01:40:16 pm »
I think the rules are somewhat inefficient... If there were logical rules, we wouldn't have such fragmentation on our drives...
Logged
Greetings from Germany!
quanthero
JkDefrag Hero
Posts: 234
Re: Where does Windows put new files
«
Reply #12 on:
November 16, 2009, 01:53:09 pm »
Quote from: BloodySword on November 16, 2009, 01:40:16 pm
I think the rules are somewhat inefficient... If there were logical rules, we wouldn't have such fragmentation on our drives...
Yep, I agree. It is always annoying to see how simple actions such as downloading files or saving documents result in heavy fragmentation on Windows.
Logged
BloodySword
JkDefrag Hero
Posts: 1113
Re: Where does Windows put new files
«
Reply #13 on:
November 16, 2009, 02:47:53 pm »
We should make a project wich will stay in contact with MS to improve ntfs file placement... ^^ FAT32 is unimportant btw. I hope there will be a new FS wich is compatible with ALL OS out there and unless FAT it should support actual purposes like NTFS and more.
«
Last Edit: November 16, 2009, 02:52:07 pm by BloodySword
»
Logged
Greetings from Germany!
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
MyDefrag v4 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Scripts, and other contributions
-----------------------------
JkDefrag v3 Forum
-----------------------------
=> Announcements
=> Questions and help
=> Bugs and problems
=> Requests for new features
=> Programming with the library
Loading...