Follow

How are other Mastodon admins dealing with the system cache?

Even after running media remove, preview_cards remove and remove-orphans, cache is still pretty big:

~/live/public/system/cache$ du -h --max-depth=2
8.2G ./accounts/avatars
27G ./accounts/headers
35G ./accounts
39G ./media_attachments/files
39G ./media_attachments
3.0G ./custom_emojis/images
3.0G ./custom_emojis
31G ./preview_cards/images
31G ./preview_cards
107G .

· · Web · 3 · 8 · 4

@dcid My instance is just me so it's using just 1 gig in media storage total. How much storage space do you have for your entire instance?

@rishi556 Have quite a bit (200G), but it is growing and filling fast - most on the system cache.

@dcid Oh so I went a bit overkill with 1TB haha. I am quite liking this though, and might actually build out and ship a full server to host a larger instance.

@dcid I have cron jobs systemd timers for most of the cleanup commands listed in the admin cli documentation.

I only have a couple of users, though...

@dcid @thomas I now store the media in a cheap S3 compatible storage.

@nottulner @thomas How much data are you storing now? Even after clearing the cache, it keeps growing (at 120G today after clearing).

Seems like the tootctl commands to clear the media/preview_cards don't clear it all.

@dcid this is how it looks on my system with daily cache prune after 30 days:

mastodon@mastodon:~/live/public/system/cache$ du -h --max-depth=2
2.0G ./custom_emojis/images
2.0G ./custom_emojis
95G ./media_attachments/files
95G ./media_attachments
17G ./accounts/headers
7.7G ./accounts/avatars
25G ./accounts
3.4G ./preview_cards/images
3.4G ./preview_cards
124G .

@nottulner

@thomas @nottulner thanks! So it is not just me. How much it has been growing over time? Even with the daily prune?

@dcid unfortunately I didn't watch it grow, so I have no idea :D

But the instance has existed since summer 2017 and the cache clean jobs have been running daily since then.

@nottulner

@dcid
I haven't observed it continuously either, but it doesn't seem to be growing extremely for me. With more users, of course, it will increase accordingly.

I execute the following commands daily:
* tootctl media remove
* tootctl media remove-orphans
* tootctl preview_cards remove --days 90
* tootctl emoji purge
* tootctl accounts cull

@thomas

Sign in to participate in the conversation
Noc.Social

Open Source Social Network. Focused on technology, networking, linux, privacy and security, but open to anyone. Civil discourse, polite and open. Managed by the noc.org team.