I decided some background information might be helpful in making this answer clear, but as you can see I went a bit OCD so
you might want to skip to the end and then go back if needed. While I do know a bit, I'm not an expert on S.S.D.s so if anyone sees a mistake EDIT it.
:).
Background Information:
What Is An S.S.D.?:
An S.S.D. or solid state drive is a storage device with no moving parts. The term S.S.D. is often intended to
specifically refer to nand-flash based solid state drives intended to act as a hard drive alternative, but in
actuality they are just one form of S.S.D., and not even the most popular one. The most popular type of S.S.D.
is nand-flash based removable media like usb sticks (flash drives), and memory cards, though they are rarely refered to
as an S.S.D.. S.S.D.s can also be ram based, but most ram-drives are software generated as opposed to physical hardware.
Why Do Nand-flash S.S.D.s Intended To Act As A Hard Drive Alternative Exist?:
In order to run an operating system, and it's software a fast storage medium is required. This is where ram comes into
play, but historically ram was expensive and cpu's couldn't address massive quantities. When you run an operating system,
or program the currently-required portions of data are copied to your ram, because your storage device isn't fast enough.
A bottleneck is created, because you have to wait for the data to be copied from the slow storage device to the ram. While
not all nand-flash S.S.D.s recieve better performance than the more traditional hard drive, the ones that do help reduce
the bottleneck by giving faster access times, read speeds, and write speeds.
What Is Nand-flash?:
Flash storage is a storage medium that uses electricity rather than magnetism to store data. Nand-flash is flash storage
that uses a NAND gateway. Unlike A nor-flash which is random access, nand-flash is sequentially accessed.
How Do Nand-flash S.S.D.s store data?:
Nand-flash storage is composed of blocks, those blocks are split into cells, the cells contain pages. Unlike a hard drive
which uses magnetism
to store data, flash mediums use electricity, because of this data cannot be over-written;
data must be erased in order to re-use the space. The device cannot erase
individual
pages; erasal must occur at a block level. Since data cannot be written to a block that is already used (even if not all
the pages in it are) the entire block must be erased first, and then the now blank block can have data written to it's
pages. The problem is that you would lose any data already in those pages, including data you don't want to discard! To prevent this existing data to be retained must be copied
somewhere else before performing the block erasal. This copying proceedure is not performed by the computer's operating
system, it is performed at a device level by a feature known as garbage collection.
On hard drives a magnetic plate is used to store data. Much like vinyl records the plate has tracks, and these tracks are
divided into sections called sectors. A sector can hold a certain amount of data (typically 512 bytes but some newer ones
are 4KB). When you apply
a filesystem sectors are grouped into clusters (based on a size you specify, called an allocation size or cluster size), and then
files are written across clusters. It is also possible to divide a sector to make clusters smaller than your sector size.
The space unused in a cluster after a file is written across a cluster (or several) is not usable, the next file starts in
a new cluster. To avoid lots of unusable space people typically use smaller cluster sizes, but this can decrease performance when writing large files. Nand-flash S.S.D.s do not have a magnetic plate, they use electricity passing through memory blocks. A block
is made of cells containing pages. Pages have X capacity (usually 4 KB), and thus the number of pages will determine the capacity
of a block (usually 512 KB). On SSD's a page equates to sector on a hard drive, because they both represent the smallest
division of storage.
What Is Wear Leveling?:
Nand-flash storage blocks can be written to, and erased a limited number of times (refered to as their lifecycle). To prevent the drive from suffering of
capacity reduction (dead blocks) it makes sense to wear down the blocks as evenly as possible. The limited lifecycle is
also the main reason why many people suggest not having a page file or swap partition in your operating system if you are
using a Nand-flash based S.S.D. (though the fast data transfer speeds from the device to ram are also a major factor in
that suggestion).
What Is Over Provisioning?:
Over Provisioning defines the difference between how much free space there is, compared to how much there appears to be.
Nand-flash based storage devices claim to be smaller than they are so that there is garanteed to be empty blocks for
garbage disposal to use. There is a second kind of over provisioning called dynamic over provisioning which simply refers
to known free space within the shown free space. There are two types of dynamic over provisioning: operating system level,
and drive controller level. At the operating system level Trim can be used to free blocks that can then be written to
immediatley. At the controller level unallocated drive space (not partitioned, no filesystem) may be used. Having more
free blocks helps keep the drive running at it's best performance, because it can write immediately. It also increases
the likely hood of having blocks that are sequentially located which reduces access times because Nand-flash S.S.D.s
use sequential access to read and write data.
What Is Write Amplification?:
Because Nand-flash mediums require a block to be erased before it can be written, any data within the block that isn't
being erased must be copied to a new block by garbage disposal. These additional writes are called write amplification.
What Is Trim.?:
Operating systems are built with traditional hard drives in mind. Remember a traditional hard drive can directly overwrite
data. When you delete a file the operating system marks it as deleted (okay to over-write), but the data is still there until
a write operation occurs there. On
Nand-flash based S.S.D.s this is a problem, because the data must first be erased. The erasal occurs at a block level so
there may be additional data that isn't being deleted. Garbage disposal copies any data that isn't up for deletion to empty
blocks, and then the blocks in question can be erased. This all takes time, and causes unneccesary writes (write amplification)!
To get around this a feature called Trim was made.
Trim gives the operating system the power to tell the S.S.D. to erase blocks with pages containing data the operating system has marked
as deleted during periods of time when you aren't requesting a write operation there. Garbage collection does it's thing, and as a result blocks are freed up so that writes can hopefully occur to
blocks that don't need to be erased first which makes the process faster, and helps reduce the write amplification to a
mimimum. This is not done on a file basis; Trim uses logical block addressing. The L.B.A. specifies which sectors (pages)
to erase, and the erasal occurs at a block level.
The Answer To Your Question "Disadvantages of partitioning an SSD?":
Ram Based S.S.D.s:
There is absolutely no disadvantage because they are random access!
Nand-flash Based S.S.D.s:
The only disadvantages that come to my mind would be:
Wear leveling won't have as much free space to play with, because write operations will be spread across a smaller space
, so you "could", but not necessarily will wear out that part of the drive faster than you would if the whole drive was a
single partition unless you will be performing equivalent wear on the additional partitions (eg: a dual boot).
Like hard drives nand-flash S.S.D's are sequential access so any data you write/read from the additional partitions will be
farther away than it "might" have been if it were written in a single partition, because people usually leave free space
in their partitions. This will increase access times for the data that is stored on the additional partitions.
Less total space increases the likely hood of writing fragmented files, and while the performance impact is small
keep in mind that it's generally considered a bad idea to defragement a nand-flash S.S.D. because it will wear down
the drive. Of course depending on what filesystem you are using some result in extremely low amounts of fragmentation
, because they are designed to write files as a whole whenever possible rather than dump it all over the place to
create faster write speeds.
I'd say it's okay to have multiple partitions, but wear leveling could be a concern if you have some partitions
getting lots of write activity, and others getting very little. If you don't partition space you don't plan to use, and
instead leave it for dynamic over provisioning you may recieve a performance boost because it will be easier to free blocks
and write sequential data. However there is no garauntee that over provisioning space will be needed which brings us back
to point #1 about wear leveling.
Some other people in this thread have brought up discussion of how partitioning will affect Trim's contributions to
dynamic over provisioning.
To my understanding TRIM is used to point out sectors (pages) that have data flagged for deletion, and so
garbage disposal can free erase those blocks. This free space acts as dynamic over provisioning within THAT partition only,
because
those sectors are part of clusters being used by that partition's filesystem; other partitions have their own filesystems.
However I may be totally wrong on this as the whole idea of over provisioning is a bit unclear to me since data will be
written to places that don't even have filesystems or appear in the drives capacity. This makes me wonder if perhaps over
provisioning space is used on a
temporary basis before a final optomized write operation to blocks within a filesystem? Of course Trim's contributions
to dynamic over provisioning within the filesystem would not be temporary as they could be written to directly since
they're
already
in usable space. That's my theory at least. Maybe my understanding of filesytems is wrong? I've been unable to find any resources that go into detail about this.
13Well, you'd have to partition it in order to use it. Presumably, he means not to create more than one partition, though why he'd recommend that is beyond me. – ChrisInEdmonton – 2014-09-08T15:54:09.517
1@ChrisInEdmonton yes that's what he means. – MarioDS – 2014-09-08T15:56:16.417
4I can't fathom why this would matter. Even if you're using logical partitions instead of phsyical partitions, once the OS tells the filesystem driver what section of the drive to use, partitions don't matter. The only thing that might matter is partition alignment, but that has nothing to do with the number of partitions. – Darth Android – 2014-09-08T15:59:19.287
2I can only guess that he means: "Do not partition a very small drive", regardless if it is an HDD or a SDD. – Hennes – 2014-09-08T16:02:14.470
1@Hennes good thinking, although his post dates from july 2013. SSDs with 120GB or 240GB capacity were already pretty affordable back then. – MarioDS – 2014-09-08T16:05:10.520
6
The only other option I can thing of is (wrongly) assuming that an SSD controller needs the free space on a volume to work with. It needs free space on the disk to be efficient; not perse free space in a mounted volume. Tuning that is just a matter of deciding on over-provisioning and setting the host protected area.
– Hennes – 2014-09-08T16:12:49.493