Blockchain db grows 207MB per day

How to move the Chia db to another folder [SpaceFarmers.io Wiki]

1 Like

Extra information is always good to pass around…

This is on a consumer 500GB Samsung SSD, the DB writes don’t appear to make much of an impact:

At this rate it will be good for another 20 years.

1 Like

I really dont understand that.
The words pre fail don’t fill me with confidence though.

The 256GB/100TBW NVMe that came in the PC I bought last summer saw a significant drop in health the 2-3 months it was used to hold the Chia DB, until I discovered this issue and moved the DB to an older Samsung SSD with higher TBW.

Just check the Reddit thread I linked. And the original thread linked in there.

Again, Chia performs a huge amount of writing to the SSD that holds the DB, as measured and confirmed by several members in those threads. Whether you want to be concerned about that is of course entirely your choice :wink:

Those are SMART values. SMART has two categories of values: Old Age and Pre-Fail. Depending on manufacturer, those values start with 100 or 256 (or something like that). The Old Age will start sliding down with number of hours you put on that device. The Pre-Fail should not move, and if they do, it is usually time to replace that device depending on how many hours they have (e.g., when you see those reallocated sectors moving, it implies that your platter started degrading). The Threshold column says at which point those values are in critical category, so if that is not yet hit, you still may have some time to replace it.

All I know is my SSD wear is only down ~3% after ~11 months of DB writes, I see no reason to have any concern, but I acknowledge that not all SSDs are created equal.

1 Like

Here is how to move entire .chia directory from your user onto another drive in Windows and create a “directory junction” (aka hard link).

Let’s suppose currently chia home directory is C:\Users\yourname\.chia
And your new drive is X:\

  • Stop chia software using command chia stop all -d and make sure all processes are terminated (double check in task manager)
  • Move C:\Users\yourname\.chia to X:\.chia
  • Create hard link:
mklink /j C:\Users\yourname\.chia X:\.chia

This will make it so the original chia software thinks it works in the default directory, but it will be actually stored in another drive.

2 Likes

Correct, that’s how a hard link works.
I wonder… would it be too hard for the devs to just add an option: “Where do you want to place your chia wallet and full node DBs?”
How hard can that be? I really don’t like when installers assume we want everything on C or inside our profile folder.

1 Like

Don’t have the db on your SD card. You have to do it on an SSD.

Search if there’s a request for that and if not you can request it: Issues · Chia-Network/chia-blockchain · GitHub

Please (again) see the Reddit thread I linked a few posts up. There are no less than 3 different ways to move the DB, all 3 described there. I use a hardlink in Windows (and posted a procedure similar to the one posted here). But you can also edit config.yaml OR use an environment variable. I forget the name of the variable, but it’s just a click away.

2 Likes