# How to redirect the badger cache to SSD?

**URL:** <https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763>\
**Category:** FAQ\
**Tags:** windows-gui, docker, badger\
**Created:** [September 3, 2024, 12:29pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763 "2024-09-03T12:29:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![javierxam](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/javierxam/32/7816_2.png) [@javierxam](https://forum.storj.io/u/javierxam)\
**Post date:** [September 3, 2024, 12:29pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/1 "2024-09-03T12:29:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [September 3, 2024, 1:21pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/2 "2024-09-03T13:21:43Z")

</div>

you cant config location, if you not in linux.

---

<div class="post-metadata">

**Author:** ![javierxam](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/javierxam/32/7816_2.png) [@javierxam](https://forum.storj.io/u/javierxam)\
**Post date:** [September 3, 2024, 1:24pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/3 "2024-09-03T13:24:52Z")

</div>

im in linux Vadim, how can i config location?

it’s safe to enable this cache?

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [September 3, 2024, 1:30pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/4 "2024-09-03T13:30:12Z")

</div>

I think you can find some info here. [Badger cache: are we ready? - Node Operators - Storj Community Forum (official)](https://forum.storj.io/t/badger-cache-are-we-ready/27323/76)

---

<div class="post-metadata">

**Author:** ![seanr22a](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/seanr22a/32/68_2.png) [@seanr22a](https://forum.storj.io/u/seanr22a)\
**Post date:** [September 3, 2024, 2:40pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/5 "2024-09-03T14:40:51Z")

</div>

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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 4, 2024, 5:46am UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/6 "2024-09-04T05:46:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [September 4, 2024, 8:39am UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/7 "2024-09-04T08:39:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [September 5, 2024, 5:06am UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/8 "2024-09-05T05:06:54Z")

</div>

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:

> [@Badger cache filewalker test results](https://forum.storj.io/t/badger-cache-filewalker-test-results/27334):
>
> System Windows 10 OS. RAM 24GB RAM total 10 nodes HDD 2.5 ST1000LM 1TB HDD 900GB Alocated, it overused to 931 GB so Node is Full First Run 2024-07-28T13:52:17+03:00 INFO pieces used-space-filewalker started {Satellite ID: 1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE} 2024-07-28T16:47:32+03:00 INFO pieces used-space-filewalker completed {Satellite ID: 1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE, Lazy File Walker: false, Total Pieces Size: 591950544640, Total Pieces C…

---

<div class="post-metadata">

**Author:** ![Vadim](https://storj.bcdn.literatehosting.com/letter_avatar/vadim/32/6_449c533f586939b6e5f246632a46421f.png) [@Vadim](https://forum.storj.io/u/Vadim)\
**Post date:** [September 5, 2024, 12:16pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/9 "2024-09-05T12:16:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![snorkel](https://storj.bcdn.literatehosting.com/letter_avatar/snorkel/32/6_449c533f586939b6e5f246632a46421f.png) [@snorkel](https://forum.storj.io/u/snorkel)\
**Post date:** [September 8, 2024, 7:48pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/10 "2024-09-08T19:48:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![EasyRhino](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/easyrhino/32/1133_2.png) [@EasyRhino](https://forum.storj.io/u/EasyRhino)\
**Post date:** [September 8, 2024, 8:19pm UTC](https://forum.storj.io/t/how-to-redirect-the-badger-cache-to-ssd/27763/11 "2024-09-08T20:19:25Z")

</div>

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