Announcement

Collapse
No announcement yet.

Swap with SSD?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    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)

    Comment


      #3
      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!
      The next brick house on the left
      Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.24.7 | Kubuntu 22.04.4 | 6.5.0-18-generic

      Comment


        #4
        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

        Comment


          #5
          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

          Comment


            #6
            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

            Comment


              #7
              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 :-)

              Comment


                #8
                Keep the swap if you want to hibernate. It's not necessary otherwise.

                Comment

                Working...
                X