Minor updates

Before we start, 2 brief updates:

  • "The shim" is now enabled by default in the Aars - you should notice nothing but faster imports and less items getting stuck during import.
  • We've improved the Plex / Emby / Jellyfin "wait for storage" logic to avoid rclone caching, which was potentially allowing Plex to restart before Zurg was ready, leading to unwanted "red trash cans" on your media. Your streamers will restart as this fix is applied.

PostgreSQL comes to the Aars

The Aars (Radarr and Sonarr in particular) use SQLite databases to store your monitored movies / shows, logs, progress, etc. For larger libraries, these databases can get big, and can cause the Aar to run into CPU limitation / restrictions, simply as it processes its monitored content. This may be further exacerbated by some of the recent enhancements we've introduced like "the shim" (now on by default, BTW), and the Huntarr stacks, which already super-charge the Aars.

A popular optimization for larger stack involves switching the Aars to use a PostgreSQL database, as opposed to SQLite. It's less likely to suffer corruption, and performs better on network writes.

There's no "official" or "supported" way to convert a SQLite-based Aars to PostgreSQL - it's usually a decision you make when you setup from scratch, but here in the ElfLab, we've been working on "importarr", a CLI tool to do exactly this. Importarr will let you migrate an SQLite-based Aarr to PostgreSQL (it's a one-way trip though, there's no migratiing back, but you can revert to your most recent SQLite backup).

In theory, PostgreSQL support will improve Aarr performance for Elfies with large libraries - if you want to test it out, here's how it's done, using radarr as an example, but the same would apply to radarr4k, sonarr, or sonarr4k..

  • Backup your arr, using "System" -> "Backup" in the UI (and/or with "elfbot backup radarr")

2. Switch to PostgreSQL, by running "elfbot env radarr USE_POSTGRESQL=true" in ElfTerm

That's it. Wait for the Aar to restart and perform a database import (you can watch it do so in Kubernetes Dashboard if you're interested), and once it's reachable again (may take a while for larger libraries), it's business as usual. If you ever want to switch back, unset the env var ("elfbot env radarr USE_POSTGRESQL=false"), and restore your latest backup.

Depending how things go with brave early-adopters, and what sort of performance improvements are realized, we'd ideally like to make this default for all users in future.

Happy experimenting!

Leave a Reply