Using swapcache to speed up external disk writes?

PeerCorps Trust Fund ipc at peercorpstrust.org
Wed Dec 17 02:35:31 PST 2014


Ha! Thanks for this. I actually set it up yesterday only to get a critical error notice that the external disk just couldn't keep up (my translation of the jargon it spit out). I had to stop the transfer and make a hard restart of the laptop.

I am using a Thinkpad x200 and do intend on upgrading it via expresscard to USB 3.0. The external disk itself is USB 3.0 2 terabyte drive. 

FreeBSD was tested previously and works well. My draw to Dragonfly's is related to its NFS performance which seems to be consistently faster in my testing. I was also keen to experiment more with HAMMER outside of a virtual system. HAMMER's lower resource requirements are also a strong draw.

On 12/17/2014 12:23 PM, Michael Neumann wrote:
> 
> 
> 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