Hello,
I have 4 users on my Owncloud Infinite Scale instance 8.0.1 (Docker)
User A (Personal space) : 500GB
User B (Personal space) : 220GB
User C (Personal space) : 100GB
User D (Personal space) : 0GB
Shared Space : 100GB
I disabled files versioning and made a purge (but it seems that my files still have revisions)
I emptied all trash bins
My owncloud config and storage is monted on a ZFS (/data).
Owncloud is the only service using this ZFS I have ocis-data and ocis-config in my /data corresponding to /var/lib/ocis and /etc/ocis.
There is a first thing that I don’t understand : my ZFS is using 2.52TiB (no snapshots) which is way larger than all my files hosted on owncloud.
Second thing is the huge number of blobs in my instance : I used to just rsync a temporary zfs snapshot to another disk but it took a whole week to compare and copy the 2.6 millions blobs.
Now I create a .zfs snapshot on my server and stream it to the other disk which is way faster but it means that I need twice the space of the zfs snapshot on the backup disk because I don’t want any moment without a working backup.
I need help investigating why so much space is wasted (I suspect the files revisions) and how to properly remove every revisions of file as I don’t need them.
What I tried :
ocis revisions purge -v -p /var/lib/ocis/storage/users
But it only remove 3100 blobs and I still have many revisions on my personnal workspace
Thank you
Each uploaded file will have, in addition to the blob file, an empty lock file, a metadata file (.mpk), and a soft link from the FS tree to the blob. Although the size of those files are small, it’s a lot of nodes. I don’t think it should take a lot of space though.
I suspect the search index data is what is taking the space. I’m not sure if it’s already available but there should be a cli command to optimize the search index (I think it will come with oCIS 8.1).
The other thing that could take a lot of space is the natsjs service. I think, by default, it will keep all the events and data for an unlimited amount of time. Unfortunately, you’ll need to configure the retention yourself. You can use GitHub - nats-io/natscli: The NATS Command Line Interface · GitHub to connect to where the natsjs service is, and then configure it.
1 Like
Thank you for the help,
I will configure natsjs and remain up to date concerning the upcoming cli tool.
I think that natsjs is a good lead because it reminded me that little by little my ocis was slower to start because it was waiting for jetstream to start. Currently it takes 15 minutes for jetsream to start
and i receive 132727 messages : {"level":"info","service":"nats","time":"2026-05-26T08:41:25Z","line":"github.com/owncloud/ocis/v2/services/nats/pkg/logging/nats.go:21","message":" Restored 132,727 messages for stream '$G > KV_activitylog' in 13m12.062s"}
In the meantime, I cleaned my pending uploads and saved 300GB on my storage.
I really do think that my file versioning is also a problem as my Windows Document folder is synced between my computers using ocis and some programs tend to write files in this folder.
For instance I have hundreds of versions of some Da vinci resolve data files
I’m looking for a way to remove all files version (except for the latest of course). When I tried ocis revisions purge -v -p /var/lib/ocis/storage/users it removed som blobs but not everything, I still have many file revisions existing in my personal space and I’m looking for a way to clean that
@aLitschgy did the revisions purge command show some errors when you ran it? It is supposed to remove all revisions. That means running find /var/lib/ocis/storage/users/spaces -name “.REV.” is supposed to return no results after a purge.
Regarding slow jetstream start: We’ve seen this also. It is caused by nats buckets getting too large. Solution is to set a TTL on the nats kv stores: OCIS_PERSISTENT_STORE_TTL=720h (this can also be done later via nats cli)
For immediate remediation I would advise to just purge activitylog store: nats stream purge KV_activitylog But please be aware that this will remove all activities on all items. If you still need them please do not purge it.