Results 1 to 8 of 8

Thread: Swap Partition

  1. #1
    Join Date
    Nov 2010
    Location
    /Earth/Asia/India
    Beans
    218
    Distro
    Ubuntu 14.04 Trusty Tahr

    Question Swap Partition

    I have 6GB RAM , can i delete the my SWAP partition so as to speed up my ubuntu ?

    Swap creation takes a toll on my boot time.

  2. #2
    Join Date
    Dec 2010
    Beans
    21

    Re: Swap Partition

    You COULD, I suppose. It shouldn't effect your boot time very much, though. And within Ubuntu itself, having it available would make processes faster.

  3. #3
    Join Date
    Nov 2010
    Location
    /Earth/Asia/India
    Beans
    218
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Swap Partition

    Creation of swap during boot takes 10-15 seconds
    That is why i want to delete swap

  4. #4
    Join Date
    Jan 2011
    Beans
    1,151

    Re: Swap Partition

    Always keep a swap partition or file because Linux might accident try to access it and cause your system to experience freezes.

    Just delete it and make a swap file, you just lose the ability to hibernate
    (\ /)
    (O.o)
    (> <)
    This is Bunny. Copy Bunny into your signature to help him on his way to world domination.

  5. #5
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Swap Partition

    You could just use gparted and turn swap off...or...

    You could play around with swappiness

    More here

  6. #6
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Swap Partition

    it shouldn't take any more than a few cycles to mount the swap partition, check for yourself with
    Code:
    sudo swapon -s
    and take note of the path
    Code:
    sudo swapoff -a
    sudo swapon <path>
    if something is taking 10-15 seconds, I would look a little deeper to see what it is

  7. #7
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Swap Partition

    Quote Originally Posted by ranger1021994 View Post
    Creation of swap during boot takes 10-15 seconds
    That is why i want to delete swap
    that sounds really unlikely, the swap partition is already on your hard drive, ready to use. (And if mounting the swap partiton iss low, then that's a completely different problem, something related to your hard drive, mounting the drives etc.).

    Anyway, removing swap will not speed up your system in any way, and might even have the opposite effect on some situations.

    edit: how did you come to the conclusion that turning on swap is slowing your boot? Did you use a bootchart? IF you did, can we see it? Or if you are just basing this on messages output to the screen during non-graphical boot, keep in mind that most messages are actually hidden unless you remove the "quiet" option from kernel parameters in Grub. So what you see on the screen is often a message about a task that has already completed, not something that the system is currently working on. And any slowdowns or boot freezes can be because of something completely different than what's visible on the screen...
    Last edited by mcduck; October 1st, 2012 at 08:33 AM.

  8. #8
    Join Date
    Nov 2010
    Location
    /Earth/Asia/India
    Beans
    218
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Swap Partition

    Quote Originally Posted by mcduck View Post
    that sounds really unlikely, the swap partition is already on your hard drive, ready to use. (And if mounting the swap partiton iss low, then that's a completely different problem, something related to your hard drive, mounting the drives etc.).

    Anyway, removing swap will not speed up your system in any way, and might even have the opposite effect on some situations.

    edit: how did you come to the conclusion that turning on swap is slowing your boot? Did you use a bootchart? IF you did, can we see it? Or if you are just basing this on messages output to the screen during non-graphical boot, keep in mind that most messages are actually hidden unless you remove the "quiet" option from kernel parameters in Grub. So what you see on the screen is often a message about a task that has already completed, not something that the system is currently working on. And any slowdowns or boot freezes can be because of something completely different than what's visible on the screen...
    I ran dmesg and found that swap creation took almost 22 seconds.
    Sometimes dmesg shows its udevd taking 22 sec and sometimes it is swap creation.

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
  •