Using swapcache to speed up external disk writes?

Justin Sherrill justin at
Tue Dec 16 18:52:23 PST 2014

Short answer: yes, set up swapcache on the SSD and you'll benefit.
That's the goal of swapcache.  See the swapcache man page for a guide
on how large to make your partition, and use the rest for / or however
you want to arrange it.

For the heck of it, instead of swapcache, you could create them as two
Hammer volumes - the SSD as the master, the USB disk as the slave -
and mirror the master to the slave.  The mirroring process will not
slow the disk writes, but that will limit you to the size of the SSD.
You'd be able to put a generous history policy on the USB disk and
save a good amount of file history in the extra space.  That may not
be what you want.

On Tue, Dec 16, 2014 at 6:05 PM, PeerCorps Trust Fund
<ipc at> wrote:
> Dear All!
> I have set up a gigabit LAN and have been testing the use of a laptop as a file server/NAS over NFS. The server in question has a 2 terabyte external hard disk attached via USB 2.0. The laptop itself has a 120 gigabyte SSD  installed as its main drive. My question is whether there might be a way to use Dragonfly's swapcache on the SSD in order to get the maximum speed out of the network to transfer files to the laptop's SSD while it writes to the external drive simultaneously in the background? Is there a way to for example increase the size of the swapcache to say 50 gigabytes and route the writes to it (and possibly other disks mounted elsewhere)?
> I've tested writes directly over the LAN to the SSD and it tops out at around 120 megabytes per second...which is phenomenal. However when writing to the disk I get speeds of around 18-22 megabytes per second. Not horrible, but quite a substantial difference.
> Any tips would be extremely appreciated.
> M

More information about the Users mailing list