block size on OS drive

mystykmax

Limp Gawd
Joined
Feb 4, 2005
Messages
473
So I'm sure this has been asked before but google (with me driving anyway) can't seem to find out how to format and make my block size 16K on the drive (RAID 0 array) before I install my OS (Win 7). Can anyone show me how to do that or even tell me if it's stupid to do that? I have a 3ware 9650SE 4-port RAID card and 3 WD 640's I'd like to put my Win 7 OS on but the install of course always defaults to 4K block size. I've been using a 16K stripe size and I'd like to align the strip and block size. Does anyone have some guidance for me? Thanks in advance for any help.
 
Just curious but why 16k stripe? why not a 4k stripe? or a 64k stripe?

You will need to do it on the command line of the installer BTW.

When you instert your win7 disk. Select to do a repair, and it wont find an OS obviously, but select the option that is not restore image.
There is a command line option there.
type Diskpart

After that go X:\
and setup.exe will bring you back to the begining.
Select your partition that you made and install, dont reformat.
 
Just curious but why 16k stripe? why not a 4k stripe? or a 64k stripe?

You will need to do it on the command line of the installer BTW.

When you instert your win7 disk. Select to do a repair, and it wont find an OS obviously, but select the option that is not restore image.
There is a command line option there.
type Diskpart

After that go X:\
and setup.exe will bring you back to the begining.
Select your partition that you made and install, dont reformat.

I believe my controller's smallest supported stripe size is 16K.

at what point and how do I set the block size?

Also, I actually have vista and another OS on two partitions already on this array that I would like to erase.
 
Just do this
This way your partition will be aligned properly and the cluster size will equal stripe size.


Diskpart
list disk
select disk <DiskNumber>
clean
create partition primary align=1024
assign letter=<DriveLetter>
format fs=ntfs unit=16K label="<label>" nowait
 
Just do this
This way your partition will be aligned properly and the cluster size will equal stripe size.


Diskpart
list disk
select disk <DiskNumber>
clean
create partition primary align=1024
assign letter=<DriveLetter>
format fs=ntfs unit=16K label="<label>" nowait

Awesome. I'll try it when I get home! Thank you!
 
because I have dumbass disease, I did not see the "clean" in your instructions...thanks again for your kick-ass help!
 
Uhmmm... RAID 0 options are set on the controller, not anywhere else. The cluster size on the file system has absolutely nothing to do with the block/stripe size on the RAID - they are two entirely different things, and there is absolutely no benefit to "matching" the sizes.

It's been shown in tests over the years (they're out there, you can find 'em just as easily as I have in the past) that show no appreciable difference when you "match" the file system's cluster size to the block/stripe size of the array. Realistically, altering the cluster size is a very very bad idea to be mucking around with - the only time you will note any measurable benefits is with video recording and I mean recording high bandwidth video streams straight to the platters.

In day to day operation on maybe 90-95% of the machines out there, the default NTFS cluster size is going to work fine for most if not all purposes that even enthusiasts can come up with.

What WILL affect the performance of a RAID 0 array more than anything else is the block/stripe size chosen for the array itself. Generally, 128K stripes works best overall but 3Ware will have information about that controller which tells you which block/stripe size is best when you create the array, someplace in the documentation will be their recommended block/stripe size.

But again, it has nothing to do with the file system you place on the array after it's created...

Make the array with the recommended block/stripe size by 3Ware, then partition/format it NTFS and you'll more than likely still get the best overall performance from the hardware you're using.
 
Uhmmm... RAID 0 options are set on the controller, not anywhere else. The cluster size on the file system has absolutely nothing to do with the block/stripe size on the RAID - they are two entirely different things, and there is absolutely no benefit to "matching" the sizes.

It's been shown in tests over the years (they're out there, you can find 'em just as easily as I have in the past) that show no appreciable difference when you "match" the file system's cluster size to the block/stripe size of the array. Realistically, altering the cluster size is a very very bad idea to be mucking around with - the only time you will note any measurable benefits is with video recording and I mean recording high bandwidth video streams straight to the platters.

In day to day operation on maybe 90-95% of the machines out there, the default NTFS cluster size is going to work fine for most if not all purposes that even enthusiasts can come up with.

What WILL affect the performance of a RAID 0 array more than anything else is the block/stripe size chosen for the array itself. Generally, 128K stripes works best overall but 3Ware will have information about that controller which tells you which block/stripe size is best when you create the array, someplace in the documentation will be their recommended block/stripe size.

But again, it has nothing to do with the file system you place on the array after it's created...

Make the array with the recommended block/stripe size by 3Ware, then partition/format it NTFS and you'll more than likely still get the best overall performance from the hardware you're using.

Joe, I know you are a really smart guy, but you start out pretty condescending. I already admitted that I'm not incredibly great at this and you come and just lambaste me. I hope you felt better after doing that.

As to some of your comments, I was talking about setting the stripe size on the RAID controller and then formatting the partition on my array to set the block = stripe sizes. Since you are a smart guy, I know you knew what we were talking about but you chose to be pedantic about the information instead of answering to what you knew what the real question(s) was(were) initially. Then you go on to explain things. Why be a condescending jerk and then try to help? Why not just cut out that first pedantic piece and leave in the second part. I know you are a freakin' smart guy about disk stuff because I've read a lot of posts by you that show you have tons of experience and expertise. It just didn't feel good to get berated by you like that. In the end, I appreciate the information you produced in the last half of your post, but the first half was kind of overboard. The "You can find them as easily as I can" doesn't really apply. I spent the time I had and with the last couple minutes thought I would ask here. You and I may have had different amounts of time and different amounts of experience with terminology with this. Again, I appreciate your last few paragraphs, but you come across a little overbearing sometimes.
 
I explain things in somewhat great detail not for you, but for anyone that might happen along and look over the thread. Some folks just pop in, read, think "Hey, that's a great idea, match the stripe size to the cluster size, that should really help" and of course they later discover it's seriously detrimental to the array's performance, always, in all situations.

I am overbearing, and an asshole, that's a given, but it doesn't make me wrong. When you realize this (which you already do), you're way ahead of the game... YMMV.

Consequently, I knew precisely what you meant and went to great lengths (ok, overboard, but it was necessary) because based on that post you just made you seem to still believe - at least I get the impression, that is - that setting the file system cluster size (it's not called block size, it's called cluster size, just for the record) to the same size as the stripe size (which is accurate) is again detrimental to performance, in all situations. NTFS doesn't support larger than 64KB clusters, and most if not all RAID 0 controllers out there will default to the best performance using 128KB stripe sizes.

I'm sure someplace in the 3Ware documentation there's a recommended stripe size - that's what the RAID 0 array should be set up as, and then format the array using NTFS and that's that, there's nothing left to touch, alter, modify, tweak, etc. You can spend a great deal of time trying out various combinations of stripe size/cluster size, etc, and in the long run, after wasting a ton of time setting it up, testing it, redoing it, testing it again, etc etc ad nauseum, in the long run you'll discover that the defaults across the board (meaning the stripe size on the array and the cluster size on the file system) work best with the defaults.

Unless of course the 3Ware doesn't default to a given stripe size and must be manually configured, of course.
 
jeebus some of you Yanks are touchy buggers!


Here's an ideam mystikmax. Rather than taking every syllable of a post from a bloke like Joe as a personal message to you with barely concealed ulterior motives and messages, maybe consider that the posts are composed in such a way as to benefit the many other people who will be reading them. not necessarily even members here either. Folk find info on forums such as this via google.


It's always seemed apparent to me that Joe, like myself, doesn't just respond to a single person in a forum thread but instead to the broader audience of people who could potentially benefit from the information included. Wouldn't it be more productive and less upsetting to simply glean the necessary information and then move on?


Serious comment there, by the way. Not intended, in any way whatsoever, as a criticism or attack ;)



Edit: Joe did it himself. Beat me to the explanation :D
 
As to some of your comments, I was talking about setting the stripe size on the RAID controller and then formatting the partition on my array to set the block = stripe sizes.

This is where the problem lies, right there. The array is one thing; the partitioning and the file system are something entirely different and they have nothing to do with each other, hence me giving the long explanation not once but twice.

There are two variables here:

1) Stripe size = only relevant to the RAID controller and absolutely nothing else. The file system you choose, the partitioning strategy you choose... neither has anything to do with it as the stripe size is a function of the RAID controller and nothing else.

2) File system cluster size = the logical cluster size that can be altered by the file system driver when the partition is formatted. I'm not sure where this "block" thing comes from as I've never even really heard people use the term in reference to arrays, files sytems, or even clusters... the only thing that's relevant is cluster size as far as the file system is concerned.

If you really wanna throw something in the mix, try this: the actual cluster size of data stored on all modern magnetic media hard drives aka platters is 512 bytes... ;) Then the "logical" size is what you can alter in terms of the file system and how the OS accesses the data. In reality none of that means shit to the hard drive since it reads data off it's surfaces in 512 byte segments.

Geez, too many words, too many words.

Stripe size != cluster size, and matching them is a bad idea unless you have a RAID controller that provides it's best efficiency with 4KB clusters which is still the best overall performing cluster size for NTFS.

Bleh.
 
Joe you are smart d00d and I agree with most things you have to say, but I dont agree at all.

It is not detrimental to set your NTFS cluster size to your stripe size. In fact its reccomended.

The most important factor for performance though is to make sure your partition is aligned properly so that it correlates to the stripe size you have chosen.
Followed by the Cluster size correlating to the stripe size.

IE. your partition offset when divided by the Stripe size should equal an Integer. So a 32kb offset with a 64kb stripe is would be equal to .5.....that is not an intger and is misaligned.
With win7 it will use a default offset of 1024kb unless otherwise specified and if he uses a 16kb stripe that would equal 64 which is a integer and would be properly aligned.

Then you want to do the same with stripe to file allocation size. So a 16kb stripe with a 16kb allocation size is equal to 1.

And if you set it smaller than the stripe you will then not always be getting full stripe read/writes.
For instance if you have a 128kb stripe and are reading/writing 64kb it will not hit all your disks and performance will not be as high as it could be.
 
Last edited:
@Joe and Nitrobass:
So I would imagine that the stripe size value really depends on what kinds of applications and data you are working on/with. The only thing I care a lot about performance on is Photoshop using large files.

Sorry if I overreacted to Joe here...Just some people can explain things in a friendly way and others struggle with it. I wasn't offended or mad @you Joe, just sayin from one guy to another that ya might get more people to really listen to you if you cut back on the caustic commentary. We live in a world of information flying by us at 1000mph and sometimes we do get wrong information but are willing to listen when someone has the heart of a teacher to go along with the depth of their intellect. I'm listening and learning from both Joe and Nitro here and learning. Hopefully I don't come across as a jerk for how I speak here.

Thanks again to both Joe and Nitrobass for the info. I installed last night and the system flies. As smooth as my vista x64 was, W7 x64 just feels a bit lighter weight.
 
It's not like I worry what people think of me... Skin's a bit thicker on such overbearing assholes... if it wasn't I wouldn't be an overbearing asshole, now would I? :D

The only time messing around with cluster sizes - and I'm not talking about stripe sizes, nor RAID arrays at this precise moment, I'm speaking only of the cluster size on a file system - has been proven to have a serious effect on system performance is specifically with video editing and hard drives used for such purposes.

On those machines, video editing workstations basically, it has been proven that using a very large cluster size, typically the 64KB maximum cluster size that NTFS supports, does make a noticeable difference in read and to some degree write performance when performing their duties, which is typically reading in huge streams of data recorded to those drives, aka videos.

Because there's really no concern for "slack" or wasted cluster space (putting a 1KB file in a 64KB cluster wastes 63KB of space, etc), and because we're talking about files that are multiple gigabytes in size, sometimes hundreds of gigabytes, that 64KB cluster size basically uses every potential byte of the cluster and nothing gets wasted. Now, that doesn't necessarily translate to higher performance but, because the file system can access so much in one read that's where the benefits come from and primarily from video files being written straight to the hardware in contiguous sectors.

Photoshop files can get rather large, yes, most definitely, and I've worked with some 500MB+ TIFFs in the past when building workstations for photo service bureaus. But realistically in such situations, where the need for extreme high performance comes in, those workstations for the service bureaus didn't necessarily have fast hard drives; what they had was tons and tons of RAM, sometimes 16GB of it, and 8GB or more was assigned to use as a RAMdisk and the Photoshop "scratch file" sat on that RAMdisk - talk about fast. Whereas high end hard drives max at about 120MB/s for sustained reads, and SSDs at about 225MB/s, even when you take a few of them and create a RAID 0 array, you're still slow compared to the typical RAMdisk sustained reads of 5GB/s or more - and yes that's 5 gigabytes per second or even higher depending on the RAM and the CPU. ;)

Even on today's high end hardware, with the fastest i7 processors and the fastest SSDs you can buy, they simply stand still next to what you can accomplish with a RAMdisk. Those 500MB+ TIFF files would take a few seconds to open on even the fastest SSD hardware, but opening them from a RAMdisk? Before you let go of the mouse button after you double click and it's open... that fast, or faster...

If you're serious about Photoshop work, max out the RAM in that machine, get as much as the hardware supports (typically 8GB these days on Core 2 Duo boxen, maybe 16GB if you're lucky and have a great mobo; i7 hardware can sometimes max out at 24GB) and get yourself a RAMdisk and set aside at least half the physical RAM for it, maybe more. The system performance will be dozens of times faster using such a storage medium compared to anything that can be done with RAID (even using SSD hardware).

No worries, as long as you're up and running, that's what counts. :D
 
If your filesystem clusters aren't matched with your RAID array clusters, your disks will need to perform more logical reads than necessary. (granted, hard drive silicon is much more complex than it used to be... and the ideas of sectors are very much abstracted compared to the way drives used to be...)

I'm much more familiar with this in server environments. I have seen very large impacts from reconfiguring SQL servers that were were setup by inexperienced sys admins who did not align the logical/physical disks correctly.

Also, as a side-note, SQL Servers almost always use 64KB stripes/clusters since 1 page of data happens to be 8KB and pages are stored in 8-page blocks called "Extents." This makes performance particularly bad if your disks are not aligned properly: i.e., when your SQL server goes to retrieve a random row of data, it pulls the entire 64KB Extent which will require exactly one logical read I/O operation and one physical I/O operation when your disks are aligned. If they are not aligned, you must perform double the disk I/O operations, but you have not put any additional information into your buffer cache so it's wasted I/O...

http://msdn.microsoft.com/en-us/library/dd758814.aspx
http://msdn.microsoft.com/en-us/library/ms190969(SQL.90).aspx

From MSDN:



Now, it's possible that all these benefits are completely, 100% irrelevant for desktop use. Or it may be that doubling the physical I/O cost of a read does not have any real-world performance implications in most circumstances (or at least in benchmarking situations).

But you can't dismiss the fact that misaligned physical/logical disks will cause your hard drives to perform additional, unnecessary work.

The only question is, will this additional work be noticed by the average home computer user? Will performance benchmarks be able to record the impact of this additional work from misaligned disks?

Also, Server 2008 automatically aligns your disks for 99% of all configurations. It's possible that Windows 7 (or even Vista) does the same.
 
If your filesystem clusters aren't matched with your RAID array clusters, your disks will need to perform more logical reads than necessary. (granted, hard drive silicon is much more complex than it used to be... and the ideas of sectors are very much abstracted compared to the way drives used to be...)

I'm much more familiar with this in server environments. I have seen very large impacts from reconfiguring SQL servers that were were setup by inexperienced sys admins who did not align the logical/physical disks correctly.

Also, as a side-note, SQL Servers almost always use 64KB stripes/clusters since 1 page of data happens to be 8KB and pages are stored in 8-page blocks called "Extents." This makes performance particularly bad if your disks are not aligned properly: i.e., when your SQL server goes to retrieve a random row of data, it pulls the entire 64KB Extent which will require exactly one logical read I/O operation and one physical I/O operation when your disks are aligned. If they are not aligned, you must perform double the disk I/O operations, but you have not put any additional information into your buffer cache so it's wasted I/O...

http://msdn.microsoft.com/en-us/library/dd758814.aspx
http://msdn.microsoft.com/en-us/library/ms190969(SQL.90).aspx

From MSDN:
http://img190.imageshack.us/img190/1973/dd758814image002enus.jpg[/MG][URL]


Now, it's possible that all these benefits are completely, 100% irrelevant for desktop use. Or it may be that doubling the physical I/O cost of a read does not have any real-world performance implications in most circumstances (or at least in benchmarking situations).

But you can't dismiss the fact that misaligned physical/logical disks will cause your hard drives to perform additional, unnecessary work.

The only question is, will this additional work be noticed by the average home computer user? Will performance benchmarks be able to record the impact of this additional work from misaligned disks?

Also, Server 2008 automatically aligns your disks for 99% of all configurations. It's possible that Windows 7 (or even Vista) does the same.[/QUOTE]


Exactly^^^^^
I was trying to find that article, I read that a couple months ago.

Yea server2008R2 and Win7 use a 1024kb offset by default....and for 99% of all setups that works.
I dont remember what Vista, 2008 use but I do remember that I had to manually do for a couple of setups i had.

Whether or not the real-world performance is there/"can I notice the differece" there is something to be said for getting the same result with half as much workload. So in theory you should get better performance.

Now whethere it truly translates to a better experience is debatable.)

O yea RamDisk are Kickass
 
It's not hard to test this stuff - go grab IOmeter and try out a few configs and let us know your findings.
 
@Joe:
My box is a q6600 (@3.2) with 8GB of RAM and I use 64-bit photoshop. What would you recommend for ramdisk size? 2GB? 3GB? Does it do any good to have the windows page file on ramdisk as well? I've always left this completely alone starting with vista but I haven't played with ramdisks enough to know if they change the game in that regard.
 
@Joe:
My box is a q6600 (@3.2) with 8GB of RAM and I use 64-bit photoshop. What would you recommend for ramdisk size? 2GB? 3GB? Does it do any good to have the windows page file on ramdisk as well? I've always left this completely alone starting with vista but I haven't played with ramdisks enough to know if they change the game in that regard.

Whats the typical file size you use in PS? I would kind of base it off that.
You might just try 2gb at first, and if you need more then just bump it up.

I used to put my pagefile on RAM but I had 22gb to play with. Im not sure it would be worth it to use it for paging, because you mihgt get better use out of designating scratch space for PS.
 
Depending on what other aspects I might use the machine for, with 8GB I'd set aside 6GB for a RAMdisk, and have done so in the past without issues. SuperSpeed.com finally released a Vista and now Windows 7 compatible version of RamDisk Plus, so that's a big boon to folks wishing to get that last potential bit of extreme performance off their boxen.

Since you can load/unload the RAMdisk at will (meaning create it, remove it, etc) without requiring a reboot (at least with RamDisk Plus) as easily as swapping an optical disc, I'd say use it when required then remove it when you're done. It's just going to help when you need it and not get in the way when you don't with that methodology.

In this day and age, moving a page file to a RAMdisk may enhance performance to some degree, but the biggest benefit - if you're a serious Photoshop user - is going to come from moving the scratch file to the RAMdisk first and foremost, and then assigning all the Windows TEMP/TMP variables there as well with one specific caveat:

If you do assign the TEMP/TMP variables using the environment variables in Windows itself, and you decide to remove the RAMdisk, you need to remember to redo the TEMP/TMP variable destinations... if you don't, things will most certainly go wonky on you as the OS won't know where to create temporary files which are created constantly. You'll end up getting a shitload of errors every time one needs to be created, so... it's just something to keep in mind.

For Photoshop exclusively, regardless of the amount of system RAM, using some of that RAM for a RAMdisk and putting the scratch file there will improve performance dramatically just by itself, with nothing else really needing to be done. Photoshop might be a total RAM hog, but it still can't manage gigs of RAM by itself properly. So using a RAMdisk picks up the considerable slack in that sense...
 
Back
Top