Using swapcache to speed up external disk writes?

Michael Neumann mneumann at ntecs.de
Wed Dec 17 02:23:57 PST 2014



Am 17.12.2014 um 03:52 schrieb Justin Sherrill:
 > 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.

But keep in mind swapcache does not work as a write-cache. It's only
caching reads.

USB 2.0 sets a limit which is higher than the 20 MB/sec you get, so I
assume it's your disk that is not the fastest (which I guess is quite
common for "USB" disks). I doubt you get more out of that disk on any
other operating system.

FreeBSD/ZFS has something called ZFS Intent Log, which does write
caching. But I doubt you want to use it on your laptop as in general ZFS
is a bit more hungry in terms of resources.

I'd suggest you to buy a good/fast harddisk and attach it via eSATA or 
USB 3.0
(is it supported by DragonFly / your laptop?). Fast disks usually are 
powered
by an external power supply and not via the USB power (things might have
changed during the years). Swapcache can then help you to improve read
performance, which also helps write performance as it takes off read 
load from
the disk. A good harddisk should be able to give your 100 MB/sec of 
sequential
writes, but for random reads the performance is abysmal, this is where 
the SSD
shines.

Regards,

   Michael


More information about the Users mailing list