logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>
[What is ReadyBoost / ReadyDrive ?] [So what's SuperFetch ?] [How does ReadyBoost help Superfetch ?] [Does any of this make a real speed difference ?] [Using USB sticks for Virtual Memory] [Issues] [Using ReadyBoost] [Why make your USB device 'fixed' ?] [Why make your USB device 'removable' ?] [Checking ReadyBoost performance ?] [Why are my SSD random read/write times so slow ?]

What is ReadyBoost / ReadyDrive ?

ReadyDrive is a USB memory stick used to hold copies of Windows System files. This speeds the boot process as system files on a ReadyDrive can be fetched at the same time as others are being fetched from the hard disk.

ReadyBoost is the use of additional storage devices (usually, USB Memory sticks) with SuperFetch

Only USB 3 thumbdrives and ports are fast enough to actually make much difference

[top]

So what's SuperFetch ?

Introduced with Vista, SuperFetch is a system process that monitors all disk i/o. This lets it 'learn' how you use your system - specifically, what data blocks (applications) you commonly read from the hard disk. It then 'makes use of' your 'spare' system RAM by 'pre-loading' some of this data before you actually need it (by launching the application)

This can 'work' when you make use of todays bloated applications to read or send emails and browse the web.
 
It is, however, a disaster waiting to happen for those using image and video edit packages. Image and video edit uses huge amounts of RAM of data. When you 'open' an image or video, if the RAM is full of 'un asked for' data, you may end up using Virtual Memeory instead.

[top]

How does ReadyBoost help Superfetch ?

Just like ReadyDrive, ReadyBoost allows components to be fetched from the USB device at the same time as others are fetched from the hard disk.

A random collection of small files can be accessed over 10x faster from USB stick(s) than from your hard drive. This is because the USB memory has essentially no 'seek' delay time.
 
Further, files on USB stick(s) can be fetched simultaneously with files from the hard drive. Windows 7 and later allows up to 8 ReadyBoost thumbdrives, whihc should allow 'simultaneous' transfers of 8 data streams (although the average USB controller is typically only capable of supporting one port at a time)

[top]

Does any of this make a real speed difference ?

Typically, ReadyDrive does noticeably improve boot-up times.

SuperFetch pre-fetching generally improves Vista response speed, but only on systems with 4Gb or more of RAM.

In contrast, ReadyBoost only really makes a difference on systems with 2Gb of RAM

The reason has nothing to do with pre-fetching and everything to do with loading data faster.
 
So systems with fast hard drives see almost no improvement - and Microsoft disables ReadyBoost on SSD systems anyway

[top]

Using USB sticks for Virtual Memory

Using a 'non-removable' USB 3 thumb-drive as as 'Virtual Memory' can make a difference to systems that have only 2Gb of RAM or those with slow hard drives (5400 rpm, or, on many Laptops, 4200 rpm)

A system running Win7 (or later) in only 2Gb of RAM will make heavy use of Virtual Memory. Using the USB Memory stick for virtual memory allows Windows to 'off load' data to USB whilst fetching new data from the hard drive.
 
Note that Vista limits ReadyBoost to a single device so you will get limited 'parrallel' advantage. However Windows 7 (and later) allows up to 8 ReadyBoost devices (each up to 32Gb, so 256Gb max) to operate in parallel with the system drive.
 
Of course what you need is multiple USB 3.0 controllers. Using two (or more) 'ports' on the same controller is unlikely to deliver much improvement over a single port.

The drawback is that copying files to the USB stick(s) also takes time. Plus, it will take multiple reboots before SuperFetch 'learns' what files are best copied to the USB sticks.

In fact, the Ecache.sys device driver intercepts all reads and writes to local hard disk volumes (C: etc.).
 
This allows it to copy data being written to the hard drive onto the ReadyBoost caching files.
 
Further, if running, SuperFetch pre-populates frequently-read data into ReadyBoost cache.

32-bit version of Windows 7 are licence limited to the first 4Gb of the CPU memory space. In practice this means 32bit systems usually have access to about 3.5 GB of system memory. However, using ReadyBoost, effectively increases this by another 256 GB

Of course applications are still limited to a maximum of 2Gb, or, 4Gb for those that are /LARGEADDRESSAWARE

Note that XP allows you to use a removable USB memory stick to hold a Virtual Memory 'swap file'.

[top]

Issues

1) In versions of Vista prior to SP1, ReadyBoost failed to recognize it's cache data when the PC 'woke up' from 'sleep'. This casued it to restart the caching process, making ReadyBoost ineffective on machines undergoing frequent sleep/wake cycles. This problem was fixed in Vista SP1.

2) SuperFetch (introduced in Windows Vista), monitors the programs you use on your computer and automatically loads their application files and libraries into your computer’s memory (RAM) ahead of time. With modern multi-giga byte applications now common, this can actually slow your system down

The idea is that when (if) you launch the application, it will start faster.
 
However the disadvantage is that on small RAM systems, pre-loading unasked for data will have the effect of pushing existing data out of RAM and into 'Virtual memory' (i.e. into the hard disk 'swap' file).
 
When your currently running application needs that data, there will be a 'double delay' as the unasked for data is move to the swap file and the running app's data is fetched back from the swap file.
 
The overall result can thus actually slow down the normal operation of your system, as unwanted data is loaded, data in use unloaded, unwanted data unloaded and used data reloaded.
 
Using a USB 3.0 stick for the swap file does at least minimise this slowdown.

3) The ReadyBoost system service checks your USB device performance when you plug the device in. ReadyBoost then only uses those that meet the minimum specification :-

Capacity of at least 256 MB, with at least 64 kilobytes (KB) of free space.
 
At least a 2.5 MB/sec throughput for 4-KB random reads (which effectivly limits use to USB 3.0 devices on a USB 3.0 port)
 
At least a 1.75 MB/sec throughput for 1-MB random writes.
 
As usual, the morons at Microsoft have it wrong. What they SHOULD be doing is comparing each USB device performance against your existing system speed (hard drives, other USB devices etc). Windows could then 'rate' the device (and thus guide the user into using the fastest).
 
Further, Write speeds are largely irrelevant when it comes to holding ReadyBoost 'copies', but vital fror nVirtual memeoy use.

The above, of course, can have multiple side-effects, not lest of which is an extended 'wait' time after plugging in the device

4) Since Hard disks typically outperform flash drives during sequential reads, whilst flash drives are faster during non-sequential reads, ReadyBoost only reads from the cache for non-sequential reads.

Note: ReadyBoost files are copied, so removing the USB device has 'no effect'. However placing a swap file on a USB device that is then removed will immediatly crash the system

[top]

Using ReadyBoost

You can add a device to the ReadyBoost 'set' by right-clicking that device in Windows Explorer, clicking Properties, and then clicking the ReadyBoost tab.

The only configuration option is to set the space to be reserved for the ReadyBoost cache file, ReadyBoost.sfcache, which will be found in the root of the flash drive. The file is immediately created to the full size of the specified cache.
 
You must reserve at least 256 MB. Larger caches can improve performance, but the ReadyBoost cache cannot be greater than 4 GB on a FAT32 file system or greater than 32 GB on an NTFS file system.

All files in the cache are encrypted using 128-bit AES if the flash storage device is seen as a "Removable" type

Needless to say, this 'costs' CPU time.

