[Haskell-cafe] Hard drive thrashing with modern controllers

Brandon Allbery allbery.b at gmail.com
Sat Nov 10 21:26:34 CET 2012


On Sat, Nov 10, 2012 at 3:02 PM, <timothyhobbs at seznam.cz> wrote:

> Hmm.  I was hoping for good news that things had changed for the better :(
> .  I want these files to be on the disk so I don't lose data in the case of
> failure.  A common solution here is to acidify the program, but that is not
> acceptable from a usability standpoint.  I don't want to have the user mess
> around with swap files and the like.  When something goes wrong, I want to
> seamlessly start up where we left off without the user even knowing that
> something out of the ordinary happened.  A tmpfs will do nothing for this
> case :)
>

Maybe what you want to do is to write data every [blocksize] (often 4K but
it may depend to some extent on the SSD's internal block size, which
unfortunately you may not be able to determine easily) in the file and
periodically truncate and start from the beginning.  To restart, seek
backwards from the end of the file.

Alternatively this may be the point where you try to write stuff to an
easily and cheaply replaced thumb drive or SD card.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix/linux, openafs, kerberos, infrastructure          http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121110/e704b591/attachment.htm>


More information about the Haskell-Cafe mailing list