Results 1 to 8 of 8

Thread: Swap with SSD?

  1. Back To Top    #1
    Contributing Member mick.kde's Avatar
    Join Date
    Jan 2020
    Location
    Nashville
    Posts
    48
    Threads
    11
    Local Date
    Jun 6th 2020
    Local Time
    09:08 PM

    Swap with SSD?

    I'll soon be upgrading to the latest Kubuntu, as many of you will, and that may involve work with partitions. Being old school (and also being an old guy), I've always had a Swap partition along with separate Root and Home partitions. An acquaintance recently told me that I did not need a Swap partition because (1) I have lots of RAM, 32 GB, in fact, and (2) an SSD. He said that a Swap partition was bad for an SSD.

    When I upgrade, should I get rid of the Swap partition? Is a Swap partition really bad for an SSD? I have googled this question and the information is all over the place.

    There are some very knowledgeable people on this forum and I would appreciate your comments.

    Mick
    "Strange memories on this nervous night in Las Vegas."
    Hunter S. Thompson

  2. Back To Top    #2
    Cyborg sithlord48's Avatar
    Join Date
    Apr 2007
    Location
    127.0.0.1
    Posts
    2,946
    Threads
    42
    Local Date
    Jun 6th 2020
    Local Time
    10:08 PM
    I have not used swap in a long time. 32GB is alot of ram i have not used one with machines > 8GB ram. I've also heard swap on a SSD will wear them out quickly.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

  3. Back To Top    #3
    Kubuntu as a Second Language jglen490's Avatar
    Join Date
    Jul 2006
    Location
    Montgomery AL
    Posts
    1,613
    Threads
    53
    Local Date
    Jun 6th 2020
    Local Time
    09:08 PM
    I think you'll be fine without swap. All that depends on what you do with your computer, but at 32GB - probably good.

    The existence of a swap partition does not guarantee its use, so that particular SSD wear out argument is a red herring. It might be a good argument for a system that was used in such a way that it was always pushing memory pages off to swap, but again, you have 32GB so no worries.

    I have 16 GB and the last time I installed on an SSD, I screwed up and created a 16MB SWAP partition. Didn't even know about it until much later. That swap has never been used, and its' been a long time since my machine has even used a correctly sized swap. So for the next install (20.04LTS) - no swap!
    I feel more like I do now than I did when I got here.
    Home Brew PC: MSI B365M PRO-VDH(MS-7C39), 120GB+500GB, 16GB RAM
    Kubuntu 18.04.4.LTS Bionic, 5.3.0-53-generic x86_64, Plasma 5.12.9

  4. Back To Top    #4
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    10,660
    Threads
    435
    Local Date
    Jun 6th 2020
    Local Time
    10:08 PM
    jglen is correct about the swap on an SSD thing. It's FUD and a hold over from when SSDs were short-lived and small. It's simply a false narrative. The hint is in the SSD makers' warranties: SSDs have a warranty the equals or exceeds hard drives and no SSD maker warns about using swap. It's no more than a dynamically allocated part of your drive not unlike a VirtualBox virtual drive. I've never heard anyone advising not to host VMs on an SSD. Besides, if you actually did need to use swap, why would you not have it on your fastest device?

    As far as the need for a partition, you can use a swap file and not waste the space by partitioning for swap. It is unlikely that you'll encounter a need to swap to disk with 32GB of RAM unless you hibernate or suspend your system.

    I still occasionally encounter swap being used, but I only have 16GB of RAM. My memory runs about 50% full most of the time and when I throw transcoding or ripping a movie and have like 50 tabs open in a browser, plus editing with GIMP while moving files - you get the idea
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  5. Back To Top    #5
    Contributing Member mick.kde's Avatar
    Join Date
    Jan 2020
    Location
    Nashville
    Posts
    48
    Threads
    11
    Local Date
    Jun 6th 2020
    Local Time
    09:08 PM
    Quote Originally Posted by jglen490 View Post
    So for the next install (20.04LTS) - no swap!
    Thank you, all. Good advice.

    Mick
    "Strange memories on this nervous night in Las Vegas."
    Hunter S. Thompson

  6. Back To Top    #6
    Ascendant oshunluvr's Avatar
    Join Date
    Feb 2010
    Location
    New Bern, NC USA
    Posts
    10,660
    Threads
    435
    Local Date
    Jun 6th 2020
    Local Time
    10:08 PM
    FYI all, I keep a swap and mount tpmfs in RAM. Mounted this way, tmpfs will use RAM until it's half full then it will use swap. Just one more use for swap not yet touched on for this discussion.
    Please Read Me
    Be not the first by whom the new are tried, Nor yet the last to lay the old aside. - Alexander Pope, An Essay on Criticism, 1711

  7. Back To Top    #7
    Newbie
    Join Date
    Feb 2020
    Posts
    7
    Threads
    0
    Local Date
    Jun 7th 2020
    Local Time
    03:08 AM
    Interesting stuff. I've used a swap partition for years, and I've been using an SSD for a couple of years for my / & swap partition. I've rarely had to use swap, since I've got 16gb of ram. So when I install 20.04, I'll just go with a swap file :-)

  8. Back To Top    #8
    Junior Member
    Join Date
    Jan 2018
    Posts
    18
    Threads
    1
    Local Date
    Jun 6th 2020
    Local Time
    09:08 PM
    Keep the swap if you want to hibernate. It's not necessary otherwise.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •