View Single Post
  #90   Report Post  
Posted to uk.d-i-y
John Rumm John Rumm is offline
external usenet poster
 
Posts: 25,191
Default Samsung SSD 750 EVO v 850 EVO / Ubuntu

On 16/10/2016 11:51, The Natural Philosopher wrote:
On 16/10/16 11:25, Andy Burns wrote:
The Natural Philosopher wrote:

Reading drivel from people who have a partial understanding and
reposting it doesn't make it true.

https://en.wikipedia.org/wiki/Wear_leveling


No one is saying wear-levelling doesn't exist, but you seem to be saying
alignment problems don't exist either.


No, what I am saying is that the later SSDS with decent wear levelling
set their own block sizes and boundaries so that what you do at OS level
is utterly irrelevant.


While it is true there is a fluid relationship between logical block
numbers which are visible to the OS, and physical flash pages, there is
no getting away from the fact that the flash devices themselves are
block or page oriented devices, and their page size is typically larger
than the logical allocation unit size used by the file system
(regardless of OS).

Its like pretending that any given memory address actually corresponds
top a particular cell in a particular chip, at application level. Memory
management is all about mapping logical virtual to physical.


The same situation exists with memory. Compilers understand that non
word sized aligned memory accesses (depending on CPU architecture) will
at best suffer a performance hit. So they will pad data structures to
avoid this.

So while in theory a CPU using paging / virtualised addressing could map
linear address spaces to physical addresses with an arbitrary alignment,
they don't - they stick to granularity sizes that allow direct mapping
to memory data path boundaries.

And with a modern SSD, its the same. You call for sector 99, and what
you get is a random part of the disk that happens at that instant to be
mapped to sector 99.


That much is true...

In reality it could be anywhere on any boundary the
SSD firmware and processor puts it.


Not quite - there is not a one to one mapping of OS allocation units to
flash pages. For optimum performance you need to ensure that whichever
allocation unit you update, the SSD can do that update by operating on
one (and only one) page of flash. With the wrong alignment, you can end
up with the SSD needing to do two page updates for each OS allocation
unit update.


--
Cheers,

John.

/================================================== ===============\
| Internode Ltd - http://www.internode.co.uk |
|-----------------------------------------------------------------|
| John Rumm - john(at)internode(dot)co(dot)uk |
\================================================= ================/