# The trash is unpaid?

**URL:** <https://forum.storj.io/t/the-trash-is-unpaid/26708>\
**Category:** FAQ\
**Tags:** trash\
**Created:** [June 16, 2024, 1:37pm UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708 "2024-06-16T13:37:59Z")\
**Posts on this page:** 20\
**Page:** 5

<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:** [June 23, 2024, 7:45am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/81 "2024-06-23T07:45:49Z")

</div>

> [@Mitsos](#):
>
> In my case it’s 50%+.

How much pieces and how much collected? I was assured that our big BF should cover almost all sizes reported to the satellites…

---

<div class="post-metadata">

**Author:** ![Mitsos](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/mitsos/32/1125_2.png) [@Mitsos](https://forum.storj.io/u/Mitsos)\
**Post date:** [June 23, 2024, 7:47am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/82 "2024-06-23T07:47:09Z")

</div>

Not running info log.

---

<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:** [June 23, 2024, 7:48am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/83 "2024-06-23T07:48:01Z")

</div>

Hm. I would ask the team is it possible to get this info in a different way, maybe via a debug port…  
I think @littleskunk might know too.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [June 23, 2024, 7:54am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/84 "2024-06-23T07:54:58Z")

</div>

> [@Mitsos](#):
>
> There has been uncollected trash piling up on my nodes (YMMV) for years. The old bloom filters fell apart around 8TB of stored data. After that the nodes could not keep up with uncollected trash. The stored amount went up and trash stayed the same. **The monthly payout was lower every month after 8TB.** This is very important because it shows that the stored data doesn’t match what is counted as stored. This was across a dozen nodes running on a half a dozen different hosts. This leads us to my next point.
> 
> Currently the only usage I see from my nodes is constantly moving data into trash. That means that either the clients are constantly deleting (not the case with US1, EU1 and AP1 slight decrease, saltlake up), or there IS a lot of uncollected trash that the bloom filters keep missing time and time again. I don’t see the 10% rate for missed data. In my case it’s 50%+. Again, YMMV. Let me be crystal clear: No matter how much data is moved to trash, no matter how much of that is getting deleted (actually deleted from trash) my trash value isn’t dropping below ~10TB across all my nodes.

Finally someone who seems to be in the same boat with me.  
Basically what I am seeing over my nodes. Trash in terabytes. But I must admit that I turned of filewalkers on some of them because they could not finish it. That’s we the upcoming fixes are so important to get the numbers straight again and I finally can tell how much used space, garbage or trash is even there.

---

<div class="post-metadata">

**Author:** ![st99ab](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/st99ab/32/1124_2.png) [@st99ab](https://forum.storj.io/u/st99ab)\
**Post date:** [June 23, 2024, 7:59am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/85 "2024-06-23T07:59:30Z")

</div>

Yes, I’ve seen attempts to fix some issues. Some of those fixes seem to be unstable, hopefully it’ll improve.  
The option of community contribution is good to have. If this business turns out worthwhile for me I’ll see if I can make my 2 cents contribution.

---

<div class="post-metadata">

**Author:** ![ACarneiro](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/acarneiro/32/1129_2.png) [@ACarneiro](https://forum.storj.io/u/ACarneiro)\
**Post date:** [June 23, 2024, 8:13am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/86 "2024-06-23T08:13:51Z")

</div>

> [@Alexey](#):
>
> The Community pull requests are very welcome!

Whilst I would love to do that, I am in that awkward position where I know just about enough to tell that something is going wrong but by no means enough to suggest how to make it right ☹

Gonna be honest, I don’t even know what a “pull request” actually means! I’ll have to google that one at some point 😉

---

<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:** [June 23, 2024, 8:18am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/87 "2024-06-23T08:18:41Z")

</div>

Yes, this is a contribution too! It also helps if the Community provide a needed info to find a root cause faster.  
And I believe that the case with these prospective customers helped a lot to improve the code, so I hope it should help to fix issues faster, too.

> [@ACarneiro](#):
>
> Gonna be honest, I don’t even know what a “pull request” actually means! I’ll have to google that one at some point 😉

that’s fine. Not all should be a programmer (I’m not sure in the today world, though 😉 )

---

<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:** [June 23, 2024, 9:26am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/88 "2024-06-23T09:26:17Z")

</div>

Can it be something done with piece\_expiration.db size? Like make a few smaller ones than a single big one? Or something?  
I don’t know how a db is write/read, but I imagine it is kept in RAM too and synced to HDD? That means it takes a lot of % of memory on the low RAM systems that could be used for something else.  
I understand that at startup, the node performes a pragma integrity check on db-es?  
Could it be implemented to perform the vacuum too, after the pragma OK?

---

<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:** [June 23, 2024, 9:33am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/89 "2024-06-23T09:33:33Z")

</div>

> [@snorkel](#):
>
> Can it be something done with piece\_expiration.db size? Like make a few smaller ones than a single big one? Or something?

This is already suggested here:

> [@Is there a safe mechanism regardless of what local dashboard says?](https://forum.storj.io/t/is-there-a-safe-mechanism-regardless-of-what-local-dashboard-says/26627/25):
>
> It would certainly be interesting to see a separate piece expiration database per satellite. Then there would be no need to store satellite ID in every single row, making row storage, but also indices quite a bit smaller. This is partitioning going extreme, but, well, might be worth it. But there might be approaches better than using sqlite altogether.

I shared this suggestion with the team.

> [@snorkel](#):
>
> I don’t know how a db is write/read, but I imagine it is kept in RAM too and synced to HDD?

yes, it’s possible… However, did you see a size of that DB? Can it be fitted into the RAM in all cases?

> [@snorkel](#):
>
> I understand that at startup, the node performes a pragma integrity check on db-es?

No, but it’s tried to open them, then the driver would sometimes tell something useful if it cannot open it. But we do not perform an integrity check directly.

> [@snorkel](#):
>
> Could it be implemented to perform the vacuum too, after the pragma OK?

The autovaccuum is enabled by default as far as I know. However, I believe it unlikely help if that database has all these records.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [June 23, 2024, 11:15am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/90 "2024-06-23T11:15:06Z")

</div>

> [@Alexey](#):
>
> Seems it is happening right now:

While it is nice to have a Bloom filter every day, if the corresponding filewalker process needs days to finish, then it does not help.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [June 23, 2024, 11:17am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/91 "2024-06-23T11:17:09Z")

</div>

> [@st99ab](#):
>
> Better visibility of what’s going on with the node

It would be great to have that on the dashboard.  
Like when a filewalker started, is running or has finished.

---

<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:** [June 23, 2024, 11:35am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/92 "2024-06-23T11:35:37Z")

</div>

I lost count of post I have to replay, so I’ll post it here.  
I checked databases on all nodes, with Saltlake and without. I’ll put here what I found for a machine with 2 nodes fitting that description. Other machines look similar to this one, because all have 1 node with SL and one node without SL.  
Without SL, the piece\_expiration.db is in MB range, like 200MB for 8TB of data.  
With SL, the piece\_expiration.db is in GB range, and the biggest I have is 28GB, for 21TB of data.

 ![node1](https://storj-s3.bcdn.literatehosting.net/original/3X/4/c/4c20ea11d87b2ac7c260e7f774e3d57955fb2456.png)

 ![node2](https://storj-s3.bcdn.literatehosting.net/original/3X/7/8/78ec9684f206bc2eb2d15a42b10e160589b9ff96.png)

Another discovery: for the filled nodes like this one, with less than 5GB of available space, are missing those temp files for piece\_expiration.db, -wal and -shm. I don’t know their role, but they are missing. The node is running, ver. 104.5.

 ![dash2](https://storj-s3.bcdn.literatehosting.net/original/3X/8/4/84d14be0b6aa86cf6eb60c8efd76a76b437a1b5f.png)

---

<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:** [June 23, 2024, 11:43am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/93 "2024-06-23T11:43:18Z")

</div>

> [@jammerdan](#):
>
> if the corresponding filewalker process needs days to finish, then it does not help.

> [@Alexey](#):
>
> `"Duration": "6m54.754044s",`

> [@Alexey](#):
>
> `"Duration": "2m50.3943145s"`

> [@Alexey](#):
>
> `"Duration": "1m9.0478738s"`

no, the `m` here is stands for a “minutes”, not “months”.

---

<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:** [June 23, 2024, 11:47am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/94 "2024-06-23T11:47:09Z")

</div>

Regarding the `send pieces to trash: false` option, I’ll try to check if there are new pieces in trash, but that system is very slow and low responsive, with 1GB RAM.  
After setting the option and stop, rm, restart node, I see this log entries:

```auto
2024-06-21T22:30:10Z INFO retain Prepared to run a Retain request. {"Process": "storagenode", "cachePath": "config/retain", "Created Before": "2024-06-17T17:59:59Z", "Filter Size": 1484102, "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
2024-06-21T22:50:49Z INFO retain Moved pieces to trash during retain {"Process": "storagenode", "cachePath": "config/retain", "Deleted pieces": 13546, "Failed to delete": 0, "Pieces failed to read": 0, "Pieces count": 2501193, "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Duration": "20m39.544946417s", "Retain Status": "enabled"}
2024-06-22T12:47:26Z INFO retain Prepared to run a Retain request. {"Process": "storagenode", "cachePath": "config/retain", "Created Before": "2024-06-18T17:59:59Z", "Filter Size": 1484102, "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
2024-06-22T13:06:17Z INFO retain Moved pieces to trash during retain {"Process": "storagenode", "cachePath": "config/retain", "Deleted pieces": 4892, "Failed to delete": 0, "Pieces failed to read": 0, "Pieces count": 2495443, "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Duration": "18m50.974793335s", "Retain Status": "enabled"}

```

```auto
2024-06-21T22:23:19Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE", "elapsed": "6.683105ms"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6", "elapsed": "31.133444ms"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S", "elapsed": "11.699328ms"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
2024-06-21T22:23:19Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "elapsed": "12.187975ms"}
2024-06-22T22:23:20Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs"}
2024-06-22T22:23:20Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "elapsed": "147.114507ms"}
2024-06-22T22:23:20Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE"}
2024-06-22T22:23:20Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE", "elapsed": "170.166µs"}
2024-06-22T22:23:20Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6"}
2024-06-22T22:24:08Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6", "elapsed": "48.548610977s"}
2024-06-22T22:24:08Z INFO pieces:trash emptying trash started {"Process": "storagenode", "Satellite ID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S"}
2024-06-22T22:24:09Z INFO pieces:trash emptying trash finished {"Process": "storagenode", "Satellite ID": "12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S", "elapsed": "149.062982ms"}

```

The node is runnig, but no log entries today.

 ![node 1 no trash](https://storj-s3.bcdn.literatehosting.net/original/3X/3/8/3809bc85271b172424d8ba5ce43d896adfbeec7a.png)

---

<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:** [June 23, 2024, 11:47am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/95 "2024-06-23T11:47:35Z")

</div>

> [@snorkel](#):
>
> , -wal and -shm. I don’t know their role, but they are missing.

> <https://stackoverflow.com/questions/12928294/what-content-do-shm-and-wal-files-contain-after-running-checkpoint/12948036#12948036>

so, they are stands for a journal. If they are absent, then probably you do not have any changes in that database since the last restart (they should be deleted after the grace shutdown or after the replay and should be created back, if there are changes which should be applied to the database).

---

<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:** [June 23, 2024, 11:49am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/96 "2024-06-23T11:49:07Z")

</div>

Is the `trash` folder empty as for now?

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [June 23, 2024, 11:50am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/97 "2024-06-23T11:50:43Z")

</div>

If it is fast on your nodes then it is great.  
However it could take longer on other nodes:

> <https://github.com/storj/storj/issues/6998>
>
> This is a problem for our select nodes. We have a patch that might help this is…sue but it needs to be reviewed, tested, and merged. 
> 
> Patches for the used space filewalker:
> https://review.dev.storj.io/c/storj/storj/+/12806
> https://review.dev.storj.io/c/storj/storj/+/13421/2
> 
> A discussion is required to decide on a clear direction to fix the actual issue.

This needs to be kept in mind.

---

<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:** [June 23, 2024, 11:51am UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/98 "2024-06-23T11:51:16Z")

</div>

![node 1 no trash space](https://storj-s3.bcdn.literatehosting.net/original/3X/d/1/d110cfd3cb66b86f915435c1d9740a0db7744223.png)  
The dashboard says there are pieces in trash.

 ![trash](https://storj-s3.bcdn.literatehosting.net/original/3X/6/a/6a580fa1aef32c288631b635911c6488fa246e43.png)

And the File Explorer.

---

<div class="post-metadata">

**Author:** ![ACarneiro](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/acarneiro/32/1129_2.png) [@ACarneiro](https://forum.storj.io/u/ACarneiro)\
**Post date:** [June 23, 2024, 12:00pm UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/100 "2024-06-23T12:00:19Z")

</div>

Hahahahaha! Have a beer! 😂

---

<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:** [June 23, 2024, 12:06pm UTC](https://forum.storj.io/t/the-trash-is-unpaid/26708/101 "2024-06-23T12:06:16Z")

</div>

How can I check if there are newer files in the trash folder since restart 30h ago, for EU1 sat?  
The path to pieces is like:

```auto
/volume1/Storj/storage/trash/v4weeab67sbgvnbwd5z7tweqsqqun7qox2agpbxy44mqqaaaaaaa/2024-06-22/2a

```

[Previous page](https://forum.storj.io/t/the-trash-is-unpaid/26708.md?page=4)

[Next page](https://forum.storj.io/t/the-trash-is-unpaid/26708.md?page=6)
