Koozali.org: home of the SME Server

Owncloud/Nextclloud slow?

guest22

Owncloud/Nextclloud slow?
« on: August 22, 2016, 07:42:34 AM »
Hi,

when I visit either demo of owncloud or nextcloud from their websites, the demo's seem to be much more responsive then my install.

The machine I'm running it on has 4Gb of RAM, 8 cores and 1Gb connection.

When navigating from directory to directory (files) the spinner stays for at least 2 to 3 seconds, which is, I think, way too long compared to the above mentioned demo's.

Where should I look pls?

Online Stefano

  • *
  • 10,839
  • +2/-0
Re: Owncloud/Nextclloud slow?
« Reply #1 on: August 22, 2016, 08:39:18 AM »
Install atop and see what happen when you browse your files

guest22

Re: Owncloud/Nextclloud slow?
« Reply #2 on: August 22, 2016, 08:40:06 AM »
I did, httpd is consuming 20-30% on 4 cores.....

Online Stefano

  • *
  • 10,839
  • +2/-0
Re: Owncloud/Nextclloud slow?
« Reply #3 on: August 22, 2016, 09:47:30 AM »
this is not enough to diagnose your issue..

what about I/O?

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Owncloud/Nextclloud slow?
« Reply #4 on: August 22, 2016, 02:03:23 PM »
There's a link in the admin section under 'Tips & Tricks' for 'Performance Tuning':
https://doc.owncloud.org/server/9.1/go.php?to=admin-performance

Since (I think) v8.2 I found that installing and enabling 'memcached' and 'apcu' increased performance tremendously.

Prior to that I had also seen a tremendous speed improvement from enabling 'asset pipelining':
https://doc.owncloud.org/server/8.0/admin_manual/configuration_server/js_css_asset_management_configuration.html

(although asset pipelining conflicts with the 'ownnote' addon)

[edit]
Note that 'memcached' seems touchy - it caused some problems in 9.0 that were fixed in 9.1 that I'm seeing again in OC 9.1.0.15 - the 'apps' results are blank of memcached is enabled: https://github.com/owncloud/core/issues/23076

« Last Edit: August 22, 2016, 02:19:10 PM by mmccarn »

guest22

Re: Owncloud/Nextclloud slow?
« Reply #5 on: August 22, 2016, 02:09:42 PM »

Thanks Michael,


I have redis installed and enabled asset pipeling.


Assets does not work in the sence that no link works any longer, so I've put that away for later.


Memcached is alreay on there for the Sogo contrib is installed.


How's your setup's. How long does the spinner show traveling through the dir structure only?

There's a link in the admin section under 'Tips & Tricks' for 'Performance Tuning':
https://doc.owncloud.org/server/9.1/go.php?to=admin-performance

Since (I think) v8.2 I found that installing and enabling 'memcached' and 'apcu' increased performance tremendously.

Prior to that I had also seen a tremendous speed improvement from enabling 'asset pipelining':
https://doc.owncloud.org/server/8.0/admin_manual/configuration_server/js_css_asset_management_configuration.html

(although asset pipelining conflicts with the 'ownnote' addon)

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Owncloud/Nextclloud slow?
« Reply #6 on: August 22, 2016, 03:02:18 PM »
After hitting <enter> on the login screen it takes 14 seconds to show the file list.

Navigating from folder to folder after login I get the spinner for 1 - 2 seconds for 'local' folders and 2 - 4 seconds for SMB/CIFS folders mounted using files_external - although none of my folders have more than a couple hundred files, and most have much less.

It took 5-6 seconds to load my network home folder ("106 folders and 310 files"), which is an smb/cifs mount via files_external.

The setting of asset-pipeline.enabled didn't seem to make any difference.

I'm running OC 9.1.0.15 on Ubuntu 14.04 / php 5.5.9 / mysql 5.5.50 / apache 2.4.7 / php-apcu 4.0.7 / memcached 2.1.0-6



guest22

Re: Owncloud/Nextclloud slow?
« Reply #7 on: August 22, 2016, 03:17:38 PM »
Thanks Michael,

all that tells me that we are missing something....

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Owncloud/Nextclloud slow?
« Reply #8 on: August 22, 2016, 04:35:49 PM »
In case this helps - my OC server is hosted on a reasonably new & hefty vmware install ( EMC vnxe3200 / 3 x Cisco UCS C22 hosts). 

The owncloud VM is configured with 6GB RAM & 2 CPUs.

Here are some config settings that might be useful to you; I have a staging server on which I can make experimental config changes if you see something you'd like me to test.

Code: [Select]
# sudo -u www-data ./occ app:list
Enabled:
  - activity: 2.3.2
  - comments: 0.3.0
  - dav: 0.2.5
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.6.0
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.10.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 15.0.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
  - user_external: 0.4
Disabled:
  - documents
  - encryption
  - external
  - files_antivirus
  - files_texteditor
  - files_trashbin
  - files_versions
  - news
  - user_ldap

