Compressed Memory Overhead

Suggestions around PrimoCache
Post Reply
MemoryHog
Level 1
Level 1
Posts: 1
Joined: Thu Jan 23, 2020 8:03 pm

Compressed Memory Overhead

Post by MemoryHog »

Most hard drives these day are using the more efficient 4kb sector advance format, so it is obvious that if the hard drive was formatted with a 4kb allocation unit size, the ssd L2 cache block size should match that for the fastest possible operation. However, setting a 16 gig l2 cache size with 4kb block size results in a gargantuan 4 gigs of physical memory usage for memory overhead. With the advent of windows 10 using compressed memory, would it be possible to compress (and decompress on the fly) the L2 memory overhead as well?
User avatar
Support
Support Team
Support Team
Posts: 2802
Joined: Sun Dec 21, 2008 2:42 am

Re: Compressed Memory Overhead

Post by Support »

The compression/decompression way will affect the cache performance a lot. So I don't think we'll use this method. But we do work to reduce memory overhead.
Primo Ramdisk | PrimoCache
Romex Software Support
AlexAT
Level 2
Level 2
Posts: 5
Joined: Thu Jul 05, 2018 10:53 am

Re: Compressed Memory Overhead

Post by AlexAT »

There is a bunch of fast compression algorithms: LZ4, LZO, ZSTD and some others.

Actually, in Linux zram/zswap work pretty much good so idd attempting to compress L1 cache data may do some good and is not very hard to implement I think. Even if it changes L1 cache management from block to heap, won't be too much overhead compared with L2/L3 delays.

Also this may add an extra point to having L1 at all because nowadays OS cache does its job pretty much well, and so L1 is of dubious necessity.
User avatar
Jaga
Level SS
Level SS
Posts: 546
Joined: Sat Jan 25, 2014 1:11 am

Re: Compressed Memory Overhead

Post by Jaga »

AlexAT wrote:
Mon Jun 08, 2020 6:43 pm
Also this may add an extra point to having L1 at all because nowadays OS cache does its job pretty much well, and so L1 is of dubious necessity.
My .02...

Completely disagree with this statement - the Windows cache has been abysmal in my ~30 year experience (all professional IT work) with their products (back to DOS 3.x). We've had Windows for 25 years now (since W95), and it has never worked well. It doesn't hold a candle to Primocache in either capability or effectiveness.

I'm currently running a 36 GB L1 against a Samsung NVMe set as boot, and I get phenomenal hit rates with daily use (email, browsing, gaming, etc):

Image

Windows' cache could never accomplish that without a total re-write, even on a system like this with 64 GB of RAM.
RobF99
Level 5
Level 5
Posts: 57
Joined: Fri Sep 19, 2014 5:14 am

Re: Compressed Memory Overhead

Post by RobF99 »

Windows' cache could never accomplish that without a total re-write, even on a system like this with 64 GB of RAM.
I 100% agree. I have 32 Gb RAM and us 16 Gb L1 and my system is lightning fast. You see and feel everything respond much much quicker and usually instantly. If I stop primocache and just give Windows the entire 32 Gb RAM then I see quite a slowdown.

L1 is far far better than Windows caching and I have been using PC's 24/7/365 for 35 years.

I can't give PrimoCache enough praise. It is so extremely stable and more importantly it is one of the very few utilities that promises improved performance that actually gives it and it is created perfectly to do all that the user wants and needs to do to apply an SSD cache to a PC.
ReLocate
Level 1
Level 1
Posts: 1
Joined: Sun Aug 16, 2020 2:07 pm

Re: Compressed Memory Overhead

Post by ReLocate »

Support wrote:
Tue Jan 28, 2020 2:06 pm
The compression/decompression way will affect the cache performance a lot. So I don't think we'll use this method. But we do work to reduce memory overhead.
I partialy agree with you but you should consider at least makeig it optional , LZ4 has 5gb/s decompression speeds so that whoul'd be beneficial anyway since most sata ssd goes max at 500mb/sec and the cache needs to be filed first before it can be used , and from my personal linux kernel experience ( i made custom kernels for galaxy s3 ) all android devices use lz4 as cache compression

I'm not saying this whould be ideal , but it should be at least optional

Cheers and thank you for this great softeare , you guys are the greatest ;)
User avatar
Support
Support Team
Support Team
Posts: 2802
Joined: Sun Dec 21, 2008 2:42 am

Re: Compressed Memory Overhead

Post by Support »

@ReLocate, thank you very much for sharing your experience, we will consider this.
Primo Ramdisk | PrimoCache
Romex Software Support
Post Reply