Re: SSD Optimizations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 11 March 2010 08:38:53 Sander wrote:
> Hello Gordan,
> 
> Gordan Bobic wrote (ao):
> > Mike Fedyk wrote:
> > >On Wed, Mar 10, 2010 at 11:49 AM, Gordan Bobic <gordan@xxxxxxxxxx> wrote:
> > >>Are there options available comparable to ext2/ext3 to help reduce
> > >>wear and improve performance?
> 
> With SSDs you don't have to worry about wear.

Sorry, but you do have to worry about wear. I was able to destroy a relatively 
new SD card (2007 or early 2008) just by writing on the first 10MiB over and 
over again for two or three days. The end of the card still works without 
problems but about 10 sectors on the beginning give write errors.

And with journaled file systems that write over and over again on the same spot 
you do have to worry about wear leveling. It depends on the underlying block 
allocation algorithm, but I'm sure that most of the cheap SSDs do wear 
leveling only inside big blocks, not on whole hard drive, making it much 
easier to hit the 10 000-100 000 erase cycles boundary.

Still, I think that if you can prolong the life of hardware without noticable 
performance degradation, you should do it. Just because it may help the drive 
with some defects last those 3-5years between upgreades without any problems.

> 
> > And while I appreciate hopeful remarks along the lines of "I think
> > you'll get more out of btrfs", I am really after specifics of what
> > the ssd mount option does, and what features comparable to the
> > optimizations that can be done with ext2/3/4 (e.g. the mentioned
> > stripe-width option) are available to get the best possible
> > alignment of data and metadata to increase both performance and life
> > expectancy of a SSD.
> 
> Alignment is about the partition, not the fs, and thus taken care of
> with fdisk and the like.
> 
> If you don't create a partition, the fs is aligned with the SSD.

But it does not align internal FS structures to the SSD erase block size and 
that's what Gordon asked for.

And sorry Gordon, I don't know. But there's a 'ssd_spread' option that tries 
to allocate blocks as far as possible (within reason) from  themselfs. That 
should, in most cases, make the fs structures reside on an erase block by  
themself.
I'm afraid that you'll need to dive into the code to know about block 
alignment or one of the developers will need to provide us with info.

> 
> > Also, for drives that don't support TRIM, is there a way to make the
> > FS apply aggressive re-use of erased space (in order to help the
> > drive's internal wear-leveling)?
> 
> TRIM has nothing to do with wear-leveling (although it helps reducing
> wear).
> TRIM lets the OS tell the disk which blocks are not in use anymore, and
> thus don't have to be copied during a rewrite of the blocks.
> Wear-leveling is the SSD making sure all blocks are more or less equally
> written to avoid continuous load on the same blocks.

Isn't this all about wear leveling? TRIM has no meaning for magnetic media. 
It's used to tell the drive which parts of medium contain only junk data and 
can be used in block rotation, making the wear-leveling easier and more 
effective.

-- 
Hubert Kario
QBS - Quality Business Software
ul. Ksawerów 30/85
02-656 Warszawa
POLAND
tel. +48 (22) 646-61-51, 646-74-24
fax +48 (22) 646-61-50
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux