Making Nextcloud use more ram to speed up

I’ve set up Nextcloud 16 on my Ubuntu 18.04 LTS server a while ago and made it work with all recommended caching tools. However, as the server only has slow HDDs but 32 GB of ram which is mostly unused I wondered if there is a way to force nextcloud to use a large portion of said ram to increase speed.

You can try to give the database and caching programs enough RAM so they don’t need to use the disk that often. With top, you see the process list of all processes on your computer and there is a io-wait value that indicates that you wait for the processes to access the disk. With iotop you have more detailed information about the processes actually using the disk and then you can check how to optimize these processes.

You can try to put temporary folders and stuff in a so called ram-disk. You could do it for logs and stuff as well but it is risky in a sens that if the system crashes all this information is lost.