December 29, 2008

Take Control of Your Hard Disk Space

December 29th, 2008

Now a days managing files and folders on PCs seems to be a critical task for network administrators and data storage managers due to huge capacity hard disks and millions of files and folders.

This article will help you in two ways

1. Understand the disk space allocation and wastage.

2. Understand how to manage your disk space.

Topics covered

  • 1. What is File Allocation Table (FAT) ?
  • 2. Disk Efficiency and FAT.
  • 3. What is Wasted Space. ?
  • 4. Solution.

What is File Allocation Table

The FAT is a roadmap, or index, that points to the location where all the information in files is stored on a floppy disk or hard drive. The FAT is extremely important because the system uses it to store and retrieve files containing information.

When you save a file in Windows, it is stored in multiple pieces (in clusters made up of multiple sectors) on the disk. Windows also saves the roadmap, or index, that points to these clusters in two copies of the FAT (File Allocation Table). The FAT contains the directions to all the pieces of your files, so that applications can find them again later

Disk Efficiency and FAT.

Every file on your system is stored in clusters in your hard drive, the maximum of one file can be stored in a particular cluster, so this results in wastage if the file is under the cluster size. The current FAT version (FAT16) organises files in 32K clusters in drives over 1.2gig, while FAT32 will use a minimum cluster size of 4K. This means that a 3K file wastes only 1K of disk space on FAT32, while it wastes 29K of space on a standard FAT system. This wastage can result in over 50% of a 2gig drive being wasted. See the table below.

What’s a cluster and why does cluster size matter?

The whole problem of wasted space arises from the fact that DOS allocates file space in “clusters”. Clusters are sequentially numbered on the disk, starting at 0, and cluster numbers are used both in the FAT (file allocation table) and in the individual directory entry for each file.

Allocation by clusters means some space on the disk will be wasted. Regardless of the actual length of a file as reported by the DIR command, the file will actually occupy a whole number of clusters on the disk. So a 1-byte file will actually use a whole cluster, a file that’s 1 cluster plus 1 byte long will use 2 clusters, and so on.

Is this serious? It can be, depending on the pattern of file sizes on your disk. For instance, if you have an 2GB disk with 5,000 files on it, about 100 MB of your disk is being wasted. And the figures can be much worse, depending on the pattern of your usage. One user reported copying 450 MB of files to a 1.6 GB disk and having them take up 600 MB! As your disk approaches being full, you may wish you could squeeze some extra space out of it instead of buying a new disk.

How does cluster size depends on hard-disk size?

As mentioned above in the table the cluster size for various partition sizes so that you can make intelligent choices about how to partition your hard disk.

From the above table we see that even 2.1 GB drive is over the 1023 kilo-byte limit for 16 KB clusters and therefore its cluster size (unpartitioned) is 32 KB. With a 32 KB cluster, even a 1-byte file will use 32 KB of disk space. A file whose length is 32,769 to 65,536 bytes will likewise use two clusters (64 KB), and so on for higher file sizes.

Even so, you may be inclined to think this is no big deal. But think about it: if you have a 2.1 GB drive with 5,000 files, you’re probably wasting about 160 MB.

How are cluster sizes determined?

Clusters are always some power of 2 times 512 bytes, but just which power of 2 depends on the disk size. Why should this be so? I mentioned above that clusters are numbered sequentially. The problem is that the directory structure and the FAT have room for only 16 bits for a cluster number. Since the largest unsigned number that will fit into a 16-bit field is 2^16-1 = 65535, the disk can hold at most 2^16 = 65536 clusters. This gives the formula

disk size

cluster size = ———, rounded up to a power of 2

65536

In general the wasted space per file will be half a cluster.

—–

What is Wasted Space?

Whenever a file is created, space will be allocated to the file in the form of clusters. A cluster can be of 8 KB , 16 KB or 32 KB depending upon your hard disk partition size. Following is the chart for cluster size.

FAT FAT32

Partition Size Cluster Size Partition Size Cluster Size

128 - 256 MB

4 KB

1 - 8 GB

4 KB

257 - 512 MB

8 KB

8 - 16 GB

8 KB

513 - 1024 MB

16 KB

16 - 32 GB

16 KB

1025 - 2048 MB

32 KB

>32 GB

32 KB

So the formula for wasted space is Wasted Space = Allocated Space - Actual File Size.

We will take an example of file which is of 900 bytes in size and your partition type is - FAT and its size is 1024 MB. So the allocated space for your file will be 16384 bytes or 16 KB whether you store 900 bytes or 1 byte in the file. So the wasted space in this case will be

Wasted Space = 16384 - 900 = 15484 bytes.

So the conclusion is : Lesser the file size, more the wasted space.

Solution

So to analyze how our disk space is being wasted we need a smart program which will show us the space hogging files and their locations.

