Speeding up apt-get using NFS shares

Running apt-get on an SD card-based Debian system can be time consuming, since write processes on SD cards are time costly (depending on the card’s speed) and apt-get may do a lot of writing. The first solution that comes to mind is setting up a ramdisk, however in my case RAM is a limiting factor (Futro S400 with 512MB RAM). Instead I used NFS (nfs-kernel-server in combination with avahi-daemon for name resolution) to have parts of the writing outsourced to network directories, mounted from a server with fast storage (hard disk instead of SD card):

In the server’s /etc/exports:

/var/lib/apt/lists      remote.local(rw,no_root_squash,no_subtree_check)
/var/cache/apt/archives remote.local(rw,no_root_squash,no_subtree_check)

And in the remote system’s /etc/fstab:

server.local:/var/lib/apt/lists      /var/lib/apt/lists      nfs4
server.local:/var/cache/apt/archives /var/cache/apt/archives nfs4

With this method I managed to increase the speed of apt-get update and apt-get install by a factor of 10x.

632 mal insgesamt angesehen, 1 mal heute angesehen.
Dieser Beitrag wurde unter Informatik, Kanzleiserver abgelegt und mit , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.