Cache warmup for R4K with ReadyBoost..? Research reqd.

Suggestions around PrimoCache
Post Reply
Logic
Level 5
Level 5
Posts: 47
Joined: Mon Oct 29, 2018 2:12 pm

Cache warmup for R4K with ReadyBoost..? Research reqd.

Post by Logic »

Been thinking (dangerous I know! :) )

QD1 R4K is what drives are slowest at and what the CPU wants 68% of the time.
vs 1% for large sequential...!!!
https://www.thessdreview.com/ssd-guides ... ers-bluff/

Good old windows ReadyBoost will read all the recently/frequently used R4K from the base drive to write it to NOT ONLY a USB flash drive but any drive it deems faster enough (at R4K) than the drive to be cached.
ie: You can use anything from a flash drive to a RAMdisk as a cache, as long as it has a drive letter.

ReadyBoost is NOT limited to 4GB; that's a limitation of the FAT32 File System. It's limited to 32GB per drive, with a limit of 8 drives.
ie: You can use 8X 32GB caches/drives for a total of 256GB cached.

So; one could enable ReadyBoost on a temporary RAMdrive, another on your GPUs DRAM, and a 3rd etc on various flash drives and PrimoC would 'learn' from the main drive read while RB is writing to the caches...

System reboots reqd to get RB to read your main drive (a short time after boot)
Or let everything boot fully and wait for the main drive to calm down, then enable RB.
PrimoC must be running to 'learn' what's being read.
Windows needs to be installed on HDD/s for RB to work..! (there is a reg hack)

This is the data you want in the L1 cache = Random Access Memory, addressed in 4KB blocks...

Untested:
I am currently using eBoostr caching to 58GB Optane 800P.
It's nice to be able to exclude files and directories based on name, extension, size etc.
AND to be able to drag/drop a desktop shortcut to be cached,
rebuild the cache (all of 5 seconds for me) and have instant app, game, etc acceleration.
Hit rate's @ 68% and I dont want to delete the cache.
eBoostr was kind enough to give me a free key.

I can test the effect on eBoostr! :)
I'm sure someone here might give this a whirl on PrimoC and post some numbers..?

If your flash drive isn't qualifying for RB:
RB also requires 512KB writes at 2.5MB/s IIRC.
Some drive just can't do it, but a write cache can.
And it and coalesces writes into larger erase block/page sized writes, written at speeds closer to the large sequential numbers of the drive... leaving more time for pure reads....

Windblows only pretends to enable write caching on anything besides a NTFS formatted partition.
ie: Enable Write Caching on this device ONLY works on NTFS. On exFAT etc its a lie.
Most drives are exfat and the factory aligned partition AND FS is best left alone.

The Fixes:
USB-WriteCache V0.2
https://www.uwe-sieber.de/drivetools_e.html
(Make Microsoft honest! :D )

Just below, under
MaximumTransferLength since Windows 7 SP1
see
USBSTOR Maximum Transfer Length Tool
(Puts more letter/data in each addressed envelope/packet decreasing overhead)
Matching packet size to a NAND erase block or 2 will amaze you
unless
you have one of the newer USB 3 drives with a clever ctlr (SLC caching, UASP, etc) and things get confusing requiring real world testing to get at the truth.

MTL should match the average file size you want to write to the drive.
ie: 2MB for movies - 64kb for ReadyBoost reads (not writes...) , running an OS, apps etc.
512KB, as used by UASP is a good, erase block sized, (usually...) middleground.
(I'm particlarly proud of USBSTOR MTL Tool as Uwe wrote it on my suggestion)

Uwe Sieber is the guy who wrote USB drivers for Win 98 and such, but as always, If anyone tries this; do check these/any downloads on VirusTotal.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Cache warmup for R4K with ReadyBoost..? Research reqd.

Post by Support »

When ReadyBoost was launched, there was no SSDs, only USB flash drives. Since flash drives have faster random 4K speeds but slower sequential reads and writes compared with HDDs, ReadyBoost only caches small files. However, SSD and RAM capacity are large now, and the sequential read and write speed is far faster than HDD, so there is also a need to cache large files. Of course, when the cache capacity is small, only caching small files is a good caching strategy.
minhgi
Level 10
Level 10
Posts: 256
Joined: Tue May 17, 2011 3:52 pm

Re: Cache warmup for R4K with ReadyBoost..? Research reqd.

Post by minhgi »

Literally, I have been using Readyboost with Primocache since the beginning. Just remember that Readyboost/Sysmain is file caching mechanic, have priority over Primocache, vs block caching. It complement each other for precaching or warming up Primocache (on new cache). Just assign 32GB to Readyboost. Don't let other get confused you by saying cache is not persistent. It is on hybrid shutdown and hibernation. Full reboot will clear the Readyboost cache and can be re-populate rapidly from PrimoCache L2 cache.
Post Reply