Nextcloud optimization

Hello

We want to optimize nextcloud server. Uploading slow down when upload larger files.

Needs all best practices steps to optimize nextcloud.

Please advise thanks.

Hello,

Can you please input more details for better understanding?

  1. Your Server Hardware Configuration
  2. Your Server Software Setup details (OS, what type of NextCloud installation, what add ons, etc)
  3. User count, concurrent active users?
  4. What else on the same server?

Stuff like that

Thanks.

Hi @zohaib09

This should give you a pretty good overview about possible optimisations for a Nextcloud server: https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html

2 Likes

Hi

  1. RAM 25 GB, CPU: 8 Core (4 cores per socket), 2345.594MGz, Disk 20 GB
  2. Debian 10 (Buster), It is simple installation nextcloud placed in /www/var/html/nextcloud with apache (no docker), Turn server installed, talk, collabora online office, storj.
  3. Users 10-12
  4. Nothing else

thanks

Well, maybe to simple then… Sorry but It’s hard to make any suggestions without more details.

Are you using PHP-FPM/Fastcgi and did you configure a local memory cache (Redis or APCu)?

These are the things I would configure / add first if you didn’t do so already.

Hi @zohaib09,

there is an option named chunck that cut your files into several files of the same size ( by default this size is set to 10 mb)

to change it you can do this :
sudo -u www-data php occ config:app:set files max_chunk_size --value ‘xxxx’

replace xxx by the result of 10x1024x1024 , where 10 is for 10 mb

if you use antivirus for files app you have to define the streamlength of the app with the same or higher value that you have defined

I can not check current chunk setting. I am trying to use:

sudo -u www-data php /var/www/nextcloud/occ config:app:get files max_chunk_size

It simply “reports” a blank line.

Any ideas how to/where I can check my current setting? I am a bit old school, so I prefer to know what i got before i change :-/

@pTmix it means there is no value for the chunk size, so there is no limitation normally

@Mageunic Thanks for a quick reply (appreciated!).

Probably you are right, but i find it “strange” not to report anything.
So what you are saying is that the setting in my case is “–value 0” ?:

Like this:
sudo -u www-data php occ config:app:set files max_chunk_size --value 0

I wish there was a way to print this status. I have been searching the postgresql datbase tables, but without any luck :-/

1 Like

@pTmix yes try this line

if you retry this line :

it should return 0

1 Like

Yo, yes it did:

root@xxxxxx:~# sudo -u www-data php /var/www/nextcloud/occ config:app:set files max_chunk_size --value 0
Config value max_chunk_size for app files set to 0
root@xxxxxx:~# sudo -u www-data php /var/www/nextcloud/occ config:app:get files max_chunk_size
0
root@xxxxxx:~#

I wonder if i fu**ed up my own “control” last day as i did a:

root@xxxxxx:~# sudo -u www-data php /var/www/nextcloud/occ config:app:set files max_chunk_size (then pressing enter)
Config value max_chunk_size for app files set to

Meaning it can look like occ actually does a “set to…” and nothing after means a “–value 0” ?

@pTmix

I don’t really know if nextcloud consider this as 0 but this value means ‘null’ so there is no value

in /…/nextcloud/apps/files/lib/App.php
there is this line

$maxChunkSize = (int)Server::get(IConfig::class)->getAppValue('files', 'max_chunk_size', (string)(10 * 1024 * 1024));

but I don’t know how it is interpreted with a null value (empty)