|
|
|
|
![]() ![]() |
Feb 8 2005, 01:36 PM
Post
#1
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,366 Joined: 14-September 04 From: Nottingham England Member No.: 570 |
Today, the microsoft windows operating system is the only OS so suffer from disk fragmentation and need constant maintenance with a disk "defragmentor"
their are 2 main reasons for this... 1) The file system, NTFS is FAT32 are seriously out dated. reiserfs, Xfs and Jfs would be much better solutions, but unfortunatly, microsoft are planning on sticking with NTFS for longhorn. there is nothing we can do about this. 2) The SWAP file ! first a definition of the swap file (sometimes called virtual memory) All running programs need to be stored in RAM. to keep the RAM clean, and maximise the amount of programs you can have running, RAM which hasnt been accessed fro a while is removed from ram, and swapped onto the hard disk, when it is next needed, it swapped back in. basically, it allows you to use a much slower, but larger hard disk, asif it were RAM memory. now, the porblem. the swap file is a single file which can often grow upto a gigabyte in size. this file is constantly growing, shrinking, moving. which causes it, and all other files on your disk to become fragmented. the swap file is a NIGHMARE. the solution. Other OS's like Unix, BSD and Linux have a simple yet highly efficiant way to completely prevent this kind of fragmentation... they dont have a swap file, they have a swap partiton. unlike a file within the main file system, a partiton is a seperate area of the disk, completely unrelated to the main root filesystem. in the old days, a swap partiton was annoying because a partiton always takesa certain amount of space, it cannot grow or shrink like a file. so if you have a 1gig swap partiton, you will always have 1 gig missing from your disk, even if the swap is unused. however today, a singl;e gigabyte is nothing, hard drives are massive. the difference between a 40gig and80gig disk is £10. implementing the solutions... 1)The easy solution would be to simply to turn the virtual memory / Swap Off in the memory management of the ocntrol panel, however unless you have alot or ram, you run the risk of crashing if your memory is dipleated. 2) add a second hard disk, prefferable ona different IDE channel an use that as purely swap. 3) the super fun cool hack way.... re-partiton your windows disk, and add a swap partiton. to do this without having to format the disk you will need a liveCD called knoppix (http://knoppix.org) burn the cd iso to a cdrom and boot it. you need to do this because you cannot repartiton a mounted disk. in the main menu once you have booted the disk is a porgram called qt-parted. this is a graphical forontend to a free partiton tool called "parted" its very simple to use, shrink your windows partiton by the amount of swap you want to use... 1Gb should be more than enough unlesss you do some hard core multimedia editing. in the empty space at the end of your disk, add a new partiton and format is as "vfat" which is anouther name for "fat32" fat32 is flaster than NTFS, and because the partiton is only 1Gb in size, we dont needs NTFS's abilites to hold files greater than 4GB. re-boot windows, in the cotrol panel, set the swap files ocation to the newly grated partiton (probably labeled D:/) THEN boot knoppix again, and delete the old swap file from windows C:/ disk. THEN defragment your both partitons. you should now dotice then the main partiton needs defragmenting less often. |
|
|
|
Feb 8 2005, 03:02 PM
Post
#2
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
Hey good tip. I've tried this before and it indeed gives you quite a good boost (even though if you try the same with '98 it actually slows the system down).
|
|
|
|
Feb 8 2005, 04:31 PM
Post
#3
|
|
|
Premium Member Group: Members Posts: 279 Joined: 2-February 05 From: UK Member No.: 2,480 |
what is defragmentation anyway? isit the files being split all over the hard drive so when it loads up it takes much longer to find the file parts. after i used disk fragmentation the computer will run faster and reduce any errors. i correct?
|
|
|
|
Feb 8 2005, 04:43 PM
Post
#4
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 myCENTs:84.36 |
QUOTE(harriko @ Feb 8 2005, 11:31 PM) what is defragmentation anyway? isit the files being split all over the hard drive so when it loads up it takes much longer to find the file parts. after i used disk fragmentation the computer will run faster and reduce any errors. i correct? Yups absolutely.. Degragmentation is the act of putting all those scattered file parts into ONE BIG CONTIGUOUS block so that your HDD Head can read the whole file in ONE Sweep rather than jump around all over the hdd to find the fragments - which of course would cost it a hell lot in terms of read time. If you want to find out the exact definition I suggest you to visit http://www.wikipedia.org and search for this particular term. |
|
|
|
Apr 2 2005, 10:14 AM
Post
#5
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
My personal favorite method of preventing disk defragmentation is something I'm using in the OS I'm writing. Simply move the files on disk when deleting a file. Or if, like windows does, you have every file stop and start on specified boundaries, only save the file to a spot that has a enough contiguous boundaries (which windows doesn't).
|
|
|
|
Apr 3 2005, 01:11 AM
Post
#6
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,366 Joined: 14-September 04 From: Nottingham England Member No.: 570 |
Im no expert.... but i think that would seriously damage disk throughput performance.
what filesystem are you planning on using ??? ive heard very good things about XFS, JFS, and reiserfs. |
|
|
|
Apr 3 2005, 01:34 AM
Post
#7
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
I don't know yet, I'm still in the developement stage. But yeah, constantly moving files will damage the disk over a long period of time, but the time period is so long that it won't cause noticeable problems for anyone who uses the disk. Basically what it is a mini defrag, except the only thing being moved is empty space, not chunks of files, so it takes much less time because a search doesn't need to be done for the file chunks. Another advantage is you leave no traces of the file that originally existed. And my OS is actually going to have several deletes, one removes the file from the file tree, the second overwrites it with 0s, and the third does the mini-defrag. The user can pick a default, or pick one to use at any specific delete.
|
|
|
|
Jan 18 2008, 01:11 PM
Post
#8
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
I think in windows you can configure the swap file to a fix size.
For exaple you set min = 1 gig , max = 1 gig , No changing size of pagefile .Sys => no fragmentation No need to create a prtition. -toot |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
Lo-Fi Version | Time is now: 1st December 2008 - 08:53 PM |