Worst article on linux swap ever!!

Story: All You Need To Know About Swap Partition In LinuxTotal Replies: 10
Author Content
pmpatrick

Jan 25, 2017
12:14 PM EDT
The author appears to have little knowledge about linux, ram, swap or SSDs. His knowledge of english is also quite limited. The comments pointing out his numerous errors and technical inaccuracies are more illuminating than the article. Here's an example of one such gem:

Quoting:There aren't too many points about Swap. All you need to know is that is a type of Virtual RAM that you can create yourself if your SSD is way too faster like above 7000 rpm or better.


Don't mean to dump on this guy, but when you hold yourself out as having technical knowledge and skill that you clearly don't have a harshly worded comment is warranted so others are not misled.
jdixon

Jan 25, 2017
1:16 PM EDT
Ack. He wants to use and SSD for swap? Don't do that. SSD's have a limited number of writes cycles. Using them for swap is a wasteful use of those write cycles.
penguinist

Jan 25, 2017
1:53 PM EDT
Why use swap at all when these days we have 4GB+ memory in even the smallest of computers?

<sarcasm> Only Firefox needs such large memory. </sarcasm>
JaseP

Jan 25, 2017
2:01 PM EDT
Some things don't work properly without swap, even if you have 8GB or more RAM.
gary_newell

Jan 31, 2017
11:36 AM EDT
The truth it most of the time you don't need swap especially on modern machines. My computer has 16 gigabytes RAM. It never runs out of memory. I still have a swap partition because the computer also has a large hard drive so sparing a few gigabytes for swap isn't a big deal.

If your computer is continually swapping then you have an issue. You need more RAM or need to use less memory intensive programs.
seatex

Jan 31, 2017
6:40 PM EDT
I have 16GB on my laptop. Overkill, but no worries.
mbaehrlxer

Feb 02, 2017
1:57 PM EDT
i don't get the point about not using SSD for swap. nowadays you can get laptops and hosted servers that run on SSD only. given that, i find it hard to believe that SSD still have a limited number of write cycles that they can't handle swap.

greetings, eMBee
jdixon

Feb 02, 2017
5:18 PM EDT
> ...given that, i find it hard to believe that SSD still have a limited number of write cycles that they can't handle swap.

Oh, they can handle it fine, but it shortens their life. Here, you may find this article useful: https://itblog.sandisk.com/ssd-endurance-speeds-feeds-needs/

You may also want to check out this real world test: http://techreport.com/review/27909/the-ssd-endurance-experim...

You can use an SSD for swap, but why would you want to unless that's all you have?
seatex

Feb 02, 2017
5:30 PM EDT
After spending more than $150 for my precious 500GB Samsung EVO, I am darn sure not wearing it out as a swap drive. The simple fix was adding 16GB memory to go with it.
mbaehrlxer

Feb 03, 2017
3:07 AM EDT
thanks for the links.

the summary is that: SSDs live longer than harddrives to begin with and their write capacity is far higher than any consumer would need. thus, at least in my laptop i need not worry about the SSD dying earlier because of swap writes, because by the time the disk actually dies, i'll want to get a new laptop anyways.

workstations presumably are the same, except that it makes more sense to maybe keep the old disk even if you are replacing the machine, so you can actually benefit from the longer life of the SSD, and it starts to make sense to avoid unnecessary writes.

that leaves the servers. there of course we have more options with extra RAM that make swap space unnecessary.

in conclusion i see two use-cases for SSD: speed for servers, and for linus who needs to recompile the kernel continuously. and extra long life for precious data.

greetings, eMBee.
jdixon

Feb 03, 2017
7:10 AM EDT
> the summary is that: SSDs live longer than harddrives to begin with

On average, yes. I've had hard drives last 10 years of continuous use, so it's not a given.

> and their write capacity is far higher than any consumer would need.

The average consumer, yes, but again it's not a given.

> in my laptop i need not worry about the SSD dying earlier because of swap writes, because by the time the disk actually dies, i'll want to get a new laptop anyways.

You must not keep machines as long as I do. :) With Linux, I'd just turn off swap and be done with it. I've been running an SSD in my Mini-9 since I got it, and I've never used swap, And that was with 512M of memory, which I upgraded to 2G after a few years.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!