|
|
Log in / Subscribe / Register

Flash and small modifications

Flash and small modifications

Posted Apr 6, 2012 10:52 UTC (Fri) by valyala (guest, #41196)
In reply to: Flash and small modifications by dlang
Parent article: 2012 Linux Storage, Filesystem, and Memory Management Summit - Day 2

> sequential writes (i.e. log files), if a append-only file is written when it ends in the middle of a block, that block should be able to be modified rather than copied when additional data gets written

I believe sequential writes are already handled optimally by flash firmware. All writes to flash can be easily buffered in on-board RAM and merged into block-sized writes before hitting the flash. Of course, such RAM must be backed by a power supply (a capacitor), which will allow flushing RAM contents to flash in the event of power loss.


to post comments

Flash and small modifications

Posted Apr 6, 2012 18:07 UTC (Fri) by dlang (guest, #313) [Link] (1 responses)

if they are buffered by on-board ram, then they are going to be lost if the device looses power. As such they can not be suitable for things like journal writes.

unless the device includes an on-board battery with enough power to write the contents of the ram to flash when it losses power, and I am not aware of any SSD drives that do this.

Flash and small modifications

Posted Apr 6, 2012 18:09 UTC (Fri) by dlang (guest, #313) [Link]

Also, any buffering by on-board ram will only help if the additional write happens in a short enough time that the data is still in ram.

Think of a log file that gets a new line written to it every minute or two. If the average log line is ~1/4K (which is what I measured my logs to be), then you have about 2K log entries per block, and so will re-write the block 2K times before filling it up.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds