Nextcloud performance very slow

  • Hi - I have installed Nextcloud via Docker image and Nginx reverse proxy (also Docker). It all works but performance is really poor.

    Loading the Nextcloud dashboard takes 10-15 secs.

    Every switch from NC-Dashboard to NC-Files or any other NC app also takes 5-10secs.

    Also the Android app NC-Talk takes 5-10secs to connect to the server.


    I am running on a Dual-core AMD Turion II Neo (64-Bit) processor with 8GB Ram (of which only 2 is used most of the time). Also have fast SATA HDs (Seagate Barracuda) and 1GB/s Network. So the hardware should not be the problem.


    Any ideas?

    OMV4 on ProLiant N54L + 5 x 3.5'' WD/Seagate HDs

    OMV5 on Raspberry Pi4

  • Surprised you've not had any replies there are quite a few who use Nextcloud, I did a search and what you're experiencing did come up in the Nextcloud forum, along with various workarounds.

    Raid is not a backup! Would you go skydiving without a parachute?

  • I don't know why, but in my experience, it is very slow at first.. I have no idea why though. I've set up nextcloud many times, and every time it would seem like I was stuck in hourglass hell with it for at least a couple hours.. then all of a sudden.. it would start to function normally and get much better. You might check your settings (Admin/Settings/Overview) and see if it is showing errors.. it probably is. I'm not sure if fixing these will speed it up faster, but mine always seems to really start working properly about an hour or so after installing


    What browser are you using?

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Hi,


    I notice that issue as well.

    If I use the official docker Nextcloud with Ubuntu 18, it loads faster compare to the linuxserverio image on Debian 10.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • Hi,


    I notice that issue as well.

    If I use the official docker Nextcloud with Ubuntu 18, it loads faster compare to the linuxserverio image on Debian 10.

    I use the Linuxserver image... and honestly after about that first hour... it runs perfectly fine, even on my 8yr old server.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • The Linuxserver.io Nextcloud image is a PITA.

    It working on OMV, but not on AWS or Google Cloud.

    Not work on either Debian or Ubuntu at all !

    error:

    Code
     Your connection isn't private

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • I use the Linuxserver image... and honestly after about that first hour... it runs perfectly fine, even on my 8yr old server.

    Mine is still slow after many days . Have you tried one of the NC apps? For android e.g. they run especially slow. Need 20secs to connect to NC server.

    OMV4 on ProLiant N54L + 5 x 3.5'' WD/Seagate HDs

    OMV5 on Raspberry Pi4

  • Mine is still slow after many days . Have you tried one of the NC apps? For android e.g. they run especially slow. Need 20secs to connect to NC server.

    No, I just use Chrome on my Android. I didn't care for the App

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • I also had problems with slow Nextcloud in the beginning. In my case, it was related to a bad installation of Collabora Online. If your installation does not recognize the built in CODE server, it will get very slow.

    Try to deactivate the two Collabora apps, and see if it gets better. If yes, first reinstall the CODE server, then the Collabora Online app, then check if the CODE server is recognized.

  • Mine is still slow after many days . Have you tried one of the NC apps? For android e.g. they run especially slow. Need 20secs to connect to NC server.

    If you log in as an admin user, Settings/Basic Overview... are there any Security & Setup warnings at the top?

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • No warnings. Just very very slow. The initial start into the chat app e.g. can take up to 1 minute

    I'm running on a RPi4 4Gb and is working rather fast (for a SBC) but only after changing some things.


    How did you set your NC???

    If through Docker (as in macom Nextcloud with SWAG....) then maybe there's some tunning you can do/check:


    REDIS is a nice add-on to the stack, if you don't have it yet.

    If you use mainly for Photos (Google Integration, for ex) or DCIM phone folder sync to server, one app that is a must-have on NC, is "Preview-Generator"

    I did the initial "GENERATE-ALL" which took forever (had already integrated almost 20k photos to NC before running it) and then the CRON JOB "occ Preview:Pre-Generate" but it speeded up my media browsing tenfold.


    Also maybe you could see the error/access/php/ logs and see if there's mention to where/what might be the bottleneck.

    What comes to mind immediately is "server reached pm.max_children"


    And have you tried to see the output of this: https://scan.nextcloud.com/



    Good luck

  • Yes, I am using a docker container for NC, mainly for document sharing and the chat app "talk. All of that is extremely slow.

    Also maybe you could see the error/access/php/ logs and see if there's mention to where/what might be the bottleneck.

    What comes to mind immediately is "server reached pm.max_children"

    And have you tried to see the output of this: https://scan.nextcloud.com/

    The scan output shows A+, so no issues.

    I cannot find error/access/logs . Do you know where this is located?

    OMV4 on ProLiant N54L + 5 x 3.5'' WD/Seagate HDs

    OMV5 on Raspberry Pi4

  • Yes, I am using a docker container for NC, mainly for document sharing and the chat app "talk. All of that is extremely slow.

    The scan output shows A+, so no issues.

    I cannot find error/access/logs . Do you know where this is located?

    Depends on how you set the volumes for nextcloud.


    My path is: /srv/dev-disk-by-label-DATA/appdata/nextcloud/config/log/nginx

    and /srv/dev-disk-by-label-DATA/appdata/nextcloud/config/log/php


    You'll have to adjust accordingly. But don't bash to the container, search it on the terminal.

  • Have to chip in and state that I also experience extremely slow performance.


    And even still after all of the following tweaks:


    /config/www/nextcloud/config/config.php


    /etc/php7/php.ini

    /config/nginx/site-confs/default

    Code
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    client_max_body_size 0;
    fastcgi_buffers 64 4K;

    etc/php7/php-fpm.d/www.conf

    Code
    pm = dynamic
    pm.max_children = 64
    pm.start_servers = 8
    pm.min_spare_servers = 4
    pm.max_spare_servers = 12

    mysql - custom.cnf

    Code
    [mysqld]
    tmp_table_size = 64M
    innodb_buffer_pool_size = 1G
    key_buffer_size = 64MB
  • Have to chip in and state that I also experience extremely slow performance.

    Yeah, I'm sure that it will be super fast, on a google/nextcloud paid server, ;)


    Or maybe you can tell us, on which hardware you're running Nextcloud.


    For starters:

    Don't know the rest of this, but it implies a s* load of other pre-stuff you need to do to have it (not)hogging you're hardware:

    'enable_previews' => true

    I'll leave you just a link so you have food for thoughts.



    Oh, and this:

    'memcache.local' => '\\OC\\Memcache\\Redis',

    Maybe is better to change to APCu.


    Quote

    If you want to connect to Redis configured to listen on an Unix socket (which is recommended if Redis is running on the same system as Nextcloud) use this example config.php configuration:

    Code
    'memcache.local' => '\OC\Memcache\APCu',
    'memcache.distributed' => '\OC\Memcache\Redis',
    'redis' => [
    'host' => '/run/redis/redis-server.sock',# Only this is needed (can be the name of the container instead).
    'port' => 0,# And this (usually port 6739) are needed.
    'dbindex' => 0,# ?!!? Do you even know what this is for?!!?
    'password' => 'secret',# And the password? Have you set it in the container?
    'timeout' => 1.5,# For this one I could use some explaining, :)
    ],

    Only “host” and “port” variables are required, the other ones are optional.

    But, what do I know....


    Also, if you're making changes to php.ini and www.conf (which are only available bashing into the containers), they will be reseted once you restart the containers.


    For changes to be made to both files, you'll need to edit "php-local.ini" && "www2.conf" on the config folder of Nextcloud, (sudo find /srv/path/to/nextcloud/config | grep filename) ;)


    The pm configuration is all done in the "www2.conf" and then, docker restart nextcloud


    You could consider "pm=ondemand" instead of dynamic:

    At the cost of some CPU cycles, when it's most needed, you'll spawned only the children you need at the time it's needed.


    Unless you're not on docker, and I just waisted some Latin....


    But, yes, Nextcloud is slow and I won't use it anymore, specially on docker/debian/linux/cheap equipment.


    I'm going to stick with paid services, :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!