Results 1 to 8 of 8

Thread: SWAP on SSD, not used, Delete it?

  1. #1
    Join Date
    Dec 2007
    Location
    Belgum - Antwerp
    Beans
    179
    Distro
    Ubuntu

    SWAP on SSD, not used, Delete it?

    Hi all,

    Today i was for the first time kinda stressing my PC. Was running two VMs and bunch of other stuff. So first time most of the RAM was used.
    So i checked the system monitor to see how it performed. And noticed that SWAP isnt used at all. And yes i use SSD.

    What i am wondering now. As far as i understand. SWAP is kind of not so desirable on an SSD right? Because of the potential wear.
    Maybe this is why its not even used already by default?

    Any way should i delete Swap then? Because its actually disabled somehow on SSDs? Or is it actually still used? And its still ok to use it?

    Thanks in advance,
    Nikolai
    The truth will set you free!

  2. #2
    Join Date
    Jan 2011
    Beans
    49

    Re: SWAP on SSD, not used, Delete it?

    The more installed RAM you have the less the Swap will be used, in fact my Swap file is never used since I have 4GB of RAM. As for deleting, don't since it is a vital partition to the operating system. Here's a that may help link http://askubuntu.com/questions/19376...buntu-on-a-ssd

  3. #3
    Join Date
    May 2009
    Location
    Fareham, UK
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: SWAP on SSD, not used, Delete it?

    I'm no expert but I believe you can't hibernate without swap space.
    Catch me on Freenode - imark

  4. #4
    Join Date
    Dec 2007
    Location
    Belgum - Antwerp
    Beans
    179
    Distro
    Ubuntu

    Re: SWAP on SSD, not used, Delete it?

    But why does system monitor shows me that Swap is not used at all? Even when almost all RAM is used.
    The truth will set you free!

  5. #5
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: SWAP on SSD, not used, Delete it?

    Swap is not an essential part of the system. I'm using an EeePC 900 which has never had a swap partition on it. It works fine. You can't hibernate without swap equal to at least the amount of RAM, but you can suspend.

    Your swap partition probably isn't being used because it isn't defined in /etc/fstab. If you want it to be used, you need to edit /etc/fstab as root, either with a terminal editor such as nano or vi, or with a GUI editor run with gksu (or equivalent). Add the following:
    Code:
    UUID=nnnnnnnnnnn none            swap    sw              0       0
    to the end of /etc/fstab

    In place of the string of nnnnns, add the UUID of your swap partition. To find out what it is, run the command
    Code:
    sudo blkid
    For example, the relevant entry from my desktop machine reads:
    Code:
    /dev/sdb7: UUID="ca858886-6f4c-47a7-95b4-9bec3e3ce793" TYPE="swap"
    You copy the number – it will be different on your machine – and add it in place of the nnnnnn that I've shown above.

    Then run the command
    Code:
    sudo swapon -a
    to enable swap.
    Please, people, remember to BACKUP before you install that new system. Same if you're upgrading.

    Ubuntu membership via Forums contributions

  6. #6
    Join Date
    Dec 2007
    Location
    Belgum - Antwerp
    Beans
    179
    Distro
    Ubuntu

    Re: SWAP on SSD, not used, Delete it?

    look my swap line looks like this
    # swap was on /dev/sda6 during installation
    UUID=5f8018ef-6567-4e01-8464-21621d6f0173 none swap sw 0 0

    edit:
    ah blkid gives
    /dev/sda6: UUID="5f8018ef-6567-4e01-8464-21621d6f0173" TYPE="swap"

    edit2:
    i think i only have to do swapon -a to enable it.

    But what actually is interesting to me. Im actually considering deleting swap and extending my root partition. Because Win 7 already consumes most part of my not that big ssd drive in the first place. So from 120 of my ssd, my linux partition is basically only 20 gigs. And A view gigs are used by other system recovery partitions and swap ofc. So my linux install is kinda on a low diskspace. And additional view gigs would be cool.
    And what i am actually thinking about now. Is how normal or not normal it is to use Swap on an SSD? I suppose its basically just ok. But since i want a bit bigger system partition it is ok to remove it eventually.
    Last edited by Nikolai D.; August 6th, 2013 at 11:26 AM. Reason: add info
    The truth will set you free!

  7. #7
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: SWAP on SSD, not used, Delete it?

    I was expecting that you'd find the UUIDs were different, but they look the same. I'm not sure why it's not working.
    Please, people, remember to BACKUP before you install that new system. Same if you're upgrading.

    Ubuntu membership via Forums contributions

  8. #8
    Join Date
    Dec 2007
    Location
    Belgum - Antwerp
    Beans
    179
    Distro
    Ubuntu

    Re: SWAP on SSD, not used, Delete it?

    Quote Originally Posted by Irihapeti View Post
    I was expecting that you'd find the UUIDs were different, but they look the same. I'm not sure why it's not working.
    thank you for instruction
    The truth will set you free!

Tags for this Thread

Bookmarks

Posting Permissions

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