How to redirect the badger cache to SSD?

the badger cache can be located in a ssd or should be placed in same folder as node (hdd)

you cant config location, if you not in linux.

im in linux Vadim, how can i config location?

it’s safe to enable this cache?

I think you can find some info here. Badger cache: are we ready? - Node Operators - Storj Community Forum (official)

2 Likes

With linux/docker it’s easy to set the location. I have an nvme with the badger cache and databases called volume2.

docker run -d --restart unless-stopped --stop-timeout 300 --network host \
    -e WALLET="xxxx" \
    -e EMAIL="xxxx" \
    -e ADDRESS="xxxx" \
    -e STORAGE="11TB" \
    --mount type=bind,source=/volume2/identity,destination=/app/identity \
    --mount type=bind,source=/volume1/storj,destination=/app/config \
    --mount type=bind,source=/volume2/storjdb,destination=/app/dbs \
    --mount type=bind,source=/volume2/filestatcache,destination=/app/config/storage/filestatcache \
    --name storagenode storjlabs/storagenode:latest --storage2.database-dir="dbs" --storage2.piece-scan-on-startup=true --pieces.enable-lazy-filewalker=false --pieces.file-stat-cache=badger
4 Likes

You may try to point it to the SSD with a junction link on Windows.

thank you, tried it on one server with 16 nodes, looks working, will monitor how much it eat traffic there.

1 Like

You are welcome!

I do not think that it would have any impact on amount of received traffic. Or do you mean the amount of IOPS?

It may has an impact on duration of the used-space-filewalker scan though, but I do not think it would be significant.
It would be nice if you could compare the time for the used-space-filewalker with the badger cache enabled on the HDD and on the SSD for the same node but with a several hours difference between attempts (to invalidate the cache) and publish them there:

I hope it will have impact on filewalker, deletion process, so my node make them faster and not overload HDD, then all other processes will work also better.

to record how fast it wok, I need to put it info log level, I use Warning, I just tiered from multi gigabyte log files.

Is the filestatcache a directory or a file?
Should I create it as a directory in the SSD path before adding the option in run command?

Yes filestatcache is a directory, and yes create it first.

2 Likes