Slow performance generally with NC 12

my install runs with debian and apache, so i can’t help you with ngnix.
with the default configuration of nextcloud (and its dependent components) i was (very) disappointed regarding its performance, also, especially since one of my users shares a lot of images (90GB) and i had intened it as a kind of replacement solution for gallery2.
the server-hardware is not too bad (14GB RAM, quadcore-xeon), but users experienced wait-times of several minutes just looking at gallery topdirs etc.
i configured php-opcache, which did not help noticeably.
what really boosted performance and and solved the problem was giving huge amounts of memory to mariadb and installing and running the preview app.
mariadb: (Server version: 10.1.26-MariaDB-0+deb9u1 Debian 9.1)
server.cnf (these values are used for ALL dbs running)
i doubled the values of the section “Fine Tuning” so that it now contains:
key_buffer_size = 32M
max_allowed_packet = 64M
thread_stack = 384K
thread_cache_size = 128

and changed/added some values in the sectioon Query Cache Configuration:
# Query Cache Configuration
query_cache_limit = 64M
query_cache_size = 48M
join_buffer_size = 16M
tmp_table_size = 32M
max_heap_table_size = 32M

and added some extra-vars for innodb:
# EXTRA-vars
innodb_buffer_pool_size = 2G
#innodb_buffer_pool_instances = 2
innodb_buffer_pool_instance = 2
innodb_log_buffer_size = 32M
innodb_log_file_size = 512M
innodb_max_dirty_pages_pct = 95
# innodb_flush_log_at_trx_commit = 1
# !!! 0 kills ACID-compliance
innodb_flush_method = O_DIRECT

if you use mariadb/mysql adjusting those settings might help; (please adjust them to your system)

there is some info here: server and here innodb

the preview app is …well, kind of interesting ,… but since it has generated all the previews the gallery really is impressingly fast. that’s a serious pro for me.
the drawbacks:
-about 95GB of (image)files created 82GB of previews
-preview-generation took ~40hours
-broken/unreadable imagefiles caused the process to quit without an errormessage. i could then see in which virtual folder the process had failed, look at all the pix with the web-interface and delete the one(s) that had caused the failure. luckily, the storage is quite structured.

GOOD LUCK!

3 Likes