I'm deploying Typesense using a btrfs mount point....
# community-help
ó
I'm deploying Typesense using a btrfs mount point. I'm facing an issue where it seems like the typesense process keeps deleted files opened, so btrfs doesn't remove them phisically from the fs. If I stop the process, I can get rid of them. But I can't do it often, as it takes up to 2 hours to restart (5M documents in one collection, 50Gb of ram). This is causing us to use really big drives + compression to mitigate this issue. And when having to reindex every document, such as I have to do because the
symbols_to_index
per field not working and I have to create the whole collection with that setting. And then insert the 5M+ which creates a lot files. This causes the size to raise up to 500Gb, even tho the fs reported file size is around 90Gb. But since the deleted files aren't released, the fs doesn't truly deletes them until everything breaks and we have to manually intervene. Could you take a look?
j
CC: @Kishore Nallan
k
All the files in the
state
directory are managed by the raft library we use (
braft
). Just tried running that command on a couple of large boxes but we don't see a similar issue. We don't use
btrfs
though so I don't know if there is an issue tied to that.
ó
In brtfs, deletes are logical. So if it is not released properly, it won't be able to clean it up
I guess that's the key
k
Okay, we might have to raise a upstream issue on the braft project, but I'm not sure how/when it will be picked up.
ó
yeah, no problem. I'll keep investigating
Meanwhile, is there a way to for the regular snapshots after a db compaction? To speed up the process of deleting files without restarting the process
Do you use ext4 or xfs?
k
We use both
🤘 1
ó
We'll plan for migrating then, thanks!
👍 1