this post was submitted on 15 Oct 2023
144 points (97.4% liked)
Asklemmy
43839 readers
827 users here now
A loosely moderated place to ask open-ended questions
Search asklemmy ๐
If your post meets the following criteria, it's welcome here!
- Open-ended question
- Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
- Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
- Not ad nauseam inducing: please make sure it is a question that would be new to most members
- An actual topic of discussion
Looking for support?
Looking for a community?
- Lemmyverse: community search
- sub.rehab: maps old subreddits to fediverse options, marks official as such
- !lemmy411@lemmy.ca: a community for finding communities
~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What triggers this? My DB was about 30GB, then the update shrunk it down to 5GB, then it grew back to 30GB.
I'd be pretty confident that the 140GB of pictrs cache I have is mostly cache. There are occasionaly users uploading images, but we don't have that many active users, I'd be surprised if there was more than a few GB of image uploads in total out of that 140GB. We just aren't that big of a server.
The pictrs volume also grows consistently at a little under 1GB per day. I just went and had a look, in the files directory there are 6 directories from today (the day only has a couple of hours left), and these sum to almost 700MB of images and almost 6000 files, or a little over 100KB each.
The instance has had just 27 active users today (though of course users not posting will still generate thumbnails).
While the cached images may be small, it adds up really quick.
As far as I can tell there is no cache pruning, as the cache goes up pretty consistently each day.
The activities table is cleared out automatically every week, items older than 3 months are deleted. During the update only a smaller number of rows was migrated so the db temporarily was slower. You can manually clear older items in
sent_activity
andreceived_activity
to free more space.Actually Im wrong about images, turns out that all remote images are mirrored locally in order to generate thumbnails. 0.19 will have an option to disable that. This could use more improvements, the whole image handling is rather confusing now.
Thanks for the info! Ior performance reasons it would be nice to have a way to configure how long the cache is kept rather than disable it completely, but I understand you probably have other priorities.
Would disabling the cache remove images cached up to that point?
You will have to wait for 0.19 to disable it. Pictrs 0.5 will also add a way to clear old images. See the issue: https://github.com/LemmyNet/lemmy/issues/4053
That sounds great, thanks for letting me know.