Storage on home Server

Hey there,

I’m pretty sure, this question has been answered somehow already, but I’m not finding the correct thread. If this is the case, please point me in the right direction.

Right now I have a home server with an adequate connection (100 mbit down/40mbit up) but the number of users on my nextcloud instance is growing, so I am thinking about moving the nextcloud instance to a vserver, for performance reasons.
But the data stored on the nextcloud instance is about 5TB and I would like to avoid high costs for storage.

Is there a preferred design to run nextcloud on a vserver and have ncdata on my home server (maybe mount the directory of my homerver to the vserver)?

Thank you very much for your help.
Samuel

Yes. You can use on a vserver an external storage from your home server.
But that does not really improve the speed. I think your server than got more worse.
My preferred design is not to use it :wink:

I think you have got some possibilities.
Find the real bottleneck of your nextcloud. Perhaps it is not the download/upload.
Test speed e.g. with https://fast.com .

Then:
a.) Improve your home server with removing your bottleneck.
or
b.) Move all to a VPS or nextcloud hoster in the internet
or
c.)
Perhaps you can combine a.) and b.) But that makes only sense if you can host perhaps 90% of all data at home and these 90% of data are rare accessed (like an archive). 10% of the data then hosted on the internet and these data are mostly accessed.

If c.) there are different models.

Thanks for your response.

I would love to figure out the bottleneck, but I think it is not the connection:

Do you have suggestions on how to find the bottleneck? That would be awesome.

Otherwise for option c).
Most of the users sync their files with the clients, but the Interface for calender, Collabora is really unresponsive. I don’t know how to find out which files are accessed frequently and which are not.

Thanks for your help and best wishes!

Please test and post:

top
htop (change to memory)
free -m

Look:

https://docs.nextcloud.com/server/19/admin_manual/installation/server_tuning.html

Perhaps:

Transactional file locking — Nextcloud latest Administration Manual latest documentation

Thanks,

I did all the stuff in server tuning including redis.
Now my instance is a little bit faster.

Maybe I found the bottleneck to be the backup process which takes around 18hours/day and binds about 30% of the cpu.

I will use this setup for now, I guess…

Thank you very much for your help!

Perhaps you like to write something about the backup process. 18 hours is not normal :wink: Perhaps 18 minutes in the night :wink: :wink:

I’m not sure.
The backup is a pretty normal borg backup. All backups run pretty fast, because there are not so many files but the backup of ncdata runs really long:

Aug 02 03:25:40 balkonien borg_auto.sh[6749]: borg 1.1.9
Aug 02 03:25:40 balkonien borg_auto.sh[6749]: Starting backup for 2020-08-02T01:50+02:00
Aug 02 03:25:40 balkonien borg_auto.sh[6749]: 2020-08-02T03:25+02:00 Backing up System
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Archive name: balkonien-system-2020-08-02T01:50+02:00-6749
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Archive fingerprint: e599938f0fd19a850eacf2099edb03097f355178bc037844ad178e4f57e4b14e
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Time (start): Sun, 2020-08-02 03:25:52
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Time (end):   Sun, 2020-08-02 04:31:45
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Duration: 1 hours 5 minutes 53.64 seconds
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Number of files: 4532031
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Utilization of max. archive size: 2%
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 04:34:34 balkonien borg_auto.sh[6749]:                        Original size      Compressed size    Deduplicated size
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: This archive:              147.37 GB             82.93 GB            922.64 MB
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: All archives:               69.36 TB             65.13 TB              4.49 TB
Aug 02 04:34:34 balkonien borg_auto.sh[6749]:                        Unique chunks         Total chunks
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: Chunk index:                 3028579            102376836
Aug 02 04:34:34 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 04:34:35 balkonien borg_auto.sh[6749]: 2020-08-02T04:34+02:00 Backing Up Medien
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Archive name: balkonien-Medien-2020-08-02T01:50+02:00-6749
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Archive fingerprint: 911a18f50a83dbcb8dcfd76b5d8035bba1a9eeb62b808fdef5aa7ae33a7c8545
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Time (start): Sun, 2020-08-02 04:34:37
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Time (end):   Sun, 2020-08-02 05:02:11
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Duration: 27 minutes 34.40 seconds
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Number of files: 250332
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Utilization of max. archive size: 0%
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 05:04:58 balkonien borg_auto.sh[6749]:                        Original size      Compressed size    Deduplicated size
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: This archive:                1.75 TB              1.73 TB              5.11 GB
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: All archives:               71.10 TB             66.86 TB              4.50 TB
Aug 02 05:04:58 balkonien borg_auto.sh[6749]:                        Unique chunks         Total chunks
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: Chunk index:                 3030769            103254855
Aug 02 05:04:58 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 05:04:59 balkonien borg_auto.sh[6749]: 2020-08-02T05:04+02:00 Backing up ncdata
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Archive name: balkonien-ncdata-2020-08-02T01:50+02:00-6749
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Archive fingerprint: 3656778c78276b6715fa8c60c60424b5141ff92b32737d6358aadd32bbeae596
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Time (start): Sun, 2020-08-02 05:05:00
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Time (end):   Sun, 2020-08-02 19:24:15
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Duration: 14 hours 19 minutes 14.06 seconds
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Number of files: 753448
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Utilization of max. archive size: 0%
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------
Aug 02 19:27:03 balkonien borg_auto.sh[6749]:                        Original size      Compressed size    Deduplicated size
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: This archive:                2.33 TB              2.20 TB            343.03 MB
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: All archives:               73.46 TB             69.09 TB              4.50 TB
Aug 02 19:27:03 balkonien borg_auto.sh[6749]:                        Unique chunks         Total chunks
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: Chunk index:                 3032674            104839559
Aug 02 19:27:03 balkonien borg_auto.sh[6749]: ------------------------------------------------------------------------------

Because of the size it seems

balkonien-ncdata includes balkonien-Medien

Can you check this?
Perhaps it also includes older backups.

I looked into this, but it doesn’t seem like ncdata includes Medien.

I checked by looking at mount | grep ncdata and mounting the ncdata backup directly.

I couldn’t find any hint that ncdata contains Medien.

But now I’m wondering myself why ncdata takes ages to be backed up.

A very nice tool for compute the size of directorys is “ncdu”.
Perhaps you can install it and surf the directorys for correct dir-sizes.
Do it match with your nextcloud size and backup size?
Find huge dirs with backup in backup …

ncdu

Thanks for this recommondation.
ncdu is an awesome tool. But unfortunately it didn’t find the reasons for the neverending backups. The dir sizes match exactly the ones shown in the nextcloud “user” overview.

I wonder why the backup of ncdata is so much slower than Medien, because Median has a size and filenumbers of the same magnitude and both are stored on the same btrfs volume (different subvols).

I found the solution for the endless backups.
There was a daily cronjob chmodding and chowning the files in the nextcloud data dir.
This cronjob was a recommondation someday (No hardened file permissions recommended anymore?).
Now i deactivated the job and the backup is running very fast.