We are working with File system softwares since last 2 years. We have developed a powerful disk space analysis and cleaning software - DiskAnalyzer Professional 1.5 which allows you to take control of your disk space and reclaim gigabytes of lost disk space.

You can visit our website to get more information about the software http://www.craveworldwide.com

Manoj Shinde

Crave Worldwide, India.

Tags: , , , , , , , , , ,

December 20, 2008

Perpendicular Hard Disk Drives

December 20th, 2008

What is a Hard Disk Drive?

A Hard Disk Drive (HDD) is a device used by modern computers to permanently store information. The Hard Disk Drive is arguable the most essential part of a computer system in that all the information that is permanently stored is contained within its enclosure, including your computer’s Operating System (OS). Thanks to Hard Disk Drives, long gone are the days when you would have had to keep all your programs and documents stored on removable media such as Floppy Disks or CD-ROMs.

Originally invented in the mid 1950’s and made commercially available in 1956 by International Business Machines (IBM). Called RAMAC (Random Access Method of Accounting and Control), the first Hard Disk Drives contained as much as 50 platters which were 24 inches in diameter and were computers in their own right albeit with a single purpose - to store data. The entire unit which housed the hard drive was the approximate size of two large refrigerators placed side by side. In the 50 or so years since their invention, Hard Disk Drives have steadily and aggressively far out paced Moore’s law. Which stipulates that memory in computers will increase by 100% approximately every 18 months. Hard Disk Drives on the other hand have increased capacity in the same period by approximately 130%, an increase of 100% every nine months in many cases. Such capacity increases are being threatened, however. I

n the years since the first Hard Disk Drive very little has changed apart from logical steps in technology such as the increased speed or improved interfaces, the basic technology has changed very little. There have been no technological leaps, as it were, for Hard Disk Drives beyond their increased miniaturisation. Apart from miniaturisation and recording media improvements the Hard Disk Drive as a device is almost identical technologically speaking, to the very first, the RAMAC.Hard Disk Drives use a similar technology as is employed in audio and video cassettes. Such audio and video cassettes use a magnetic ribbon wound around a two wheels to store data. To access a particular portion of the data contained on the magnetic ribbon, the device must wind the tape such that the beginning of the section containing the data is underneath the device that reads the data (the magnetic read/write head). This process is called sequential data retrieval because in the process of accessing the particular data, the device must sequentially read each piece of data until the data it’s looking for is found. This process is very time consuming and contributes to wear.

Hard Disks on the other hand use a circular disk-shaped platter upon which the magnetically sensitive compound is laid. Such platters are similar in concept to a Compact Disk (CD) in that the data they hold can be accessed randomly, that the recordable media is in a circular (disk) shape, and that the data is sectioned off into tracks and sectors. Data on a Hard Disk Drive can be accessed randomly because the recordable medium of Hard Disk Drives uses these separated tracks and sectors. By separating the data in such a way, it can be positioned at random intervals of the disk, depending upon the space requirements.

Anywhere from one to seven recordable platters are contained within a modern Hard Disk Drive’s metallic enclosure. Hard Disk Drive platters are perfectly circular disks made from either an aluminium alloy or a more recently a glass ceramic substrate which is a ceramic disk suspended in a glass outer shell. Onto the surfaces of a disk’s platter is laid a thin layer of a magnetically sensitive coating called the recording medium, in modern drives the mixture is a complex amalgam of different materials such as cobalt chromium platinum boron (CoCrPtB) and other such rare metals.

How does a Hard Disk Drive store data?

All information located on a computer is expressed as a series of ones and zeros (1/0), as binary digits (bits). Taking advantage of the nature of magnetic particles, that they can be polarised to magnetic north or south and that their magnetic poles can be alternated or switched when a sufficient magnetic field of the correct polarity is applied, Hard Disk Drives can store the very same sequence of bits onto a disk by polarising the required magnetic particles on the recording medium such that they represent the data being stored. Hard Disk Drives are sectioned off such that they contain both intersecting tracks and sectors. The purpose of which is to provide a logical data structure, to provide a way to distinguish between areas of data. Within each track there are a number of sectors. It is within these sectors of the Hard Disk which data is stored.

The platter of a Hard Disk Drive is coated with a magnetically sensitive coating comprised primarily of magnetically charged particles or filings which as a whole may be called the recording medium. These particulates can be magnetically aligned such that they represent binary digits, by inducing an electromagnetic field upon them via a devices read/write head. The recording media contains many billions of microscopic particles which when viewed extremely close resemble miniature metal filings. When a Hard Disk Drive records data onto the medium it takes many hundreds (usually anywhere from 500 to 100) of these magnetically sensitive particles to store a single binary digit. The increased reduction of the amount of particles required to record data is highly limited by the precision of the read/write head (the miniature device that reads and records data onto the recording medium) because the magnetic field which is used by the drive’s read/write head to read and/or record (write) data is such that it already tentatively borders nearby data.

