Home | Notifications | New Note | Local | Federated | Search | Logout
Note Detail
Reply to @pernia@ryona.agency
silverpill@silverpill@mitra.social (2026-09-02 04:59:51)
@pernia @mischievoustomato @pwm @phnt @kirby @p @lain @meso @graf You're right, mitra stores most data in a normalized form. Reactions are not just a number though, there is a separate table for them: https://codeberg.org/silverpill/mitra/src/commit/c2d3697c3fa0bf1ae41575504094ee340ce16c12/mitra_models/migrations/schema.sql#L256-L268
We also store some raw activities and objects, but they are pruned aggressively and don't take much space.
This may explain the difference in database sizes, I don't know enough about pleroma to say for sure.
---Reply---
Phantasm@phnt@fluffytail.org (2026-09-02 05:12:05)
@silverpill @mischievoustomato @pwm @kirby @p @lain @meso @graf @pernia Pleroma basically took the completely opposite extreme to what Mastodon did (normalizing everything into a very specific schema). The Pleroma schema is very simple and mostly stores raw AP Activities/Objects which causes the size difference per-post/reaction. What Mitra stores in a separate table (post content, visibility,...), Pleroma stores in a single jsonb column. reaction count, repeat count, like count, tags are all stored in the same jsonb blob along the original AP Object representation. There are some advantages to that, like not needing a join across different tables. jsonb is also slightly larger because it is a pre-parsed json representation.
The split activities/objects table schema also introduced more DB size as there are more indexes needed for it to work. It's too late to deeply optimize and normalize the schema now, maybe with the eventual Pleroma 3.0 some day in the likely distant future and an hours/days long data migration.
Reply
---Replies---
Phantasm@phnt@fluffytail.org (2026-09-02 16:09:08)
@silverpill @graf @kirby @lain @meso @mischievoustomato @p @pernia @pwm Also a fun sidenote. Apparently Mastodon despite it heavily normalizing AP, their databases are size comparable to Pleroma and possibly even bigger. Somewhat recently someone using Mastohost complained that after half a year of running the instance, the DB was already 40GB. So it's not just jsonb = bloat.