Linux Lite Forums
Should I install a swap partition on an SSD? - Printable Version

+- Linux Lite Forums (https://www.linuxliteos.com/forums)
+-- Forum: Hardware - Support (https://www.linuxliteos.com/forums/forumdisplay.php?fid=6)
+--- Forum: Hard Drives and SSDs (https://www.linuxliteos.com/forums/forumdisplay.php?fid=26)
+--- Thread: Should I install a swap partition on an SSD? (/showthread.php?tid=1794)



Should I install a swap partition on an SSD? - m654321 - 04-30-2015

I've seen one or two sources on the internet say that creating a swap partition on an SSD is inadvisable, as it would shorten the life of the SSD significantly due to the continual rewrites.  I am a bit sceptical about this, as when my LL laptop is configured correctly, it hardly uses much swap.  Also on my setups swap areas are never more than 4 to 10 GB in size, so the purported wear-n-tear would be only on a limited area (2-5% of the total size) for a drive that is around 250 GB total size.  I'd appreciate your views...

Many thanks
Mike


Re: Should I install a swap partition on an SSD? - Wirezfree - 04-30-2015

Hi,

There is/was a number of different technologies used in making SSD's.
The older 1st generation disks did suffer from "cell wear", the sector would be marked bad, and set "Read Only".

The newer generation of disk are magnitudes more reliable.
Most come with 3-5 years warranty, they are being used 24/7 in data centres, so I wouldn't worry, I don't, I have 5.


But to answer you question...

The use of a swap file really comes down to your usage and how much memory you have.?
If you want to hibernate your devices, you need a swap file
If you don't want to hibernate, and have 4GB+ again probably don't need one for normal usage.

They are typically needed when you you are using apps doing intensive memory/disk/file access, like Video/Audio editing.
I have swap on my systems, I don't think it's ever been used.

Dave




Re: Should I install a swap partition on an SSD? - m654321 - 04-30-2015

Thanks Dave, this is really helpful.
My SSDs are all newly bought, so presumably will be robust enough, as you mention, for occasional swap activity

Mike


Re: Should I install a swap partition on an SSD? - Wirezfree - 04-30-2015

Hi,

I have Samsung SSD's, 3X standard 2.5" and 2 X mSATA
On my Laptop only have a 2.5" SSD, and on small Pico ITX I only have mSATA, so did not have a choice.
Some of these devices are now rated for Terrabyte daily read/write access.

Dave


Re: Should I install a swap partition on an SSD? - rokytnji - 04-30-2015

How much ram on this unit? I see 16 gig in your profile so if we are talking 16 gig of ram in computer.
Why put /swap on SSD?

Running a SSD here with 5 gig (profile drop down only gives 4 or 6 as options) and I survive just fine on

Code:
$ sudo parted -l
[sudo] password for harry:
Model: ATA D2CSTK181M11-018 (scsi)
Disk /dev/sda: 180GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      1049kB  9438MB  9437MB  primary  ext4         boot
2      9438MB  180GB   171GB   primary  ext4


Model: RIM BlackBerry SD (scsi)
Disk /dev/sdb: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
1      4201kB  15.9GB  15.9GB  primary  fat32        lba


Model: RIM BlackBerry (scsi)
Disk /dev/sdc: 922MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number  Start  End    Size   File system  Flags
1      0.00B  922MB  922MB  fat16

Just wondering is all.


Re: Should I install a swap partition on an SSD? - Wirezfree - 04-30-2015

I guess I was just planning/thinking ahead(bit OCD also), and just try to keep all my installs consistent/standard

So on 1st Disk(SSD) I have / and swap, and if I want to have multiple OS's the /swap is there for all to share(save disk space, and I don't hibernate)
2nd disk /home /mnt/data /rescue /vbox  ~ and I bind certain /home/??? dir's to matching dir's in /mnt/data/??? ~ and the /rescue is for local quick backups/recovery

I can then be quite selective on what/when get's backed up to my NAS

I guess we all have different ideas...