Page 1 of 1

Usb allocation size

Posted: September 21st, 2019, 9:43
by lorca
So this is situation:
- I know that default windows allocation size is 4096 bytes but I am thinking to format my sd card 32gb to 64 kilobytes. On sd card will be only movies and TV shows(file size from 350mb to 4gb). On USB stick 64gb (movies, pictures, documents) I was thinking to set it to 32 kilobytes. Is that good? They will all be in exFat format.
Apparently bigger alloaction size should speed things.

- Is it best to use quick format or normal format on new cards?

Noob question, I will try to test speed with couple of different formats, when someone recommends me 16K size that means 16384 kilobytes and 4K is 4096 kilobytes? Or 16K is 16384 bytes?

Re: Usb allocation size

Posted: September 21st, 2019, 10:21
by HaQue
lorca wrote:when someone recommends me 16K size that means 16384 kilobytes and 4K is 4096 kilobytes? Or 16K is 16384 bytes?


1K = 1024bytes, yes
4K = 4096bytes
16K is, you guessed it, 16384bytes.

are you having problems? What is the issue making yo want to do this.

Re: Usb allocation size

Posted: September 21st, 2019, 10:32
by lorca
I read that changing allocation size will speed up things. On sd card they will be only movies so my guess is that bigger the allocation size, faster the sd card. Similar for usb stick but since it will have multiple formats (documents, pictures, movies) allocation size will be 32K. So speed up is my goal.

And I read Microsoft recommendation:

https://support.microsoft.com/en-us/hel ... -and-exfat

Re: Usb allocation size

Posted: September 21st, 2019, 10:46
by Arch Stanton
That's not a recommendation it's explaining default clustersizes vs file system vs volume size.

Re: Usb allocation size

Posted: September 21st, 2019, 11:01
by lorca
I found post from my yesterday search from one guy that has seen improvements:

https://www.reddit.com/r/AskComputerSci ... _size_for/

Advice?

Re: Usb allocation size

Posted: September 21st, 2019, 11:21
by Arch Stanton
My advice is to test it yourself, easy enough. Also post referred to is about write speed and for the rest test parameters are unknown (did he wipe before testing?).

Another factor of importance is if the the reserved sectors value is chosen in a way so that FATs and data area is properly aligned. I have never actually tested, I assume exFAT will take care of that.

Re: Usb allocation size

Posted: September 21st, 2019, 15:52
by lorca
ok, I tryed Crystal disk mark test with couple of different allocation sizes. I set set size to 2GB (maybe to eliminate cache memory??).

Tested with allocation size 32k, then I quick formated usb stick and selected default option and after formating it was set to 128K (how is that default?) and for the last test I used smallest size 4096 bytes.

- Why is speed to small on 128K test? Should I set test on more passes? Now I am worried that something is not wrong with USB...
- Is there a program that can verify me the USB stick health?
- Can you give me instructions in what program (is Crystal mark the best?) to test and how?

Stick is Adata S102 pro 64GB.

Re: Usb allocation size

Posted: September 21st, 2019, 16:31
by Arch Stanton
What does it test, I have never used it? If it does not actually create files but writes data from LAB x to LBA y then clustersize is moot, right?

Re: Usb allocation size

Posted: September 22nd, 2019, 1:18
by lorca
Sorry, I don't know, I am not near your knowledge level :oops:

Re: Usb allocation size

Posted: September 22nd, 2019, 7:04
by Arch Stanton
All I'm saying is:

1. If the benchmark you used tests the drive by writing/reading from LBA 0 to last LBA on the drive then the clustersize is not relevant. You need to measure how the drive handles files vs a certain clustersize.

2. Maybe more important than the clustersize is if clusters are aligned with the let's say physical layer underneath. If clusters overlap the boundary of the smallest block that can be read/written at once then the device needs to read/write 2 of those rather than one. A FAT based volume roughly looks like: boot record - FAT area - data area. If for whatever reason the data area starts at an odd sector number I am guessing all access to the drive will be slowed down. The reserved sectors number in the boot record would allow you to 'shift' the start of the data area to an even sector address.

Re: Usb allocation size

Posted: September 22nd, 2019, 7:34
by HaQue
I have been there.. testing like crazy trying to find a way to get better performance from'X'... advice: buy better USB/SD cards. Some drives are just shit, plain and simple. look at some reviews. Some good reviews go deeper and explain what they are testing and why, then explain what parts of the drive are not performing and also why. Example, some SSD's with no RAM and some very poor controllers, versus some of the Samsung EVO's. not a lot of price difference but a much better drive

Re: Usb allocation size

Posted: September 22nd, 2019, 14:13
by lorca
Thak you all for answers. For final test (1gb test size) I decided to set it on 16K allocation (probably won't change this, my final allocation). I expected higher 4KiB values in Crystal mark, some other cheaper stick have there around 2-3mb speed.
Why on ATTO is so many speed oscilation? Mostly benchmark I see in ATTO have normal stable scale.
And why on 50mb test I get slower speed? For now I don't care about allocation I just want to verify that usb is working correctly. For example this amazon review (50mb crystal mark test) seems to have much higher speed than mine:

https://www.amazon.com/gp/customer-revi ... B00BF9HYZ4