Welcome Guest ( Log In | Register )




                Web Hosting

 
Reply to this topicNew Topic
How To Help Reduce Disk Fragmentation
qwijibow
post Feb 8 2005, 01:36 PM
Post #1


Way Out Of Control - You need a life :)
Group Icon

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.
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Feb 8 2005, 03:02 PM
Post #2


PsYcheDeLiC dR3aMeR
Group Icon

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).
Go to the top of the page
 
+Quote Post
harriko
post Feb 8 2005, 04:31 PM
Post #3


Premium Member
Group Icon

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?
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Feb 8 2005, 04:43 PM
Post #4


PsYcheDeLiC dR3aMeR
Group Icon

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. smile.gif
Go to the top of the page
 
+Quote Post
vizskywalker
post Apr 2 2005, 10:14 AM
Post #5


Techno-Necromancer
Group Icon

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).
Go to the top of the page
 
+Quote Post
qwijibow
post Apr 3 2005, 01:11 AM
Post #6


Way Out Of Control - You need a life :)
Group Icon

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.
Go to the top of the page
 
+Quote Post
vizskywalker
post Apr 3 2005, 01:34 AM
Post #7


Techno-Necromancer
Group Icon

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.
Go to the top of the page
 
+Quote Post
iGuest
post Jan 18 2008, 01:11 PM
Post #8


Newbie [ Level 1 ]
Group Icon

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
Go to the top of the page
 
+Quote Post

Reply to this topicNew Topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 2 sparkx 146 26th December 2008 - 06:17 PM
Last post by: xboxrulz
No New Posts   3 veerumits 174 28th November 2008 - 08:44 PM
Last post by: Quatrux
No New Posts   5 TBK 553 31st July 2008 - 05:24 AM
Last post by: Quatrux
No New Posts   9 yordan 646 9th June 2008 - 01:58 PM
Last post by: yordan
No New Posts   6 warbird 1,743 27th March 2008 - 12:52 PM
Last post by: iGuest
No New Posts   14 dewslat 1,609 19th February 2008 - 07:28 AM
Last post by: zoedimax
No New Posts 11 Abhi 1,598 10th February 2008 - 09:36 PM
Last post by: iGuest
No New Posts   7 turbopowerdmaxsteel 873 4th February 2008 - 06:01 AM
Last post by: turbopowerdmaxsteel
No New Posts   10 ebbinger_413 2,866 13th January 2008 - 06:02 AM
Last post by: kxrain
No New Posts   2 soleimanian 2,103 2nd January 2008 - 04:21 AM
Last post by: iGuest
No New Posts 6 agriogata 661 4th December 2007 - 11:49 PM
Last post by: polarysekt
No New Posts   5 Grafitti 1,061 3rd October 2007 - 02:43 AM
Last post by: dewslat
No New Posts   5 9em-x 2,502 8th August 2007 - 02:43 PM
Last post by: kelvinmaki
No New Posts   5 sudarshan 1,245 18th April 2007 - 09:20 AM
Last post by: Vue
No New Posts   2 Niru 870 17th April 2007 - 09:50 PM
Last post by: vujsa