Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I ran my open-source music and audiobook server on a 2019 Raspberry Pi and measured it

Description and use

The server runs comfortably on a 2019 Raspberry Pi 4 with only 4 GB RAM and a 32 GB SD card, using <45 MiB RAM and <200 MiB total memory. It handles up to 32 concurrent listeners (~250 req/s) with latency under 0.5 s. SD card I/O is not a bottleneck; network upload limits the external load.

Problem

Demonstrate that an open‑source music and audiobook server can run efficiently on a low‑cost, low‑power Raspberry Pi 4 with only an SD card.

Outcome

The server runs comfortably on a 2019 Raspberry Pi 4 with only 4 GB RAM and a 32 GB SD card, using <45 MiB RAM and <200 MiB total memory. It handles up to 32 concurrent listeners (~250 req/s) with latency under 0.5 s. SD card I/O is not a bottleneck; network upload limits the external load.

Workflow

  • 1. Install Raspberry Pi OS Lite 64‑bit on the Pi.
  • 2. Enable cgroup memory accounting in /boot/firmware/cmdline.txt.
  • 3. Deploy Docker and docker‑compose with three containers: own‑audio server, PostgreSQL 16, and cloudflared.
  • 4. Mount music and audiobook folders read‑only from the SD card.
  • 5. Run automated scans to index media and measure scan time per file type.
  • 6. Execute loadtest.py from a client machine to simulate concurrent listeners and record request rates, latency, and resource usage.
  • 7. Analyze results: memory, CPU, network throughput, and SD card I/O.
  • 8. Adjust environment variables (MALLOC_ARENA_MAX, MALLOC_MMAP_THRESHOLD_, MALLOC_TRIM_THRESHOLD_) to reduce peak memory.
  • 9. Compare performance with Navidrome and Audiobookshelf.
  • 10. Document findings and publish demo at demopi.own.audio via Cloudflare Tunnel.

Evidence

The server itself takes 13–29 MiB depending on what it has just done, and it peaked at 34 MiB under load.

Source

A single download over the home network ran at 287 Mbit/s. The card reads at 45 MB/s (about 360 Mbit/s).

Source

It levels off at about 250 requests a second and 200 Mbit/s of audio. At that point PostgreSQL is using about two of the Pi's four cores, and that's the limit.

Source

  • Record date: 2026-10-07T15:40:55.351Z