Solved

formatting for XP 4096 bytes allocation unit size

Posted on 2004-10-23
17,788 Views
Last Modified: 2011-08-18
formatting 120 gig harddrive. I choose 4096 bytes as allocation unit size. Is this a "normal" allocation size,or is it better to have choosen a smaller allocation size.

Also whats the pro's and con's of having a bigger allocation size???
does it make the OS quicker having bigger allocation size??

thanks in advance
0
Question by:haidaboy
    7 Comments
     
    LVL 20

    Accepted Solution

    by:
    "Allocation Unit Size" is also known as cluster size, allocation unit size is the smallest amount of hard disk space that windows uses to hold a file. Generally, smaller allocation unit sizes result in more efficient use of hard disk space. You can specify the allocation unit size when you format a hard disk drive. If you don't specify a size, windows defaults to a size based on the size of the volume. Use format /A:<size> at the command prompt to override the default allocation unit size, where <size> can be 512, 1024, 2048, 4096, 8192, 16K, 32K, and 64K for FAT, FAT32, and NTFS. FAT and FAT32 also support 128K and 256K for sector sizes greater than 512 bytes. You can't use NTFS compression for allocation unit sizes larger than 4096 bytes.

    To improve the performance of your disk drive subsystem, consider matching the file system Allocation Unit Size to the block size of the application you are using. For example, suppose SQL Server is using a 4KB block size. When you format a file system on a new disk drive, launch Disk Administrator, create the partition, commit the partition changes, select Format, and then set the Allocation Unit Size to 4096 bytes. Matching the file system block sizes can improve the efficiency of the disk transfers when you use the application.

    For example, if you have four 4KB blocks of data to write to the disk and the disk is slightly fragmented, you might end up with eight separate 2KB writes to disk on a file system created with a 2KB Allocation Unit Size. When reading this file, the disk heads subsequently have to move to eight random locations. If you use a 4KB Allocation Unit Size, NT Server has to write to disk four times, and thus the disk heads have to move four separate times to complete a read of the data. Test your particular Allocation Unit Size configuration to determine your optimum file system layout, because each application and disk subsystem environment is a little different.

    0
     

    Author Comment

    by:haidaboy
    well ok..... so making the cluster size smaller is better for a gaming rig???
    0
     
    LVL 2

    Assisted Solution

    by:Wolfpup99
    Also, you didn't mention what file system (NTFS or FAT32) you were planning to use, and whether you were partitioning the drive in any way (cluster size will be driven by partition size).  NTFS will by default limit cluster size to 4096 because of the compression issue DVation191 mentioned, although you can choose to make it higher.  FAT32 will use much larger 32Kb cluster sizes for any partition larger than 32Gb.

    On balance, here'my my opinion for a gaming system.

    Contrary to some advice I've seen (not in this forum, but elsewhere on the net) about the alleged performance benefits of FAT32 for a gaming system, I would absolutely go with NTFS.   The reason is that it's much more robust and reliable, and there is no appreciable performance difference I've noticed -- I've used both, and yes my computer is used for gaming a lot, though not by me :)   With games, you may have abrupt program termination when things go wrong, and you may even get adventurous and test out new drivers for video etc. that might bring your system down -- NTFS can survive all that without blinking.  I've seen FAT32 get corrupted too often, or at least require a DSKCHK, under similar circumstances.  Frankly I see no reason to ever use FAT32 in a WinXP environment.

    As to cluster size with NTFS, I would stay with the default 4096.  It's always a balance between performance and space utilization, and I believe that over the long run you will notice inefficiencies in space utilization a lot more.  Especially with some games that like to maintain huge numbers of very small files.

    To maintain good performance, just keep your drive reasonably defragmented (run defrag say once every few months if needed).  WinXP uses reasonably good disk caching by default and that helps too.

    Cheers, :)


    0
     
    LVL 20

    Expert Comment

    by:DVation191
    The way to achieve ideal performance would be for each cluster size to be exactly and entirely filled with data. This could never be achieved because every file size would need to be divisible by your cluster size in order to not take up any more space than necessary. Typically, if you deal with many large files, a large cluster size would give you better performance. However for a file structure like a game, which is typically made up of many small files (textures, sounds etc [of couse this also varies by game..]), a smaller cluster size would suit you better. Which size is the best? I'm afriad that is really an impossible question. The only way to really find out would be to use your game as a benchmark and benchmark each cluster size...not a task I would recommend considering the small performance increase you may or may not gain. I hope this clears things up. =)
    0
     
    LVL 2

    Expert Comment

    by:Wolfpup99
    I might add that I'm in complete agreement with DVation191's first comment and his last, and the complete and solid information he has provided.

    I was just making a couple of quick observations:

    - Please use NTFS and not FAT32, for the reasons I outlined - you'll be glad you did :)

    - Go with the NTFS default cluster of 4096.  This is *relatively* on the small side (you wouldn't want to make it smaller), and making it bigger will start to gobble disk space if you have huge numbers of small files without, in all likelihood, providing much of a performance gain if any, as Dvation191 has said.

    And if you're a real stickler for optimum performance, keep you drive defragged -- although it's not usually very critical -- remember that there was a time when Microsoft had no defrag tool at all for NTFS and conveniently took the position that defragging was not necessary ....... :)
    0
     
    LVL 20

    Expert Comment

    by:DVation191
    Wolfpup99 stress on defragging is well deserved. You may likely notice a bigger performance increase when games load (especially large maps or levels) when your data is organized (from regular defragging) on an NTFS partition with an unsuitable cluster size than you would with a heavily fragmented drive with a well-suited cluster size.

    While NTFS is usually better than FAT32 at not fragmenting as easily or as often, it should still be part of your regular maintenance schedule.
    0
     
    LVL 20

    Expert Comment

    by:DVation191
    I believe all the author's questions have been answered.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: From Zero to Hero with Nodejs & MongoDB

    Interested in Node.js, but don't know where to start or how to learn it properly? Confused about how the MEAN stack pieces of MongoDB, Expressjs, Angularjs, and Nodejs fit together? Or how it's even possible to run JavaScript outside of the browser?

    Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
    I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now