Vista features a caching technology called Readyboost, where, small files which take the hard disk drive a lot of time to read, are cached in a USB flash drive since USB flash drives have a far faster seek-time compared to Hard disk drives - yes, even Raptors.
There is a lot of talk on Readyboost on the web, but the details are lacking. After googling a bit, here's my take:
1) FAT or FAT32 or NTFS?
Though FAT and FAT32 use less CPU overhead, I thought that FAT would be fastest. Turns out to be not so... I guess it's because today's CPUs are so fast that the CPU overhead is nothing at all. Here're some experimenter data:
Test run #1 (without thumbdrive):
* Average boot time: 1:10m ~ 70s
Test run #2 (FAT32 formatted, 1840MB ReadyBoost swap file):
* Average boot time: 1:13m ~ 73s
Test run #3 (NTFS formatted, 1840MB ReadyBoost swap file):
* Average boot time: 1:05m ~ 65s
2) Format the USB drive at what sector or cluster size?
This is simple. If you have tons of small files, cluster size is an issue, since the smallest files which can be generated and stored is the size of the cluster. So if you have a 4KB cluster size, a 1KB file in fact would still take 4KB. Since Vista uses ONE HUGE FILE, just the default cluster size would be fine. Or any cluster size would be fine. The one detail I haven't worked out is `whether USB drives have a native cluster size'. Anybody can tell me this? I'd be grateful.
3) Which USB flash drive works?
I used the Imation Thumbdrive Micro 1GB, and it worked like a charm.
Discussion thread here, almost everything covered!
7 comments:
(1) FAT or FAT32 or NTFS?
Though FAT and FAT32 use less CPU overhead, I thought that FAT would be fastest. Turns out to be not so... I guess it's because today's CPUs are so fast that the CPU overhead is nothing at all.
The issue with slow disk read/write is always with the I/O wait and not the CPU processing time. We need to understand the memory hierarchy. Right at the top is our registers, followed by L1, L2, caches, then RAM, then... then hard disk. At each level the slowdown can be measured at 100-2000 clock cycles. In order to resolve this, caches are used so that the CPU do not need to wait for the memory, be it RAM or hard disk, to be ready for read/write operation. A read or write operation to the disk may require 1000 cycles, inclusive of the overheads, but this is nothing, nothing compared to the waits: (1) IRQ/DMA for sending the control signals from the CPU to the disk controller; (2) actuator arm to seek to the correct physical address; (3) read or write; (4) IRQ/DMA for data signals back to the main memory, which would take a time of around 10,000 clock cycles. If the data is found in the cache, then several I/O waits will be saved.
Skeptics are advised to refer to the rated memory timings for more information: Average disk accesses (seek, etc) are always in millisecond; instructions are executed in nanoseconds.
2) Format the USB drive at what sector or cluster size?
This is simple. If you have tons of small files, cluster size is an issue, since the smallest files which can be generated and stored is the size of the cluster. So if you have a 4KB cluster size, a 1KB file in fact would still take 4KB. Since Vista uses ONE HUGE FILE, just the default cluster size would be fine. Or any cluster size would be fine. The one detail I haven't worked out is `whether USB drives have a native cluster size'. Anybody can tell me this? I'd be grateful.
Small logical storage units (i.e. cluster sizes) will save you space as less overhead is incurred / more efficiency, but this comes at a cost. There is a "map" / index in all filesystem to record the logical units occupied by a file. The smaller the units the more checks to the index is required, and more "jumps" across the disk is needed. If there are fragmentation, then the situation is very much worsen. There is no hard and fast rule for setting the cluster size. I would believe Microsoft has done enough studies to find an optimal size as the default for their users to use.
The point I was trying to make on the NTFS, FAT and FAT32 was regarding the formatting of the USB drive - that if the Readyboost USB drive were formatted as NTFS, it would be faster than one formatted with FAT as claimed by the quoted post.
And regarding cluster sizes, the point I was trying to make was that since it was one big file, the space efficiency issue was a non-issue, and the only issue remains which cluster size is most efficient for a thumbdrive of a certain size. And there is no seek issue for flash memory, almost all the same wherever the data is on the NAND flash.
I have a couple of USB drives that I use with Win98 and WinXP. Both the drives are, or appear to be formatted as FAT, not FAT32. I have a Verbatim 4GB drive that has a cluster size of 64K. Interestingly, it has a secure partitioning application which when used to split the drive exactly in half, each 2GB partition has a cluster size of 32K.
On NTFS, not particularly for this application but NTFS has different versions...
If you format NTFS under Windows Vista a Windows NT/2000 computer WILL NOT access it...
Also, no hardware has a "native" cluster size. Your OS defaults to a middle of the road size.
You can see an effect of this if you partition off a small piece of your HD just for the paging file, and set the cluster size as large as possible.
Is anybody actually reading the first post?!
Comments about using USB drives in Win98/XP/etc. are totally irrelevant to this discussion as those OS do not have Readyboost, which this thread is discussing.
The inability of different OS' to read a USB/flash drive formatted with NTFS by Vista is also irrelevant for the exact same reason.
This only pertains to Windows VISTA, and with specific and exclusive reference to using a USB/flash drive for Readyboost ONLY.
To my mind there are two specific issues which need focus:
1) How the cluster size affects performance/life-span of flash media under Readyboost.
2) Which file system offers the best performance without killing the media.
So look at the question again and comment. I, for one, am curious to know how to get the best performance:life-span ratio out of my 4GB Gizmo Jnr, which is DEDICATED TO READYBOOST UNDER VISTA x64.
Phew! ;-)
I agree, this is only relevant to Windows Vista. I have a 4GB Memory Card which I bought for ready boost. Initially it was too slow for readyboost (Heh, Sony Laptop, reader, and card, you would expect more).
But after reading that the pagefile stored on the card is encrypted and compressed (Security I know but must be a bit of a performance hit!). So I tried compressing the filesystem on the card and it was the fast enough.
It seems logical to me that if you increase the allocation size, then you can read it faster, as this reduces the need to lookup as many block locations for a file. But more than one file cannot be placed within one block, so if you had 64kb block and lots of 1kb files, you would waste 63kb per file disk space. As someone else said, the default allocation size of 4kb gives the best performance / disk usage for the average user.
So back to readyboost, here it is one file, so I guess the largest block allocation would perform the best.
you guys make my balls ache. and it's not because i just shaved them bald and shiny either.
Post a Comment