[Haskell-cafe] Hard drive thrashing with modern controllers
ketil at malde.org
Mon Nov 12 10:21:38 CET 2012
timothyhobbs at seznam.cz writes:
> import Control.Monad
> foo = do
> forever $ writeFile "filename.foo" "Hello world!"
I could be wrong, but I suspect this is unlikely to result in (hardly)
any disk operations at all, as long as there is _any_ write caching in
> will that destroy those sectors of my SSD after the rated 3000 write cycles?
The SSD firmware will even this out by shuffling around the exact flash
blocks that are used, so that's 3K write cycles for each block, spread
out over hundreds of thousands of blocks - so your SSD should survive
perhaps a billion writes in total.
> The reason I ask, is that I have a program here where I would like to save a
> set of files after every change/operation and I'm wondering if I should
> check if the files I'm saving have actually changed or if this will be
> handled by the OS...
Unless the loss of a file would be crucial, I wouldn't worry about it.
If/when you wear out the SSD, a replacement will probably be a trivial
More information about the Haskell-Cafe