USB 2.0 flash drives identify themselves to Windows with the 'RMB' (removeable media bit) flag. This bit cab be 'flipped' in the thunb drive itself using a 3rd party utility (such as Lexar's USB format tool 'BootIt v1.07' which works on thumb drive controllers from Lexar, HP, Verbatim, Netac)

USB 3.0 drives 'certified' for Windows 8 identify themselves as 'fixed'. Others don't and the 'simple' bit flip (apparently) doesn't work.

On 32 bit systems, you can install a 'filter driver' that will sit between the USB and Windows. The danger is that a 'badly behaved' driver will effect access to all yoir hard drives and may result in a totally non-bootable system !
 
On XP and Vista (& above ?), 'diskmod.sys' has been known to work (use at you own risk, Win 7 32 users report total loss of all USB devices or even of all hard drives - so totally unbootable system - so it likely only works with some manufacturers USB hub's)
 
The alternative is to 'hack' Windwows own USBDISK.SYS driuver (so the 'rmb' bit is ignored)
 
None of the above will 'work' i a 64bit system, even if you defeat the digital signing 'signature', because the 'filter driver' is intrinsically 32bit

[top]

Why make your USB device 'fixed' ?

Windows Vista and later won't allow you to use a removable device to host a Virtual Memoory paging file. No version will show or allow multiple partitions on a removable drive (if you create multiple partitions eg. using Linux etc. Windows only shows the first partition = a real pain to Raspberry Pi users)

To make multiple Windows partitions on your removable USB stick, use the FREE version of "EASEUS Partition Master 8.0.1 Home Edition". Windows will still only show the first partition, of course.
 
NB. finding the 'free to use', rather than 'free to download (pay to use)' versions on EASEUS web site is a total nightmare, so you might have to look to software 'repositories' for this = but watch oit, many will try to infect you system with 'adware' by using a 'custom downloader' or an install 'stub' or 'wrapper' around the wanted software !

On Windwos XP, removable drives can only be formatted as FAT32 (or exFat), not NTFS

If you plug-in a USB stick that has been formatted to NTFS by some other system, XP will  

[top]

Why make your USB device 'removable' ?

Only removable drives have an 'eject' option. Eject makes sure all data waiting in the 'queue' is written - and the directory updated. It also makes sure no files are 'in use' or 'being held open' (which could indicate they are being updated eg by MS Word and changes have not yet been saved) - before the 'OK to remove' message appears. With fixed driver all you can do is pull it out and hope nothing - sych as the directory - gets corripted

One way to minimise the likelihood of file corruption is, in the Properties, Hardware (highlight the USB drive), Properties, Policies tab, disable 'Enable write caching on the disk' setting for that drive.

The ReadyBoost cache stores a copy of the files, so the flash drive can be "removed at any time"

Whilst the system will default to reading the original files from the hard disk, the cynical amongst you will anticipate there will be usual 10-15 seconds 'time out' whilst Windows tries to access the USB stick you just pilled out

[top]

Checking ReadyBoost performance ?

Windows has no built-in way to report actual data transfer times or otherwise give any indication of the actual speed of the USB sticks, disk drives or the overall effect of the ReadyBoost 'system'.

Various 3rd party tools - such as Crystal DiskMark6_0_0.exe allow you to test data transfer times. The most significant, for ReadyBoost use, are the '4KiB' times.
 
If you intend to the USB stick as Virtual Memeory, both Read and Write times are significant

You can monitor ReadyBoost operation using the System Tools\Performance\Monitoring Tools\Performance Monitor tool in the Computer Management console

Open PerfMon and add the 'ReadyBoost Cache counters'.
 
These 'counters' only monitor how much of the cache is currently being used and when the cache is read from or written to.

[top]

Why are my SSD random read/write times so slow ?

Most SSD's have a RAM buffer built in. This speeds up 'sequential' operation - especially sequential write. This is why CrystalMark 'defaults' to a 1Gb test - it's the only way to overcome the effects of the buffer. Even so, sequential reads can be 10sx faster than writes. Write operations, be they sequential or random, always take longer than reads on an SSD.

Of course the Windows file system also 'gets in the way' - reading or writing 1GB in 4k lumps will involve a LOT more Windows system operations than a singel 1Gb sequential read or write
 
Typically, SSD sequential reads are 4 times faster than hard drive. Random 4k reads will be about 20x faster on an SSD, whilst writes are 'only' 10s faster on the SSD.


(-) Comparison of drive speeds


Photo: ../Your_PC_and_Security/photos/RAM-disk-speeds.gifPhoto: ../Your_PC_and_Security/photos/SSD-disk-speeds.gif
Left: RAM disk (NTFS)

Right: SATA II SSD disk (NTFS)

As is expected, a RAM disk blows away eveything. On a 32bit system with 4Gb of RAM, it is well worth recovering the 700Mb or so of RAM that has been 'mapped out' (and replaced by i/o addresses). This RAM, which your Microsoft Licence limit denies to the Operating System, can be accessed by 3rd party RAM Disk drivers and used as Virtual Memory to speed up your system.

Photo: ../Your_PC_and_Security/photos/Dell-Optiplex-7010-std-system-hard-drive_speed.gifPhoto: ../Your_PC_and_Security/photos/old-Sony-M2-2gb-generic-usb2.gif
Left: Dell Optiplex 7010 500Mb system hard disk (NTFS)

Right: Obsolete Sony M2 memory card (FAT) in a generic USB2.0 card reader

Note how even the most ancient M2 memory card is faster than a modern hard drive on random Reads. Of course it will never 'qualify' for ReadyBoost due to it's appalling basic Write times

Photo: ../Your_PC_and_Security/photos/2Tb-disk-drive_speed.gifPhoto: ../Your_PC_and_Security/photos/RAID-pair-drive_speed.gif
Left: Generic SATA II 2Tb hard drive (NTFS)

Right: Pair of generic SATA II hard drives configured as software RAID Mirror (NTFS)

Note that the RAID mirror (right) delivers significantly faster Read performance, especially random 4k reads, but slightly slower (sequential) Write, as would be expected. One surprise is the faster random 4k writes, for which I have no explanation.

Photo: ../Your_PC_and_Security/photos/Hard-disk1-speeds.gifPhoto: ../Your_PC_and_Security/photos/Hard-disk2-speeds.gif
Typical hard drives (NTFS)

The right-hand speeds shows what happens when the logical and physical 4k sectors are 'misaligned'.

Reads are not much effected - drives typically 'read' a complete track into their internal cache RAM no matter what sector is requested. However if the physical and logical 4k sector boundaries are miss-aligned, each write requires that two sectors be modified for each 4k write - so each one sector 4k write becomes a 2 sector read, modify, write cycle.

Photo: ../Your_PC_and_Security/photos/USB2-0_32Gb-SDHC-Class10-FAT32-speeds.gifPhoto: ../Your_PC_and_Security/photos/USB2-0_32Gb-SDHC-Class10-exFAT-speeds.gif
Generic USB 2.0 card adapter with Integral SDHC U1  (Class 10) 32Gb SDHC card. Left is FAT32, right is exFAT.

What's interesting here is the random Read times are significantly faster than hard drives. This means that even a USB 2 device with ReadyDrive / ReadyBoost should improve boot-up / system operations. On the other hand, Write times are slower, so there would be no point in using a USB 2 thumbdrive for Virtual Memory.

Photo: ../Your_PC_and_Security/photos/USB2-0_Integral-32Gb-usb3-speeds-FAT32.gifPhoto: ../Your_PC_and_Security/photos/Integral-USB3-0-32Gb-FAT32.gif
Integral 32Gb USB3 thumb drive (FAT32, removable)

Left: plugged into a USB 2.0 socket

Right: plugged into a USB 3.0 socket

Note the significant difference in the Read (and sequential Write) speeds of the same device plugged into the two different USB sockets

Photo: ../Your_PC_and_Security/photos/USB2-0_Sandisk-64Gb-USB3-FAT32-speeds.gifPhoto: ../Your_PC_and_Security/photos/Sandisk-usb3-64gb-FAT32.gif
Sandisk 64Gb USB3.0 thumb-drive (FAT32, removable)

Left: plugged into a USB 2.0 socket. Right: plugged into a USB 3.0 socket

What's interesting here is that, compared to the Integral (above), the Sandisk has worse Read speeds but significantly faster random Write speeds. Of course this MAY be down to the internal organisation of the device (the Integral is likely having to erase before writing, whilst the Sandisk is newer and has mostly 'empty' blocks)

Photo: ../Your_PC_and_Security/photos/USB2-0_Cruzer-Edge-32Gb-FAT32-speeds.gif
Left: USB 2.0 Cruzer Edge 32Gb, FAT32

Photo: ../Your_PC_and_Security/photos/USB2-0_4Gb-SDHC-FAT-speeds.gifPhoto: ../Your_PC_and_Security/photos/USB2-0_32Gb-SDHC-Class10-NTFS-speeds.gif
Left: Generic 2.0 USB adapter with 4Gb SDHC class 4 card (FAT)

Right: Generic USB 2.0 card adapter with Integral SDHC U1 (Class 10) 32Gb SDHC card (NTFS)

Another example of how a 'used' card can be significantly slower than expected. Despite being 'class 10' (right) the 'used' 32Gb is much slower on random writes than a newly 'Full' formated class 4 (left) ! Interestingly, random reads on the class 10 are also slower - perhaps due to the manufactures focus on fast sequential write speeds ?


This note last modified: 10th Jul 2018 09:08.

[top]


Next page :- Going virtual - (with HyperV)

[top]