Code: [Select]
# sudo -u www-data ./occ config:list
{
    "system": {
        "instanceid": "ocojcz4c8jtx",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.1.7",
            "vcloud.-REMOVED-.org"
        ],
        "datadirectory": "\/vcloud\/data",
        "overwrite.cli.url": "",
        "dbtype": "mysql",
        "version": "9.1.0.15",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "-REMOVED-",
        "user_backends": [
            {
                "class": "OC_User_IMAP",
                "arguments": [
                    "{mail.-REMOVED-.org:993\/imap\/ssl\/novalidate-cert\/notls\/readonly}"
                ]
            },
            {
                "class": "OC_User_IMAP",
                "arguments": [
                    "{MAIL.-ALSO-REMOVED.TLD:993\/imap\/ssl\/novalidate-cert\/notls\/readonly}"
                ]
            }
        ],
        "maintenance": false,
        "forcessl": true,
        "forceSSLforSubdomains": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "vcloud-noreply",
        "mail_domain": "-REMOVED-.org",
        "mail_smtphost": "mail.-REMOVED-.org",
        "loglevel": 3,
        "logtimezone": "America\/New_York",
        "log_authfailip": true,
        "log_rotate_size": 104857600,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Memcached",
        "memcached_servers": [
            [
                "localhost",
                11211
            ]
        ],
        "cache_path": "",
        "knowledgebaseenabled": true,
        "enable_avatars": true,
        "allow_user_to_change_display_name": true,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\PDF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Photoshop"
        ],
        "asset-pipeline.enabled": true,
        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": true
            },
            {
                "path": "\/var\/www\/owncloud\/apps--REMOVED-",
                "url": "\/apps--REMOVED-",
                "writable": false
            }
        ],
        "xframe_restriction": true,
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updatechecker": false,
        "activity_expire_days": 3652,
        "enable_certificate_management": true
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.3.2",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "254"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "global_cache_gc_lastrun": "1438794242",
            "installedat": "1426370014.6894",
            "lastcron": "1471875302",
            "lastupdateResult": "[]",
            "lastupdatedat": "1471828502",
            "oc.integritycheck.checker": "{\"files_external\":{\"INVALID_HASH\":{\"lib\\\/Lib\\\/Storage\\\/SMB.php\":{\"expected\":\"6edee93afab0d376a8c33320a270f52da18d1a9242b7b3817817ce4dc18275010edc41d33a9a6f6b4d7e492cca54dbf94ec07bc0dae0170c37000a088512d922\",\"current\":\"2d832cecf6cacf12a00e220f4a5f0dc1b54aa90b03dc8604e4698ca5b6d3fca1cf92f83d604f4476c74dd5dac7b246b95b06fee57c513a2f3285c0366bcf6cb3\"}}},\"user_external\":{\"INVALID_HASH\":{\"lib\\\/imap.php\":{\"expected\":\"d4ebccdc4a2f2a97456c666ef6f6608ed631ceaee3f605e270df88be08a1c3e2c3b6944f07a271612bc6fa79b708c0d9a2ee54b310e68255c415f46904665efa\",\"current\":\"8c8bd0fb53e94920c1b773dfdafb7fea7d223b9600ebcb328d72cbf36f232b5bc19ac6f2f13e81e226569cfc3e26ea7a73eb00da32bc306b216204a140c4d152\"}}}}",
            "public_documents": "documents\/public.php",
            "public_files": "files_sharing\/public.php",
            "public_gallery": "gallery\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "remote_caldav": "dav\/appinfo\/v1\/caldav.php",
            "remote_calendar": "dav\/appinfo\/v1\/caldav.php",
            "remote_carddav": "dav\/appinfo\/v1\/carddav.php",
            "remote_contacts": "dav\/appinfo\/v1\/carddav.php",
            "remote_dav": "dav\/appinfo\/v2\/remote.php",
            "remote_files": "dav\/appinfo\/v1\/webdav.php",
            "remote_webdav": "dav\/appinfo\/v1\/webdav.php",
            "repairlegacystoragesdone": "yes",
            "shareapi_allow_mail_notification": "yes",
            "shareapi_allow_public_notification": "yes",
            "shareapi_default_expire_date": "yes",
            "shareapi_enforce_expire_date": "yes",
            "shareapi_expire_after_n_days": "14",
            "umgmt_send_email": "true",
            "umgmt_show_backend": "true",
            "umgmt_show_email": "true",
            "umgmt_show_last_login": "true"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "0.2.5",
            "types": "filesystem"
        },
        "documents": {
            "converter": "local",
            "enabled": "no",
            "installed_version": "0",
            "ocsid": "168711",
            "types": ""
        },
        "external": {
            "enabled": "no",
            "installed_version": "1.2",
            "ocsid": "166046",
            "types": ""
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "default_quota": "5 GB",
            "enabled": "yes",
            "installed_version": "1.5.1",
            "types": "filesystem"
        },
        "files_external": {
            "\/-REMOVED-Home": "1440151125",
            "\/-REMOVED2-FTP": "1426973353",
            "\/-REMOVED3-FTP": "1452177557",
            "\/FS01-Departments": "1440151139",
            "\/FS01-Home": "1439808282",
            "\/FS01-MyHome": "1439899294",
            "\/FS01-Shared": "1440151133",
            "\/Google": "1435848373",
            "\/Google Drive": "1437251816",
            "\/Home": "1427040429",
            "\/-REMOVED4-RMG FTP": "1426954045",
            "\/NIC": "1439807609",
            "\/SMB": "1427040401",
            "\/Shared": "1427040425",
            "\/Shared2": "1426970323",
            "\/TEST": "1439895700",
            "\/_Departments": "1456713957",
            "\/_Home": "1456741704",
            "\/_Homex": "1456741197",
            "\/_Shared": "1456712192",
            "\/_Sharedx": "1456712252",
            "\/_Users": "1456695632",
            "enabled": "yes",
            "google::812524990203-REMOVED-": "423378",
            "installed_version": "0.6.0",
            "ocsid": "166048",
            "types": "filesystem",
            "user_mounting_backends": "owncloud,sftp,dropbox,googledrive,smb,\\OC\\Files\\Storage\\SFTP_Key,\\OC\\Files\\Storage\\SMB_OC"
        },
        "files_locking": {
            "enabled": "no",
            "installed_version": "",
            "types": "filesystem"
        },
        "files_mv": {
            "enabled": "no",
            "installed_version": "0.8.1a",
            "ocsid": "150271",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "0.8.1",
            "ocsid": "166049",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "0.10.0",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "no",
            "installed_version": "2.1",
            "ocsid": "166051",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "no",
            "installed_version": "0.6.3",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "no",
            "installed_version": "1.0.6",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "0.9.8",
            "types": ""
        },
        "files_videoviewer": {
            "enabled": "no",
            "installed_version": "0.1.3",
            "ocsid": "166054",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "1.1",
            "ocsid": "166055",
            "types": ""
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "15.0.0",
            "types": ""
        },
        "news": {
            "enabled": "no",
            "installed_version": "8.7.1",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging"
        },
        "ownnote": {
            "enabled": "no",
            "installed_version": "1.05",
            "ocsid": "168512",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "0.5.0",
            "types": "prevent_group_restriction"
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging"
        },
        "templateeditor": {
            "enabled": "yes",
            "installed_version": "0.1",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "0.2.1",
            "types": ""
        },
        "updater": {
            "enabled": "no",
            "installed_version": "0.4",
            "ocsid": "166059",
            "types": ""
        },
        "user_external": {
            "enabled": "yes",
            "installed_version": "0.4",
            "ocsid": "166060",
            "types": "authentication,prelogin"
        }
    }
}

guest22

Re: Owncloud/Nextclloud slow?
« Reply #9 on: August 23, 2016, 12:28:46 PM »
Thanks for that output and input.

It was mentioned somewhere that if dbhost is set to 127.0.0.1 it would be faster. Any chance you can test, here it makes no difference.

Btw: I notice that the occ commands on the cli have the same 'lack' in processing time, about 2 seconds....

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Owncloud/Nextclloud slow?
« Reply #10 on: August 23, 2016, 03:46:46 PM »
Ultimately, I would expect the Owncloud demo to be running on a multi-host cluster, with more visitors than you and I have on our systems, hence more likelihood that data is found in cache.

Having said that - I see no discernible difference between dbhost='localhost' and dbhost='127.0.0.1' on my staging server.
login: 16 sec
change folder: 1-2 sec
load network home folder (106 folders and 310 files): 8 sec

guest22

Re: Owncloud/Nextclloud slow?
« Reply #11 on: August 23, 2016, 04:54:52 PM »
Thanks Michael,


I still have a 'gut feeling' that we are missing something here. The speed should be considerably higher.


I have no proof and no leads, just the 'gut feeling'...


Is redis actually working for Owncloud, and have we set de proper parameters in the redis conf files?

guest22

Re: Owncloud/Nextclloud slow?
« Reply #12 on: August 24, 2016, 09:20:03 AM »
The setting of asset-pipeline.enabled didn't seem to make any difference.


Please see https://github.com/nextcloud/server/issues/215

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: Owncloud/Nextclloud slow?
« Reply #13 on: August 25, 2016, 12:43:03 PM »
Quote
Please see https://github.com/nextcloud/server/issues/215
Huh.  Time to turn off pipelining, I guess.  It made a huge difference for me in OC7, but doesn't seem to do much (if anything) in OC9.1

Quote
Is redis actually working for Owncloud,...
I don't have redis running on my server at all... only memcached & APCu.