Self-hosting

Memory behavior of eight self-hosted apps on a 2 GB VPS over one week

A seven-day test shows how available memory drops after setup and stabilizes, with n8n causing the largest spikes.

Illustration of a small server rack holding multiple applications on a limited capacity scale
Illustration created for this article

Between 3 and 10 November 2026, a single virtual private server with 2 GB of RAM ran ten containers hosting eight popular self-hosted applications. The experiment tracked memory usage under light, automated load to determine if such a constrained environment could sustain a multi-app stack without crashes or restarts.

What happened

The test environment consisted of a server with one virtual CPU and 2 GB of memory, configured without a swap file. The operator deployed Vaultwarden, Navidrome, Audiobookshelf, Forgejo, Jellyfin, Uptime Kuma, Home Assistant with Mosquitto, and n8n with PostgreSQL. Unlike previous idle tests, this run included completed first-run setups for all apps and a script that generated light activity every five minutes. This script made approximately 18 requests across the services and committed files to Forgejo every half hour, totaling 36,848 requests over the week.

Available memory dropped significantly during the initial phase of the test. The median available memory fell from 296 MiB on day one to 259 MiB by day seven. Most of this decline occurred in the first four days, after which the usage curve flattened. The lowest point recorded was 157 MiB, occurring just 38 minutes after the start, but the system recovered quickly and never reached that level again. Crucially, there were no out-of-memory kills or container restarts during the 9,923 samples taken.

While the overall system remained stable, individual applications showed varying behaviors. n8n exhibited the most volatile memory profile, briefly spiking to 471 MiB, which was about 110 MiB above its weekly median. Other apps like Home Assistant and Uptime Kuma showed minor growth, while lightweight services like Vaultwarden and Mosquitto remained nearly static. The data suggests that while average usage is predictable, peak usage can temporarily consume a large portion of the remaining headroom.

Key details

  • Stability: All ten containers remained up for the entire week with zero recorded memory kills or restarts.
  • Memory drop: Available memory median decreased by 49 MiB from the first hour to the last hour, stabilizing after day four.
  • Largest spike: n8n briefly reached 471 MiB, consuming nearly half of the available headroom at that moment.
  • Setup impact: The median available memory in the first hour was 308 MiB, significantly lower than the 425 MiB observed in a prior untouched-install test.
  • Page faults: Major page faults rose daily until day six, indicating increasing pressure on storage-backed memory pages.
  • Latency: Median response time for successful requests increased slightly from 18 ms on day one to 23 ms on day seven.

Background

Understanding these results requires distinguishing between different types of memory metrics. The test measured "available memory" on the host, which includes free memory plus reclaimable cache, and "anonymous memory" within containers, which refers to memory not backed by files. Linux manages memory aggressively, often using free RAM for disk caching to improve performance. When applications need more memory, the kernel reclaims this cache. This is why available memory can drop even if application usage remains flat, as the system balances active processes against cached data.

Major page faults occur when a program accesses data that is not currently in physical RAM and must be read from storage. In a system without swap, these faults usually indicate that the kernel is reloading file-backed pages. While not necessarily a sign of failure, a rising count of major page faults can signal that the system is under memory pressure, potentially leading to increased latency as the CPU waits for data from the disk.

Why it matters

For teams managing self-hosted infrastructure, this data challenges the assumption that low average memory usage guarantees safety. The n8n spikes demonstrate that an application can operate efficiently most of the time but occasionally demand a large burst of resources. On a 2 GB server, a 110 MiB spike represents a significant portion of the total capacity. If multiple applications spike simultaneously, or if the baseline usage creeps higher due to real-world data, the risk of an out-of-memory kill increases substantially.

The difference between an untouched install and a configured one is also critical for capacity planning. The 117 MiB gap in available memory between the idle test and this configured test highlights that initial provisioning estimates are often optimistic. Administrators who provision servers based on clean installs may find themselves short on resources once accounts are created, libraries are indexed, and background workers start. Measuring memory after setup provides a realistic baseline for determining if a server size is adequate.

Furthermore, the absence of swap file usage in this test means the system had no safety net for extreme pressure. While the server survived the week, the rising major page faults and slight latency increase suggest that the system was working harder to manage memory. For production environments where consistent response times are vital, relying solely on physical RAM without understanding peak behaviors can lead to unpredictable performance degradation.

What you can do

  • Measure after configuration: Always check memory usage after completing app setup and creating accounts, not just after installation.
  • Plan for peaks: Size your server based on the maximum observed memory usage of your largest application, not just its median.
  • Monitor trends: Track available memory and major page faults over several days to identify slow leaks or growing pressure.
  • Consider swap cautiously: Evaluate adding a swap file to absorb spikes, but test its impact on latency for your specific workload.
  • Limit concurrent stacks: If running multiple memory-intensive apps, reduce the number of services or upgrade to a larger VPS plan.
  • Validate with real data: Test with populated libraries and actual user workflows, as empty instances do not reflect production demands.

More news

All news