Very high memory usage on Nextcloud AIO

Hi !

I set up Nextcloud AIO on a 2 GB Linode instance, and I notice that the instance consistently runs with all the physical memory and swap saturated to nearly 100%. See picture below from the Nextcloud > Settings > System view. The Nextcloud instance works well in general, but every 30 minutes or so, it just becomes completely unresponsive for a few minutes before returning to normal again. I am wondering if this is related to the high memory usage.

I wonder if others face the same issue, and what amount of RAM is appropriate for a Nextcloud AIO instance.

Thanks!

I would recommend to use at least 4GB of RAM for AIO.

1 Like

I made that a bit more clear with Make system requirements a bit more clear · nextcloud/all-in-one@115b295 · GitHub

1 Like

Thanks @szaimen

This instance is mainly for personal use, and occasional file editing in the browser. I will try upgrading to 4 GB and monitor the memory use.

1 Like

It seems to be doing a lot better with 4 GB RAM. Everything is a lot faster. Thanks lot @szaimen !

1 Like

Consider adding the point of user to system resource ratio too.

Higher then number of simultaneous users and installed apps, more system resources you may need.

For example, my nextcloud installation runs fine with 2GB RAM and 512MB SWAP. Memory usage is around 1GB with no swapping in idle times, but when there is load of many concurrent users, system usage shoots up dramatically !!

At peak time, I have to allocate upto 16GB RAM to sustain the load for a responsive performance !!

Otherwise, this NextCloud VM (snap installation) is happy to cruise with 2GB RAM !!

Thanks.

1 Like

It’s the same on my side. I’m also running Nextcloud AIO in beta channel (Master-Container version 4.5). It’s sitting inside a Proxmox VM on an Ubuntu 22.04 LTS, which is up-to-date. I installed the QEMU guest Tools and had it running with 16 GB of ram, just like you did.
On the Proxmox interface it says that it’s consuming almost 15 GB ram, but when I run htop in the container it’s a lot less - hardly 3 GB.

I also tried to switch off the ballooning function and set it to 8 GB. The behavior was the same. In the Proxmox UI it’s almost at 90% Ram usage, and inside the container it’s hardly 50% of it.
As you see this is the graph showing 16GB at the beginning and 8 GB RAM late on:

Either way, it’s using almost all of it the whole time.

this is htop insie the VM with Elasticsearch running:

I thought it´s maybe a problem of the Elasticseach-enginge, since it’s on the top of the list, but, when I switch this of in the container List:

htop looks almost the same:

So I’m not sure if this is a problem of nextcloud, docker or Proxmox.

My other VMs and LXC Container are running fine, but I’ll check them too later on.

I’m also seeing this issue of very high memory use in Nextcloud AIO consistently when uploading mp4 video files from an Android phone using Auto upload to a folder to External storage on SMB/CIFS network share.

When uploading gigabytes of mp4 files, the VM’s memory fills up after every few gigabytes uploaded eg. in my case after about 5GB of videos uploaded 16GB VM memory easily fills up completely causing the VM to stutter and eventually become unresponsive.

I’m running Nextcloud AIO on an Open Media Vault 6.3.7-1 (Debian) VM instance under Proxmox pve-manager/7.4-3/9002ab8a (running kernel: 5.15.102-1-pve).

Hi, which Nextcloud version is installed in your case?

I want to say, if you have
ElasticSearch, Collabora, then 2GB memory might be too less.
ClamAV is recommended 4GB memory, absolutely, I disabled it.
But full text search and office at least require 2GB or more to work well.
Actually, if you have many photos and enabled imaginary, at least another 1 or 2 GB memory is required.
Another experience I have is HEIC bug in imaginary and cost much memory. But this is fixed or improved after NC26 or NC 25.0.5.
Just for your reference.
My home setup use similar AIO and given 8GB memory as I hosted >100 GB photos.

If I click About it says This Nextcloud is on version 25.0.5

For debugging you could try to disable some of the optional addons and check if this improves things.

Thanks, I’ll do that.

I’m also trying to find the relevant logs that shows the file uploads.
Can you please give me some pointers where should I look for those logs? Which container handles the actual file uploads? I don’t seem to find anything related in the container logs I’ve checked eg. docker logs nextcloud-aio-nextcloud.

The nextcloud-aio-nextcloud container. Nextcloud has its own logs which you can find on https://yourdomain.com/settings/admin/logging