Optimisation and caching for a small NAS (Helios64)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 20.0.7
Operating system and version (eg, Ubuntu 20.04): Armbian 21.02.1 Buster
Apache or nginx version (eg, Apache 2.4.25): nginx/1.14.2
PHP version (eg, 7.4): 7.3.19-1~deb10u1

Just feeling the UI is laggier than I would expect, much more than the OMV UI.
Exploring the server tuning section in the docs, I’d just like to know 2 things.

A. Would it be better to store the Nextcloud database on the RAID5 array (7200rpm) along with the data? Or store it on the eMMC along with the system?

B. It looks like APCu is already enabled, but would it be advisable to use Redis for a small NAS like this (4GB Ram)? If so can anyone point me to a link describing installing and using Redis if both Nextcloud and Redis were in Docker containers? I have Redis installed and running in it’s own Docker via Portainer, but I cant seem to get them to communicate.


bei mir läuft es so (redis PS ist gespeichert im ENV file, Nextcloud DOcker hat natürlich viel mehr Einträge… hier reduziert auf relevante):

    image: redis:alpine
    container_name: dev-nextcloud-redis
    command: "redis-server --requirepass ${REDIS_HOST_PASSWORD}"
    restart: unless-stopped
    image: nextcloud:19.0.8
    container_name: dev-nextcloud-app
    restart: unless-stopped
      - dev-nextcloud-db
      - dev-nextcloud-redis
      - traefik_proxy
      - default

Hey there, thanks for the reply.
I eventually got Redis going by reinstalling everything using this docker-compose (portainer stack) script.

But I would still like to know the recommended location for the database for best performance.

I have the option of …

  1. On the RAID5 array (spinning disk). [The script has installed this way now]
  2. On the MMC along with the OS. (It was this way before using the script)
  3. On a SDcard by itself.

The eMMC has the fastest write access speed, but the docs recommend not having the database on the same drive as the OS.

generally speaking speed of the hard disk should NOT become the limiting factor for small system (database). modern hard disks read/write at >50MB/sec even for sequential reads… this should be enough for SOHO usage (don’t forget 1GBit/s LAN network saturates at 70MB/sec).

If you have enough RAM most likely the DB will fit into cache completely - so all requests are server from memory. write access is way to aggressive in MariaDB by default - it tries to flush the data to disk once a second. Personally I prefer to relax this timeout to 5-15sec - data loss of such short period is acceptable in private environment. this are settings from my system - I’m almost happy with the performance of my Nextcloud docker instance running on Qnap NAS (Celeron CPU) with both data and database on RAID5 spinning disks. I don’t remember exactly what the settings mean - please review if the fit for you.

innodb_buffer_pool_size = 256M
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 2
innodb_flush_log_at_timeout = 5
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 75