TRIM for SSD when SSD set as a cache Topic is solved

FAQ, getting help, user experience about PrimoCache
cichy45
Level 4
Level 4
Posts: 38
Joined: Sun Oct 14, 2018 3:34 pm

TRIM for SSD when SSD set as a cache

Post by cichy45 »

Hello :)

I am testing PrimoCache in trial version. As for now I like this software a lot, it's great for my application as I am using it with another software for HDDs pooling and PrimoCache allows me to accelerate writing data to my pool when using dedicated SSD as a cache.

But here I have one question. I setup my SSD as Read/Write cache for my HDD volumes. Deffer-write and Free cache on write is enabled. So, after writing data from cache SSD to underlying volume, that data is deleted from my cache SSD. But does PrimoCache issue TRIM command to SSD to prevent degradation of its write performance?

I know that it "TRIMs" content of L1 cache (RAM) to so you can avoid unnecessary writes to your SSD. But does it also TRIM SSD set as L2 cache when blocks of cache content are flushed to HDDs?
Some SSDs when not TRIMmed experience huge slowdown as their own garbage-collector might not be good enough.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: TRIM for SSD when SSD set as a cache

Post by Jaga »

I think Support said (not too long ago) that TRIM commands weren't happening yet, but it was something they were working on (a planned feature). They can correct me if I'm wrong. For now I'd make sure your SSD is nicely overprovisioned (i.e. 10-15% unused space after volume) if you do a lot of heavy writing using it as the L2.
cichy45
Level 4
Level 4
Posts: 38
Joined: Sun Oct 14, 2018 3:34 pm

Re: TRIM for SSD when SSD set as a cache

Post by cichy45 »

Thank you for answer. I have over-provisioning on my SSD (100GB partition on 128GB / 119GB usable SSD, so there is ~19GB of unallocated space). I hope it will be enough until Romex introduces TRIM commands.

However, I am still hoping to hear answer from support, as the last update of PrimoCache was way back in 2017 so quite time ago. Maybe they will be able to sneak-peak some of the new upgrades they are working on.
Gogol
Level 2
Level 2
Posts: 9
Joined: Mon Oct 08, 2018 8:31 pm

Re: TRIM for SSD when SSD set as a cache

Post by Gogol »

What does "trimmed blocks" mean then?
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: TRIM for SSD when SSD set as a cache

Post by Jaga »

This article can help explain the difference between TRIM, Garbage Colletion (GC), and why SSDs need them.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: TRIM for SSD when SSD set as a cache

Post by Support »

What Jaga said is exactly correct.
Nebur
Level 1
Level 1
Posts: 3
Joined: Tue Sep 13, 2022 1:49 am

Re: TRIM for SSD when SSD set as a cache

Post by Nebur »

Roughly 4 years later... couldn't find a definitive answer.
I have the same use case as the original poster - speeding up writes to hdds by deferring and invalidating after flush.
So are TRIM commands issued to the L2 cache drive?
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: TRIM for SSD when SSD set as a cache

Post by Support »

Currently no. But PrimoCache always tries to align writes to SSD erase blocks whenever possible. This helps slow down the performance degradation.
Nebur
Level 1
Level 1
Posts: 3
Joined: Tue Sep 13, 2022 1:49 am

Re: TRIM for SSD when SSD set as a cache

Post by Nebur »

Thanks for the quick reply. Appreciate it!
That's unfortunate - specially considering that I already bought a license for 3 machine and noticed the resulting issues after the fact.
I saw the statistics and - naturally - assumed TRIM support during my quick trial.

My issue is not so much degradation but a massive performance breakdown while writing. I basically have to overprovision the L2 cache ssd by the expected amount of data that will be written in one 'write burst' of my application (~200GB) in order to get roughly the same transfer rates as writing directly to the same ssd (meaning without primocache and hdd). The 'write burst' isn't particularly fast either at only ~200 Mb/s.

Generally no TRIM seems like a major letdown. I mean c'mon - the major selling point is caching HDDs with SSDs. Not TRIMming the SSDs just seems half baked. Sorry for just venting my thoughts...

Are there still plans to support TRIM and a concrete target date? Considering this thread is 4 years old...
Thank you.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: TRIM for SSD when SSD set as a cache

Post by Support »

Nebur wrote: Tue Sep 13, 2022 7:25 pm My issue is not so much degradation but a massive performance breakdown while writing. I basically have to overprovision the L2 cache ssd by the expected amount of data that will be written in one 'write burst' of my application (~200GB) in order to get roughly the same transfer rates as writing directly to the same ssd (meaning without primocache and hdd). The 'write burst' isn't particularly fast either at only ~200 Mb/s.
I guess this issue is not related to TRIM to SSD cache. It might be related to cache configuration or usage scenarios.
Could you send us your cache configuration and stats for our reference by following the guidance in the link below?
https://kb.romexsoftware.com/en-us/2-pr ... leshooting

Also for your information, you may check the following link about tuning defer-write parameters.
https://www.romexsoftware.com/en-us/pri ... write.html
Post Reply