Seafile server consumes 7 times more diskspace than required


#1

In my server’s webpage, I can see that the storage used is 85 GB. However, my Seafile server storage directory is about 600 GB!!

Could someone tell me how to tackle this problem?

Thank you.


#2

Running the Seafile Garbage Collector solved the problem. Consider this issue solved.


#3

I wonder, do you have any idea what causes such enormous amount of ‘garbage’ to be generated in the first place?
I have two servers that I’m syncing with seafile, and one of them is a Digital Oceans instance. The DO server does the same thing that you experienced. The server UI (not running on the DO server) reports about 40gig of data synced while the filesystem reports 500gig (a fut ll disk in my case). GC cleans it up well enough, but why does it generate so much ‘garbage’ to begin with? What is considered to be ‘garbage’?


#4

Another issue you could check is the trash from the admin panel. Deleted folders and files get thrown into the trash, much like the recycle bin on a computer or an email program. Deleting the trash, if any, will free up space.

To answer your question about garbage, it could be various things, up to and including space once used by Seafile, but no longer in use. Garbage collection, aside from cleaning up, also compacts the size of the repos and frees up space no longer in use by Seafile. At least that’s my understanding of it that I’ve obtained in the programming world.


#5

So, I guess that this amount of ‘garbage’ is what it is. Do admins generally run gc every night to keep ‘garbage’ from eating up their storage, as in running it from a cron job? Or are there methods that can minimize the creation of ‘garbage’. Is it that some directories have files/folders that are constantly changing, removing files/folders and creating new ones over and over. Can this sort of activity create ‘garbage’?


#6

Pretty much anything can generate garbage. Updating files, deleting them, etc… Also, if you are versioning, then all the deleted files and changed files will have multiple version histories. You can turn history off for an individual library, set it to a certain number of days, or eliminate versioning altogether. You can do it in the UI, or you can configure it globally by adding this to your seafile.conf file:

[history]
keep_days = 30 # Number of days to keep version history

You can also set Seafile up to scan for trashed libraries every so often, and also, tell it how often to delete the trash.

[library_trash]
# How often trashed libraries are scanned for removal, default 1 day.
scan_days = 1

# How many days to keep trashed libraries, default 30 days.
expire_days = 10


#7

Some nice suggestions, thanks.


#8

Worth a try… My Seafile storage space is 214 gb right now, of which 204 gb are the actual size of the files. However, most of my syncs to the server are small files, such as programming projects, PDF’s, documents, etc, and I rarely, if ever, delete anything. I rarely run garbage collection.

The more you use Seafile to sync changes and delete things, the more that garbage collection becomes an issue. About 90% of my usage with Seafile is adding new files.