Piece_expiration.db and collector service increased use of self expiring pieces?

I don’t see any problems either on my nodes. If anything, piece expiration is a more efficient mechanism. GC would need to first move pieces to trash, only then remove them. Piece expiration saves I/O time.

And so, well, if a node gets a lot of pieces with expiration date set and complains about I/O, using GC to clean them up will make the I/O worse.

If there is an I/O problem with piece expiration, I would seek to solve it, not remove the mechanism altogether. Quickly looking at the code, there’s one potential improvement to be tried: running a single DELETE statement to remove entries of multiple pieces in a single transaction, as opposed to removing them one by one.

2 Likes