Should it be shrunk much further in an attempt to increase precision, the likelihood of data corruption would increase vastly. Research by various parties has been on-going to find a workable solution to recording data onto much fewer or even single particles for some time now. A hard drive may record data onto the Hard Disk Drive by applying a sufficient magnetic field to the section of the recording medium (which is suspended upon the Hard Disks platter) such that the data (a series of ones and/or zeros which correspond to the information being stored) is recorded onto the medium by aligning the specified particles to the desired magnetic pole (north or south). In doing so, any previous data which was present is therefore destroyed.

Perpendicular verses Longitudinal

Ever since the late 1980’s and early 1990’s magnetic media drive manufacturers have been researching the feasibility of switching from longitudinal to perpendicular recording techniques. The advantage is clearly one of capacity: when longitudinal magnetic particles are packed together, they take up much more space than if they were to stand upright, if they stood perpendicular to the platter. More than merely a matter of initial capacity gain, perpendicular recording technology avoids a problem which has been well known in the field for many years: the super-paramagnetic effect (SPE), which affects magnetically charged particles of such small size as that used in Hard Disk Drives. “The super-paramagnetic effect is a phenomenon observed in very fine particles, where the energy required to change the direction of the magnetic moment of a particle is comparable to the ambient thermal energy” (source: Wikipedia.org).Many theories have cropped up over the years as to what density magnetic particles (described by a disks areal density) may achieve before becoming subject to SPE. At present it is suggested that anything from 100Gbit/inch2 to 150Gbit/inch2 is the physical limitation for longitudinal Hard Disk Drives, although perpendicular media solutions have been made as high as 230Gbit/inch2.

In the layering of the magnetic particulates atop a magnetic suspension layer and orienting the particles perpendicular to the platter, the recording medium can pack many more magnetically sensitive particles together in the same space than previously possible whilst keeping SPE at bay. Perpendicular recording technology does not however preclude SPE from limiting capacity in the future, more than anything perpendicular recording technology can been described as a way to give manufacturers breathing room to develop more permanent technological solutions such as holographic lithography or a multilayered recording medium. Traditional recording media manufacture consists of the spreading of recording material over a disk platter via a centrifugal force induced by spinning the platter whilst the recording material is placed atop its surface. The centrifugal force would spread the recording material across the surface, evenly spreading it in all directions. Perpendicular recording media manufacture on the other hand requires a much different technique.

The exact manufacturing process of perpendicular recording media is unsurprisingly a closely guarded secret, especially considering its recent arrival on the marketplace. From patents filed at the United States Patent and Trademark Office (USPTO), it can be taken that the predominant technique involves the laminating of magnetic and non-magnetically charged metals such as chromium, cobalt, platinum and alloys of similar; sandwiching unique layers to affect the desired result - a recording medium such that the magnetic particles are aligned perpendicular to the platter. In US patent number 6387483, filed by the NEC Corporation of Tokyo; it describes the technique as follows:The perpendicular magnetic recording medium of the embodiment is formed by laminating a Cr film, a soft magnetic under layer film, and a perpendicular magnetizing film on a substrate in this order. (Source: USPTO no. 6387483)

In longitudinal media manufacture too, laminating multiple supportive metals is achieved; in perpendicular media however, the difference is the magnetizing film as described above. Whereas traditional lamination ordinarily serves only to prevent wear and noise (both electro-mechanical and audible noise), in perpendicular media manufacture it would appear that at least some of the lamination process is used to magnetize the magnetic media particles to a perpendicular orientation. Precisely how the reorientation of magnetic media particulate is accomplished is not easy to determine, most probably because the technology is so new that such details are sketchy at best and obscure or guarded at worst. This fact is not at all surprising concerning a new technology such as perpendicular magnetic media development.

The future of storage technology

Perpendicular magnetic media technology as discussed earlier is merely a temporary solution, to find more permanent solutions we must look to much more advanced technologies. One such technology is patterned magnetic media. The process of patterned magnetic media aims to make singular magnetic particulates the object of recording bits, you will remember that current technologies requires approximately 500 to 1000 magnetic particles to store a single bit. The object of patterned media is to cut this dramatically down to a single particle per bit. Advantages of such a technology are such as reduced statistical noise associated with granular media and more increased areal density (as much as 64Gbit/inch2).

Patterned magnetic media aims to prevent the SPE barrier, or at least further decrement its effect through the use of so-called mesas and valleys. The technique uses the creation of barriers between magnetic particles, thereby avoiding the SPE complication which affects closely packed particles. Holographic Storage (a.k.a. Holographic Lithography) too is a technology that aims to increase storage capacity which is also under heavy research, and claims to be a much more permanent solution. Unlike Patterned Magnetic Media, Holographic Storage is a revolutionary step away from magnetic media and previous optoelectronic technologies.

Hard Disk Drives will always be subject to inertia and centrifugal force induced by the moving parts of the drives mechanical components (platter, read/write head), Holographic Storage has no such issues; the holographic process uses lasers in replacement of the read/write head of a Hard Disk Drive and the media itself requires no momentum (unlike the platters in Hard Disk Drives).

Such holographic storage is far from realisation, in fact it is postulated by some that it may be as much as ten years before the technology can be made into a workable solution. In direct symmetry to early memory research, research on Holographic Storage technologies seems to have banded into two camps: one of super fast data retrieval and extraordinarily high capacity storage; no doubt there will be extremely profitable markets for both.

Sean Nicholls is an undergraduate at the National College of Ireland where he is working on a Bsc.H in Software Systems. With almost six years experience of Computer Programming, Sean has extensive knowlege of computers and computer-related technology.

For further reading visit Sean’s blog at http://www.seannicholls.com/

Tags: , , , , , , , , , , , , , ,

December 9, 2008

Why do we Defrag the Hard Disk

December 9th, 2008

What is Defragging?

Defragging is process done to a hard disk in order to improve performance and recover some lost disk space. Defragging is an essential part of a PC’s upkeep as it keeps all the data on your hard disk in an easily readable order. If a hard disk is left without defragging, then over time the disk will begin to lose performance and also slowly reduce the available capacity to data. As you will be aware if your hard disk is running slowly then this will affect the rest of the system performance, in all applications and especially in games, where frame rate is important.

How does Defragging improve performance?

When you defrag your hard disk you re-arrange the order in which the data is stored on the drive. The PC will arrange the data so that data that belongs together and needs to be read together is actually put in the same place on the drive. The obvious question here is why doesn’t the PC store the data in the correct way in the first place? In an ideal situation (such as a blank disk) the PC would do these as a first option. However with the amount of data being deleted and wrote to the disk every second the PC is on it is no wonder that the data cannot be stored together.

Lets have a look at an example. Say you write 3 files to a disk all 10Mb in size the data would be all in a line each 10mb block after the other. This is how your PC would prefer to store the data for maximum performance. It stands to reason that this is how you would like it to be stored as well if you needed to search for the data. But now lets say that you decide to delete the middle file as its no longer any use to you. You now have a gap inbetween your files.

Lets say this time you write a file of 15mb in size. This file will be written in the first 10Mb of space and the remaining 5Mb added to the backend of the free space.As you can imagine with the millions of files being written to and deleted from the disk each day, not to mention the temporary files that windows uses on a frequent basis its not hard to imagine the state in which your hard disk can be in after months of use. After a defrag in this simple example your PC would re-arrange the disk to look as follows.

When files or indeed groups of files that belong together are stores next to each other the PC has a much easier time locating the data plus the disk heads don’t have to travel to different parts of the disk to retrieve the data required. This of course speeds up the disks performance and so in turn increases overall system performance. There are of course levels of performance gains. It becomes more negligible as you move to faster hard disks with large memory buffers to compensate for file fragmentation however I would not ignore the problem of fragmentation, it doesn’t take much effort to defrag your disk now and then

How does defragging increase disk space?

Simply put defragging doesn’t really create any free space on your hard disk. It may appear when you look at the graphics that defrag programs show you, that the disk looks like it has more space, but all you are doing is moving data about not removing any. Any disk space gain is negligible and is caused when the defrag program puts together half clusters of data. Clusters can hold a number of files, but if not filled the next file is started at the next cluster. If a file is broken into pieces around the disk and defrag can put the file back into a single cluster, or just save a cluster somewhere a small amount of space will be released.

Advanced Defragging

Some defragging software can go a little beyond just sorting your files so they are all together. Programs such as Norton Speed Disk can also sort your entire sets of files and programs into the order that they are used. For example it can be set so that your windows swap file is at the fastest part of the disk, followed by games and most used applications which also need the fastest part of the hard disk., Then documents etc and rarely used application can be put to the back of the disk., This gives the priority speed access to the applications that need it most. Again this may only be a small increase in performance but every little helps.

Software to use for Defragging

You will be pleased to know that Windows comes with an adequate defrag program which everyone can use. There are also some other pieces of software out there for a more specific use. Norton Speed disk is one option on the market which comes as part of Norton Utilities and Norton Systemworks. Doing a search on Defrag software on your favourite search engine will give you some options of free to use and pay for software.

Stephen Orgill
Editor - http://www.pantherproducts.co.uk
Computer related articles and reviews.

Tags: , , , , , , , , , , , , , , , , , ,
Close
E-mail It