The best $30 you can possibly spend on your Windows PC which has under utilized RAM
I think there are a lot of people out there who have maxed out their total system memory especially if the MAX memory supported is 32gb. Especially now with the lower DDR4 prices, it has never been a better time to get that extra RAM.
This is one of those secret things I think the people at Microsoft and other companies may already be using, while you are pulling your hair and wondering why your PC experience sucks so bad!
There is no better example of the strange course of how things have evolved over time than a RAID 5 volume of Samsung 970 Evo Plus 512 gb NVMe SSDs is screaming slow on a Xeon 10 core, 20 thread PC with a $1000 GPU and 32 GB RAM with disk caching enabled in Windows. How does this make any sense to you?
This is a continuation to this article:
The hidden, but awesome feature of Intel CPUs which nobody told you about
I have always believed that if you are spending your hard earned money on anything, you should utilize it to the MAX…
I found a way to get zero parity errors with Intel VROC! And this article is as much about that, as well as some really, really awesome and cool things I discovered on my journey to RAID/ Memory/ Caching Nirvana.
On a side note, if you are using this PC for work, you should be using ECC memory to prevent the hangs, crashes, errors and corruption issues you will eventually see especially with Windows PCs. I believed this a while ago, but now this belief is becoming more mainstream:
Why don't PCs use error correcting RAM? "Because Intel," says Linus
This Monday, Linux kernel creator Linus Torvalds went on a frustrated rant about the lack of Error Correcting Checksum…
- This is scientifically sound advice at this point.
Ok, let us get back to the article. 32 gb RAM has been adequate for me for a long time now especially because Visual Studio is still for some strange reason a 32-bit application. So, there was only so much memory my PC would use no matter what during my development activities.
I have never really seen my memory usage go beyond ~20GB for a long time. This changed when I enabled disk caching on my RAID 5 volume — not by a lot, but still perceptibly. After that I started seeing the memory usage go upto about 22 GB during peak periods.
Because of the daily parity errors I was seeing with my Samsung SSD + Intel VROC setup, I was trying to figure out a way to resolve that. Without disk caching enabled, the parity errors would reduce significantly, but the system got super slow. The Intel Support guy told me that Optane caching could speed up the system while keeping disk caching disabled. I did not want to get the supremely expensive, low capacity Optane drive.
So, I was watching this youtube video where Linus mentioned a program called: PrimoCache by Romex. Apparently AMD also supports something similar to Optane memory caching with any SSD, but PrimoCache was independent of the CPU architecture and could be used anywhere.
That is how I discovered this amazing program:
I have rarely purchased a third party program within Windows before because most of them are bloatware, or cause some issue or the other. I rely on mostly office programs from the office, or the browser.
But, I will be gladly buying multiple licenses of this program. This is why:
This lets me:
- Allocate free unused, memory on my PC to be used as a “L1 Cache”
- Allocate fast SSD storage on my PC to be used as a “L2 Cache”
Nerd that I am, this blew my mind. I started with 6GB of cache, and eventually stabilized around 4GB L1 cache to give my programs a bit more space to breathe. This tangibly, tangibly improved the speed of my PC more than I ever thought possible.
I also enabled defer-write because now all my PCs are protected with a UPS and this one has about 20 minutes of runtime available with the monitors running as well. Don’t do this if you don’t have a UPS because you will corrupt your data because of data loss on a power outage otherwise (data is missing from the drive, because it was written to the cache).
The amazing thing I noted after enabling this was that, I have zero parity errors on my Intel VROC!
Visual Studio operations which used to hang earlier are running fast now. I got so excited by this, all my Windows PCs are running this software for a few days and I see no issues, good cache hit rate, and substantial improvement in performance for almost everything I do. Productivity has never been as high as this before!
And I did something else which is awesome!
If you read my previous article about my having to get three 512gb SSDs to increase my RAID 5 disk space, you know I ended up with extra unused 256gb SSDs. I had ordered the PCIe card from Dell to be able to use these drives for “something”.
A few years ago, I used to configure these extra drives as RAID 0 and use it to store the windows and user temp files. This does cause problems because many programs, because of bugs still hard code the temp folder path. So, not a great idea.
I don’t really need the extra space, but I did want to create the RAID 0 volume for “something” useful, and this is where the L2 Cache of PrimoCache comes into play.
On a side note, please remember that if your Dell 5820 configuration is similar to mine with a video card on the x16 slot, and the PCIe storage care on the other x16 slot, the only other free slots are either x16 wired as x8 or x16 wired as x4. No matter what Dell says, if you get another PCIe storage card and install it on the x16 slot wired as x8, it will only recognize 2 of the drives (probably because otherwise performance would be slower).
So, what I ended up doing is to create a Intel VROC RAID 0 volume spanning multiple controllers with two 256gb Samsung 970 Plus SSDs and one 256gb Samsung 970 Evo SSD.
- You have to initialize this disk within windows first (drive utility)
- Assign it a drive letter and then format it.
Then go into PrimoCache and add that entire drive as a L2 cache:
You can then select this volume (which is invisible to the Windows file explorer) in the main UI:
I have a lot of space on this drive so, I also tweaked the advanced settings:
- This disk will be used for both reads and writes
- And it will only run the sync operations when the computer is idle (will not slow you down).
I don’t believe how well this program works even with the latest Windows 10 release:
- It is quite unbelievable to see 99.7% cache hit rate. Imagine how less my disk is hit synchronously now!
- And I am using a lot of the L2 cache which is RAID 0, and hence will be much faster than the RAID 5 “actual” volume.
I still find it hard to believe how come this program works so well, works as designed and you will notice this, because when the machine shuts down, it spends quite sometime ensuring that the cache is fully written back to the main drive.
Windows takes maybe a second or more to actually login, but you can see that the cache is fully loaded even at the start. Visual Studio operations which seemed to hang before even with NVMe drives, now run at decent speeds.
I think this is a must to have program within Windows. I did do a lot of research on this, and it helps even when disk caching is enabled in Windows:
Even my laptops have 32gb ram, so I am able to use L1 cache everywhere. I only have one PC where I have the RAID 0 L2 Cache, because either it is a laptop where all the drive slots are already used for the single RAID 5 volume OR it is a PC where the primary drive is not a RAID volume, and it is just a single NVMe drive, and I don’t use them as much, and don’t want to go through the hassle of trying to do AMD RAID using multiple NVMe drives.
Try it. You won’t regret it!
Try the L2 Cache setup on your work desktop. You won’t regret it!
To be continued…