# Deleted pieces will be sent to trash by default

**URL:** <https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931>\
**Category:** Node Operators\
**Created:** [April 9, 2021, 7:53pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931 "2021-04-09T19:53:45Z")\
**Posts on this page:** 12\
**Page:** 2

<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:** [July 19, 2022, 6:40am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/24 "2022-07-19T06:40:19Z")

</div>

I see. Does this mean these deletions, almost all of them, are handled by Garbage Collection then? Meaning that final deletion from trash is performed by Garbage Collection?

---

<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:** [July 19, 2022, 6:53am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/25 "2022-07-19T06:53:24Z")

</div>

Currently yes. I do not know is it permanent or not.

---

<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:** [July 19, 2022, 7:20am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/26 "2022-07-19T07:20:19Z")

</div>

Does Garbage Collection run 1 time a day only?  
I am currently trying to investigate an issue of extremely high load on more than one node in the morning. Could it be that Garbage Collection kicks off around 0 UTC and does a mass delete then?

---

<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:** [July 19, 2022, 7:25am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/27 "2022-07-19T07:25:39Z")

</div>

```auto
storagenode setup --help | grep collector
--collector.interval duration how frequently expired pieces are collected (default 1h0m0s)

```

---

<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:** [July 19, 2022, 7:26am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/28 "2022-07-19T07:26:23Z")

</div>

Is this the setting for garbage collection?

---

<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:** [July 19, 2022, 7:30am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/29 "2022-07-19T07:30:00Z")

</div>

There is no other options as far as I can see.

---

<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:** [July 19, 2022, 7:34am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/30 "2022-07-19T07:34:44Z")

</div>

I had seen this setting, but was unsure as is referring to `expired pieces` and not deleted pieces. So I am not sure if this is the interval that moves pieces to trash or the interval that deletes pieces from trash.

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [July 19, 2022, 7:43am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/31 "2022-07-19T07:43:51Z")

</div>

> [@jammerdan](#):
>
> Does this mean these deletions, almost all of them, are handled by Garbage Collection then?

> [@Alexey](#):
>
> Currently yes

That doesn’t sound right. I definitely see normal deletes still in my node logs. It looks like they are still processed when the delete happens, but are just moved to trash. I’m pretty sure GC still only captures removals that were somehow missed.

> [@Alexey](#):
>
> There is no other options as far as I can see.

I think garbage collection timing is determined by the satellite. The node would need to receive a bloom filter from the satellite in order to proceed. That takes some processing time on the satellite, so effectively the satellite determines when the node can do clean up.

---

<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:** [July 19, 2022, 7:48am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/32 "2022-07-19T07:48:03Z")

</div>

Any clue what storagenode operation could cause load early morning?

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [July 19, 2022, 7:59am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/33 "2022-07-19T07:59:15Z")

</div>

Not from the top of my head, but you can use this to find out.

> [@Guide to debug my storage node, uplink, s3 gateway, satellite](https://forum.storj.io/t/guide-to-debug-my-storage-node-uplink-s3-gateway-satellite/1372):
>
> We have integrated a package called monkit in all storage nodes. It is very usefull for debuging. By default it will open a random port. In order to connect to the debug port you will need to: Add debug.addr: ":5999" to the config file. Now the port is fixed and will not change on every restart. Add -p 127.0.0.1:5999:5999 to the docker run command. Ready for action! You can request the following informations: curl localhost:5999/mon/funcs Find out how long a function like GetExpired need…

/mon/ps end point to see what’s running  
/mon/funcs could also get you info on runtime of specific processes.

---

<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:** [July 19, 2022, 8:03am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/34 "2022-07-19T08:03:51Z")

</div>

Wow, first time I am seeing this. Yes maybe that will help to find out what is going on.

---

<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:** [July 19, 2022, 12:53pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/35 "2022-07-19T12:53:07Z")

</div>

If moving to trash is and may remain the default behavior, is this still a copy transaction instead of a move like it was mentioned here, resulting in more disk i/o than necessary:

> [@Moving data to the trash folder results in a lot of disk IO](https://forum.storj.io/t/moving-data-to-the-trash-folder-results-in-a-lot-of-disk-io/3571/15):
>
> It still is the same - 31780 be/4 root 6.68 M/s 6.75 M/s 0.00 % 34.54 % ./storagenode run - Moving to trash is done cp old new; rm old instead of mv old new, which may be OK for a single file (still, WHY) but not OK for mass moves like now.

[Previous page](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931.md?page=1)
