Making use of textures

Suggestions around PrimoCache
Post Reply
Posts: 1
Joined: Wed Nov 30, 2016 10:03 pm

Making use of textures

Post by DelmarKane »

So I have been a major proponent of Primocache for a while. Being a gamer, I get to see how much of a difference Primocache can make on many aspects of a game. Sometimes, it is not much, others, the difference is night and day.

Being that many games make use of streaming textures and VRAM is at a premium with many of these games, is there a way that we can have Primocache keep these textures and serve them to the GPU, faster than streaming them from disk? For games that load an asset from disk, Primocache is perfect. Though for games that stream the textures directly, it seems to be hit or miss.

To be honest, most games I get a 70-90% hit rate on Primocache but games that stream the textures, don't seem to benefit.

Perhaps a way to dedicate a specific cache to the GPU/shader/texture memory, to allow it to pull assets from there as opposed to streaming them from disk? I know just enough of hardware to know that VRAM is orders of magnitude faster than RAM, but that is still faster than disk.

If not that, then perhaps allow Primocache to look at what the GPU is using as far as files and let Primocache store it for streaming, rather than dumping it?

Posts: 365
Joined: Wed Oct 06, 2010 11:10 pm

Re: Making use of textures

Post by InquiringMind »

Welcome to the forums DelmarKane,

An interesting idea but one which seems very difficult to handle in the way you suggest - GPU monitoring would likely require separate implementations for current cards (Nvidia, AMD, Intel) and you still have to read texture data from disk in the first place - if a system is short of VRAM to hold textures in their entireity, it is likely short of standard RAM also.

Another approach could be to find the file(s) used to store those textures and link them (using Link Shell Extension or similar) to a copy held on ramdisk. You'd have to allocate enough RAM to store the entire files (and this may mean having to create a separate Ramdisk for each game, then mount/unmount as you play) but they'd then always be available at RAM access speed.

Posts: 2
Joined: Thu Mar 16, 2017 12:24 pm

Re: Making use of textures

Post by phileas »

What games where you testing? I've just tested Rage and got a %87.45 cache hit rate.

User avatar
Posts: 483
Joined: Sat Jan 25, 2014 1:11 am

Re: Making use of textures

Post by Jaga »

You can also just copy the folder(s) you want Primo to cache to another drive temporarily, then delete the new copy. That is usually enough to force the contents into the read cache.

Posts: 2
Joined: Sun Dec 10, 2017 5:08 pm

Re: Making use of textures

Post by primouser »

I observe similar behaviour. I bought PrimoCache maily to speed up loading for the games I play. In some games I see a very good cache hit rate and others there is a lot of cache missed. What makes me wonder since PrimoCache block cache should be at the lowest layer of disk access stack. I wonder if some game engines do obfuscate their data so that PrimoCache thinks it does one have them in its L1 cache (RAM).

So my observation so far on two games. Both big open world games, different game engines.
Fallout 4 - about 97% cache hit.
GTA 5 - about 16% cache hit.

I use prefetch for both so cache data were saved and reloded across PC reboots.

For GTA 5 I have fresh statistics.
Total Read 96.85GB
Cached Read 15.57GB (16.1%)
L2Storage Read 0 (0.0%)
L2Storage Write 0
Total Write (Req) 1.79GB
Total Write (Done) 1.79GB (100.0%)
Urgent/Normal 0 / 0
Deferred Blocks 0 (0.0%)
Trimmed Blocks 0
Prefetch Done (9.94GB / 9.94GB)
Free Cache (L1/L2) 32.00MB / 0
Cache Hit Rate 16.08%

For Fallout 4 I have some old statistics, but should be comparable:
Total Read 41.35GB
Cached Read 39.46GB (95.4%)
L2Storage Read 0 (0.0%)
L2Storage Write 0
Total Write (Req) 680.5KB
Total Write (Done) 680.5KB (100.0%)
Urgent/Normal 0 / 0
Deferred Blocks 0 (0.0%)
Trimmed Blocks 0
Prefetch Done (7.49GB / 7.52GB)
Free Cache (L1/L2) 536.00MB / 0
Cache Hit Rate 95.44%

I hope PrimoCache development team could investigate this and improve cache hit rate for new games.

Also, I was wondering if these new games maybe use some DMA or RDMA to bypass OS disk access, but these features are reserved to professional graphic cards, like Tesla or Quadro. Regular nVidia cards cannot use them.

Post Reply