Chapter 4. Advanced configuration

Table of Contents

Satellite setup
Real-Time Scheduling

Satellite setup

MPD runs well on weak machines such as the Raspberry Pi. However, such hardware tends to not have storage big enough to hold a music collection. Mounting music from a file server can be very slow, especially when updating the database.

One approach for optimization is running MPD on the file server, which not only exports raw files, but also provides access to a readily scanned database. Example configuration:

music_directory "nfs://fileserver.local/srv/mp3"
#music_directory "smb://fileserver.local/mp3"

database {
    plugin "proxy"
    host "fileserver.local"
}
      

The music_directory setting tells MPD to read files from the given NFS server. It does this by connecting to the server from userspace. This does not actually mount the file server into the kernel's virtual file system, and thus requires no kernel cooperation and no special privileges. It does not even require a kernel with NFS support, only the nfs storage plugin (using the libnfs userspace library). The same can be done with SMB/CIFS using the smbclient storage plugin (using libsmbclient).

The database setting tells MPD to pass all database queries on to the MPD instance running on the file server (using the proxy plugin).