You are not logged in.

#1 2015-04-13 19:33:28

hmnxyz
Member
Registered: 2015-04-13
Posts: 5

SSD wear levelling with GPT partitioning

does GPT help with SSD wear levelling? Is data written randomly to the physical drive, while the GPT table keeps track of which is what? I ask because it is recommended to have a single partition on an SSD for wear levelling. However, I would like to partition it to multi-boot several distros. It seems that GPT behaves like LVM because when I resize a gpt partition, it is done instantly (very quickly), as if data is not being physically re-allocated. On the other hand, it could be because my SSD is almost empty--very few personal files and the rest is just linux. So, this is why I asked the question. The other advantage of partitioning is that the dd command will run much faster and produce smaller image files, which allows me to do incremental backups.

I hope this makes sense.

Thanks

Offline

#2 2015-04-13 21:32:09

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: SSD wear levelling with GPT partitioning

By wear leveling you mean trim? You can enable trim in fstab.

Offline

#3 2015-04-13 22:43:13

hmnxyz
Member
Registered: 2015-04-13
Posts: 5

Re: SSD wear levelling with GPT partitioning

Not exactly what I meant. Some online discussions suggest that partitioning will confine disk read/write activities to a certain region of the SSD, thus wearing it out quickly. On the other hand, other discussions suggest that wear levelling protection happens at lower level by the SSD controller which is indifferent to partitioning--as far as it is concerned, partitioning is just data organization at the OS level. So, you can partition as much as you want and the wear levelling protection will still evenly distribute writes across the entire SSD, regardless of the partitions boundaries.

When I used to resize partitions on my HDD with MBR, it took a very long time because data had to be re-arranged. However, when I resize partitions on the SSD with GPT, it happens instantly as if the data are never re-arranged--only the partition table is modified.

Is this due to using GPT or is it because SSD wear levelling protection does not care about partitioning, be it MBR or GPT?

Ultimately, I want to make sure that creating 10 partitions, and using one of the partitions frequently with my main distro, is not going to wear out the SSD prematurely.

firekage wrote:

By wear leveling you mean trim? You can enable trim in fstab.

Last edited by hmnxyz (2015-04-13 22:49:53)

Offline

#4 2015-04-13 22:58:33

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: SSD wear levelling with GPT partitioning

hmnxyz wrote:

Ultimately, I want to make sure that creating 10 partitions, and using one of the partitions frequently with my main distro, is not going to wear out the SSD prematurely.

While wear leveling might have been an issue in the past, there is nothing to worry about now.  Newer SSD's have built in methods to alllow for the longest life possible, which is many many more years than you will own your computer.

Offline

#5 2015-04-14 07:37:28

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 617

Re: SSD wear levelling with GPT partitioning

circleface wrote:
hmnxyz wrote:

Ultimately, I want to make sure that creating 10 partitions, and using one of the partitions frequently with my main distro, is not going to wear out the SSD prematurely.

While wear leveling might have been an issue in the past, there is nothing to worry about now.  Newer SSD's have built in methods to alllow for the longest life possible, which is many many more years than you will own your computer.

And if it still can bug someone, data that does much writes can be placed on hdd, not ssd. I have placed my entire firefox in ram, and p2p programs.

Offline

#6 2015-04-14 11:18:43

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: SSD wear levelling with GPT partitioning

hmnxyz wrote:

does GPT help with SSD wear levelling?

Just like MSDOS, it's just a partition table... how is it supposed to help any?

Online

#7 2015-04-14 13:33:43

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: SSD wear levelling with GPT partitioning

GPT has no bearing on it at all. If you have a newer SSD (made in the last couple years) from a highly reputable manufacturer---Intel, Samsung, OCZ, Crucial---wear leveling should be handled at the firmware level. It should "just work." Check the specs for the disk.

EDIT: You would still need to enable TRIM yourself, thoguh. TRIM and wear-leveling aren't quite the same thing.

Last edited by ANOKNUSA (2015-04-14 13:35:10)

Offline

#8 2015-04-21 16:16:49

GI Jack
Member
Registered: 2010-12-29
Posts: 92

Re: SSD wear levelling with GPT partitioning

wear leveling is mostly done by either your SSD's firmware, or by the OS with TRIM.

you can enable it by adding 'discard' in the mount options in /etc/fstab. Many popular filesystems support it such as ext* series, vfat does. You can also run a flash friendly filesystem like f2fs, which benchmarks nicely compared to other major filesystems(ext4,xfs,btrfs)

Or on some file systems, you can use the 'fstrim' command peroidicly(or stick it in a cron job, but this won't work with vfat in case you have uEFI boot partition).

Personal recommendation is simply to add 'discard' in /etc/fstab for each file system.

Offline

#9 2015-04-25 17:34:14

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: SSD wear levelling with GPT partitioning

You could have answered your questions yourself by looking up how wear leveling works.
https://en.wikipedia.org/wiki/Wear_leveling
It only operates on blocks. That means it has no idea about partitions, and if you're using GPT or not doesn't matter. Wear leveling only knows how often a block was written to, for example:
block #1: 5 writes
block #2: 200 writes
Then it can swap the writes to logical blocks #1 and #2 with a lookup table like this:
#1 -> #2
#2 -> #1
so that #1 gets used more often and #2 less often.
https://www.google.com/patents/US6850443

Offline

#10 2015-04-25 17:53:19

hmnxyz
Member
Registered: 2015-04-13
Posts: 5

Re: SSD wear levelling with GPT partitioning

Thanks all.  I did not fully understand how this stuff works, when I posted the question. To add to the confusion, I read somewhere online that you should not partition your SSD, because this will limit write cycles to a certain physical location of the SSD, thus wearing it out sooner. I thought having a GPT would circumvent the issue but apparently, it has nothing to do with wear levelling.

Offline

#11 2015-04-26 09:59:47

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: SSD wear levelling with GPT partitioning


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB