USB flash valid option for L2?

FAQ, getting help, user experience about PrimoCache
Post Reply
EricL
Level 3
Level 3
Posts: 12
Joined: Mon Jul 29, 2013 11:08 am

USB flash valid option for L2?

Post by EricL »

Of course, SSD or hidden memory are obvious choices for L2 cache, however I was wondering about the viability of USB flash drives. They often have good random read speeds, but their random write tends to be much slower. Does PrimoCache maintain a buffer for transfer to L2 cache to accommodate slower writes? Does it batch small random writes into larger sequential writes when sending to L2?
BikeHelmet
Level 4
Level 4
Posts: 20
Joined: Thu Apr 14, 2011 10:33 am

Re: USB flash valid option for L2?

Post by BikeHelmet »

I don't know for certain for L2, but it does for deferred writes, so I don't see why it wouldn't for L2. It makes a world of difference on those old netbooks with 16GB flash SSDs. (avg 10-20MB/sec - slower than a USB flashdrive.)

Try it and report back with your findings?
EricL
Level 3
Level 3
Posts: 12
Joined: Mon Jul 29, 2013 11:08 am

Re: USB flash valid option for L2?

Post by EricL »

Unfortunately, my findings weren't very good. Initial load into a USB drive is painfully slow as it holds up the entire cache while it writes to the drive. Once committed to the L2, things got better, but read speeds on USB just aren't sufficient to make the cache work well.

I used Planetside 2 as a load test, since I've always experienced hefty load times with it. I rebooted and relaunched it several times to let the cache heat up and to be sure that the majority would be stored in L2. I didn't benchmark the amount of time it took for the first load into L2, but it was painfully slow. After ensuring the cache was sufficiently hot (90% hit rate average with a peak at 99%), I did some tests. With the cache, it took 2 minutes and 20 seconds from double-click to full launch. Then, I rebooted and paused the cache. Without caching, it took 1 minute and 20 seconds. This was with a typical USB 2.0 flash drive.

I suspect that the L2 storage that's being done does not play well to the advantages of a USB flash drive. They are usually better than a hard drive at random reads of small blocks, but worse than a hard drive at large sequential reads. I suspect that the L2 is storing both large sequential and small random reads, causing the USB bus to be a bottleneck. I would suggest a special L2 cache mode for USB flash drives that only stores requests for individual blocks, and allows large sequential requests to go direct to the drive.
Post Reply