Learn How OS X Handles Slack Space and Internal File System Fragmentation

by Guest Author on December 23, 2012

in Guest Posts, Mac OS X

Fragmentation is a problem that develops subtly. The aftermath of severe file system fragmentation is inefficient use of disk space and consequently poor performance. There could be different types of fragmentation depending on the storage allocation scheme used by the OS. In general, fragmentation is classified into three types: internal, external, and data. Internal fragmentation differs from the other two kinds of fragmentation and OS X has built-in safeguards to counter it. The following discussion will give you an insight into internal fragmentation.

Internal Fragmentation

This type of fragmentation occurs when the memory blocks allocated for file storage contain wasted space. Typically, memory is allocated in chunks and each chunk has a size that corresponds to a multiple of 4. The smallest chunk can be a single block with size 4 KB (if the volume size is greater than 1 GB). In OS X’s HFS+ or any other file system, files are usually stored beginning at the start of a sector. This simplifies the organization of files on the hard drive. If a file requires 23 KB of disk space for storage, it will be in fact allocated one chunk of 24 KB size. Thus, 1 KB of memory space is left unused or wasted. This space is known as slack space and thus the name ‘Internal’ fragmentation.

Slack Space

Slack space can be defined as the space left unused inside an allocated region of memory. You can also say that slack space is the memory space between the last byte occupied by the file and the starting byte of the next sector. Similarly, when memory is allocated to a program, it may get some additional disk space for alignment or metadata storage. As a consequence, some allocated space is left unused, which adds to internal fragmentation.

Internal fragmentation may become severe gradually as more and more files are stored. At some point in time, your hard drive will become highly fragmented. This may cause slowdowns and sluggish behavior of Mac. It is difficult to prevent or fight internal fragmentation. If you want to put a check on this, you can do so by an effective design change.

OS X uses a built-in mechanism to facilitate delayed memory allocation. Delayed memory allocation allows combining a set of small allocations into a single large allocation. When two or more than two files are allocated contiguous blocks of memory, the amount of slack space generated is comparatively less. This helps to prevent internal fragmentation from occurring in the first place.

You can also use a number of advanced Mac hard drive defragmentation tools for the same purpose. These utilities reorganize files stored on your OS X drive and removes all slack space generated due to internal fragmentation. These software can also help to fix external fragmentation of the file system.

[tp lang=”en” only=”y”]

Guest article written by: Vishal is an enthusiastic Mac user and writer willing to explore several areas of hard drive optimization, removing Mac hard drive slacks is one of those optimization technique.


[tp not_in=”en”]

Guest article written by: Vishal is an enthusiastic Mac user and writer willing to explore several areas of hard drive optimization, removing Mac hard drive slacks is one of those optimization technique.


Related articles you might find interesting:

    None Found!

Comments & Leave a Comment


{ 2 comments… read them below or add one }

Andrew December 29, 2012 at 19:42

Then use Mac Os, you will feel dont want continue use windows , however Mac OS less compatibility than Windows , so you must continue with Windows although you dont like that :))
Andrew recently posted… Buy Black & Decker LP1000 Alligator Lopper 4.5 Amp Electric Chain Saw Deals


David Bennett January 6, 2013 at 23:58

One way to clean up space on a Mac is to use Disk Utility. Go to Applications > Utilities > Disk Utility and highlight your hard disk in the sidebar of the utility. Then choose the ‘erase free space’ option.

It can take a long time (more than an hour) if you have a big hard drive and lots of free space, but you can regain several megabytes of space.
David Bennett recently posted… The Blogsherpa Era Comes To An End



Leave a Comment

CommentLuv badge

Previous post:

Next post: