When is data unpinned?

I am interested in garbage collection.

As far as I know, the target of garbage collection is unpinned data.
Is there any other way instead of manually using ipfs pin rm to become unpinned data?
I wonder if there is something the system does instead of unpinning by the user. (For example, after a certain amount of time, it changes from pinning to unpinning.)

I’m also wondering if there is any practical way to improve the garbage collection performance in IPFS.
It would be very helpful to me if you could share what you know.

Thank you.

no, pinning is the user asking “PLS never remove this”, why would remove it then ?

Also FYI, when you browse IPFS data you downloaded is added to your IPFS node but unpinned.

Thanks for the reply!

Actually, I want to increase the performance of garbage collection to reduce the GC time in IPFS.
To do that, I want to know the situation where garbage collection takes a long time (e.g., a situation where there is a lot of unpinned data).
In other words, I want to know the need to increase the garbage collection performance.

Do you think it is important to increase the garbage collection performance of IPFS?
I would be very grateful if you could let me know your thoughts.

So implementation details asides, maybe that hapenning but that a bug.

The GC is slow when you have a lot of data pinned rather. Because the traversal takes lots of time.

In other words, I want to know the need to increase the garbage collection performance.

Yeah that something we need, we even know how to do it, it just require lots of refactoring and change.

Issue with the GC

The GC is a “touching” GC.
Touching is in opposition to refcounting.

  • Refcounting maintain a counter per object, for each new reference to that object, the counter is incremented, when you remove a reference you decrement it.
  • Touching GC doesn’t have counters, objects are free flowing without any storage about how they are linked, that makes day to day operation faster, however it makes the GC slower, because you need to retraverse all the blocks you to keep to ensure they aren’t a desendant of a pin.

Refcounting would make the GC far faster as instead of being a single big operation, with refcounting you can just track the count and when it reach 0 you know this block can be removed.


Thank you so much for your reply.
Thanks, I caught a lot of information.

If I have any other questions, I will post again.