John R Pierce wrote:>> And one may want to adjust stripe size to be resembling SSDs >> internals, as default is for hard drives, right? > > as the SSD physical data blocks have no visible relation to logical block numbers or CHS, its not practical to do this. I'd use a fairly large stripe size, like 1MB, so more data can be sequentially written to the same device (even tho the device will scramble it all over as it sees fit).Isn?t it easier for SSDs to write small chunks of data at a time? The small chunk might fit into some free space more easily than a large one which needs to be spread out all over the place.
> On Sep 9, 2017, at 12:47 PM, hw <hw at gc-24.de> wrote: > > Isn?t it easier for SSDs to write small chunks of data at a time?SSDs read/write in large-ish (256k-4M) blocks/pages. Seems to me that drive blocks and hardware RAID strip size and file system block/cluster/extents sizes and etc and etc and etc should be aligned for best performance. See: http://codecapsule.com/2014/02/12/coding-for-ssds-part-2-architecture-of-an-ssd-and-benchmarking/ Specifically the section: NAND-flash pages and blocks
On 9/9/2017 9:47 AM, hw wrote:> > Isn?t it easier for SSDs to write small chunks of data at a time? > The small chunk might fit into some free space more easily than > a large one which needs to be spread out all over the place.the SSD collects data blocks being written and when a full flash block worth of data is collected, often 256K to several MB, it writes them all at once to a single contiguous block on the flash array, no matter what the 'address' of the blocks being written is.? think of it as a 'scatter-gather' operation. different drive brands and models use different strategies for this, and all this is completely opaque to the host OS so you really can't outguess or manage this process at the OS or disk controller level. -- john r pierce, recycling bits in santa cruz
John R Pierce wrote:> On 9/9/2017 9:47 AM, hw wrote: >> >> Isn?t it easier for SSDs to write small chunks of data at a time? >> The small chunk might fit into some free space more easily than >> a large one which needs to be spread out all over the place. > > > the SSD collects data blocks being written and when a full flash block worth of data is collected, often 256K to several MB, it writes them all at once to a single contiguous block on the flash array, no matter what the 'address' of the blocks being written is. think of it as a 'scatter-gather' operation. > > different drive brands and models use different strategies for this, and all this is completely opaque to the host OS so you really can't outguess or manage this process at the OS or disk controller level. > >What if the collector is full? I understand that using small chunk sizes can reduce performance because many chunks need to be dealt with. Using large chunks would involve reading and writing larger amounts of data every time, and that also could reduce performance. With a chunk size of 1MB, disk access might amount to huge amounts of data being read and written unnecessarily. So what might be a good chunk size for SSDs?