GridFS vs Filesystem storage

Does anyone know what are the clear benefits of using MongoDb’s GridFS file storage as compared to the Filesystem storage?

Thank you.

It’s easy to setup/use :slight_smile:

Beyond that use some form of local file storage.

GridFS is fine for small low use environments but it doesn’t scale and you will hit performance issues quite quickly.

The primary benefit is using GridFS is the migration part. you don’t need to worry about the migration of data as data is stored as chunks in the collection itself. But yes it doesn’t scale and will cause performance issues.

1 Like

Correct. If you move the server elsewhere the data is in the database.

1 Like

Great, Thank you. Now I understand.

1 Like

On my small ARM server when I used Filesystem storage users on iOS couldn’t watch videos and the slider of voice messages didn’t work anywhere. When I switched to GridFS new videos and voice messages worked as intended (except the voice message slider on android that didn’t work anyway). I think that’s because of the way files are stored in GridFS, in chunks, and on my small server that avoided the stall we experienced with Filesystem storage.

It might be a little more complicated, but quite possibly so.

On small devices there may be other issues with writing to the storage - it depends what the storage type is.

But if you start to scale your server it is pretty well the first thing to fix to increases performance.

1 Like

Hi @bmwas , glad to see you coming back to our forum :smiley:

Since your question’s been answered, please select the post that you think was the most helpful to you.

This helps us and many others (possibly newcomers) to distinguish between unsolved and solved threads without having to read every single post.

I will track this post for a couple more days before marking it solved myself.

This is really really important. I’d really appreciate if you help me with this :slight_smile: Many thanks!!

1 Like

I have that issue too, using Filesystem as I host my Rocket.chat on a Raspberry Pi 4.
The filesystem is on a usb key and, if I can say performances are good (10 users only), the bug with audio files on mobile apps is very very annoying.
As it is used by a music group, the chat quickly got less attractive even in lockdown times when everybody noticed it is not possible to read entire audio files, and there is no slider, and counter is stuck at 00:00.

If anyone has a solution, I would LOVE it.

Greg

Hi Monsieur_KoZo,

Can you please open another issue with the relevant details from the template provided here ? -

Sign in to GitHub · GitHub

Your topic isn’t related to the one of this thread and possibly deserves its own thread. We can have a discussion there.

In the meantime, I’m going to close this thread to not incur any further off-topic discussions.

Thanks :slight_smile:

1 Like