CHIA and PrimoCache

FAQ, getting help, user experience about PrimoCache
AlexByrth
Level 3
Level 3
Posts: 14
Joined: Wed Apr 09, 2014 12:01 pm

CHIA and PrimoCache

Post by AlexByrth »

Hi,
Well, I guess it's inevitable.

I'm a proud long time user of PrimoCache and I've been tempted to check out how PrimoCache could help on CHIA Blockchain
( https://github.com/Chia-Network/chia-bl ... ners-Guide )

As far I could understand CHIA, seems it relies heavily upon fast read/write operations.
Well, that's is where primocache shines!

I'm still preparing a rig for this and certainly will report my finding here, but if any of you guys have some tips in advance, I would really appreciate it!


Image
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: CHIA and PrimoCache

Post by Support »

We are still studying chia with PrimoCache or Primo Ramdisk. One of our customers told us that he has got a success with PrimoCache on chia and improving the daily output.
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: CHIA and PrimoCache

Post by rcamarda390 »

ditto..I've been messing around with Chia as well.
I am testing out using 100% write..my thought is to 'sacrifice' my L2 ssd to help reduce wear level on my temp ssd.
Since a plot is about 100GB, would using infinite deferred write back keep the data on L2 until issue a write?
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: CHIA and PrimoCache

Post by Support »

yes, If your L2 cache is large enough.
andriusst
Level 2
Level 2
Posts: 6
Joined: Wed May 12, 2021 10:05 am

Re: CHIA and PrimoCache

Post by andriusst »

Would it be possible to add feature to block disk reads during cache flush?

I only just started with Chia. I am exploring PrimoCache (vs Windows large cache setting) to speed up plotting too so very interested in this development.

Deferred writes speed up the process a bit (better than windows native caching) on a single worker. But when more (9-10) parallel workers kick in and disk is overwhelmed by mixed workload and manages about 800MB/s read+write combined with 100% busy time. Cache flushing during this busy time results only about 1000MB/s and restricts reads to about 50MB/s. But CrystalDiskMark figures show 3200MB/s+ capability for write only (even faster read only). Currently 32GB L1 cache takes about half a minute to flush. But with blocked reads I am hoping under 10 seconds should be possible.
I am currently experimenting with different NTFS cluster size (mirroring cache block size of course) to see if bigger cluster size has advantage. Happy to share PrimoCache results or test something.
My setup is 2TB Sabrent Rocket TLC as a dedicated drive for plotting, 64GB RAM, Ryzen 3700X
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: CHIA and PrimoCache

Post by Support »

@andriusst, Thanks for your suggestion.
User avatar
Support
Support Team
Support Team
Posts: 3622
Joined: Sun Dec 21, 2008 2:42 am

Re: CHIA and PrimoCache

Post by Support »

It seems that the speed of single plotting is mainly affected by CPU frequency. Primo Ramdisk and PrimoCache might not help a lot on improving the speed of single plotting. However, they can improve the speed of parallel plotting a lot and fully utilize the RAM ability.
rcamarda390
Level 4
Level 4
Posts: 25
Joined: Sun Dec 08, 2019 8:06 pm

Re: CHIA and PrimoCache

Post by rcamarda390 »

Chia's plotting destorys sdd (gonna do life check on drives that I order for now on)
So, even if cache doesnt speed up, I hope it will save wear and tear on drives.
My next plan is to max out memory and create 100GB L1 cache.
I wish I could get a threadripper pro w/ 2TB of memory :)
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: CHIA and PrimoCache

Post by Jaga »

I've been doing some reading on Chia lately, and it appears that many SSD manufacturers instantly void your warranty if/when they learn that the drive was used with Chia in any way.

Chia literally destroys write cycle life on SSDs, even those with high endurance. One Chia user however has a beefy L1 RAM Cache (~80GB) in use with multiple plots simultaneously, and has been able to reduce writes to ~10% of what they would otherwise be.

Seems like using a SSD with Chia isn't such a good solution after all, unless you can absorb that cost as part of the farming. A seriously large L1 as write-only has a much better effect from what I can tell.
azzurro
Level 2
Level 2
Posts: 5
Joined: Sun May 23, 2021 11:26 pm

Re: CHIA and PrimoCache

Post by azzurro »

Hi

after thinking about how to eliminate the need for SSDs for chia farming, I came across PrimoCache and registered here to make this post.
First of all, very cool software and very good value for price. I wonder why I didn't stumble upon this piece of gold earlier.

Regarding chia mining and generally about disk i/o issues of spinning drives:
Look at HPe Nimblestorage. They use NL-SAS (basically 7200rpm SATA disks with SAS interface) as primary storage and SSDs for caching. So far, nothing new you say? Well, then read carefully:
1) SSDs are only used for read cache. an intelligent algorithm keeps "hot" data in the cache
2) additionally, they have NVRAM for caching write I/Os and here is the magic sauce: they not only cache the write I/Os, they also sort them and transform any random I/O to sequential I/O which spinning disks are very well suited for.

So you issue a metric crapton of random read and write I/Os to that storage, it takes everything into NVRAM, re-sorts everything and then writes a wonderful sequential stream down to the disks. the read I/Os go to the SSD cache, of course as the NVRAM isn't very large and it wouldn't make sense to hold any data for reading there.

Wouldn't that be something that could be implemented in PrimoCache? Killer Feature! RAM for write caching and streamlining data, SSD (L2 Cache) for holding read cache data (not really necessary for chia, though, i think) and spinning drives for sequential I/O.

regards
azzurro
Post Reply