Page 1 of 4

CHIA and PrimoCache

Posted: Thu Apr 29, 2021 2:24 pm
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

Re: CHIA and PrimoCache

Posted: Fri Apr 30, 2021 12:58 am
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.

Re: CHIA and PrimoCache

Posted: Tue May 04, 2021 12:49 pm
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?

Re: CHIA and PrimoCache

Posted: Thu May 06, 2021 8:08 am
by Support
yes, If your L2 cache is large enough.

Re: CHIA and PrimoCache

Posted: Fri May 14, 2021 7:51 pm
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

Re: CHIA and PrimoCache

Posted: Mon May 17, 2021 4:03 am
by Support
@andriusst, Thanks for your suggestion.

Re: CHIA and PrimoCache

Posted: Thu May 20, 2021 5:29 am
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.

Re: CHIA and PrimoCache

Posted: Sat May 22, 2021 11:39 pm
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 :)

Re: CHIA and PrimoCache

Posted: Sun May 23, 2021 2:22 pm
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.

Re: CHIA and PrimoCache

Posted: Sun May 23, 2021 11:35 pm
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