Announcement

Collapse
No announcement yet.

Where has all the swap space gone?

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

    Where has all the swap space gone?

    I was just playnig around with sysinfo and discovered I have no swap.

    $ cat /proc/swaps
    Filename Type Size Used Priority


    And yet

    $ sudo fdisk -l | grep swap
    /dev/sda5 419441148 440405909 10482381 82 Linux swap / Solaris
    /dev/sdc3 33029640 41030009 4000185 82 Linux swap / Solaris
    /dev/sdb2 128000000 135999487 3999744 82 Linux swap / Solaris

    That sda, sdb and sdc are working is obvious from

    df $ df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/sdb6 83170748 12004652 66918196 16% /
    none 4 0 4 0% /sys/fs/cgroup
    udev 2009096 12 2009084 1% /dev
    tmpfs 404644 1428 403216 1% /run
    none 5120 0 5120 0% /run/lock
    none 2023212 212 2023000 1% /run/shm
    none 102400 20 102380 1% /run/user
    /dev/sdb3 206296972 164964444 30830120 85% /home/jon/our-pix
    /dev/sda2 52326396 51370664 955732 99% /mnt/win_c
    /dev/sda3 157286396 15847312 141439084 11% /mnt/win_d
    /dev/sdb5 135167996 109718236 25449760 82% /home/jon/music-mp3
    /dev/sdc8 154691392 50921652 95888740 35% /home/jon/jon-files
    /dev/sdc7 131978052 109657180 15610124 88% /home/jon/music_mp3
    /dev/sdc9 39598768 7271004 30309600 20% /samba-transf

    Two questions:

    1 - Why did the installation not find the swap spaces (three!)?

    2 - How can I get them back?

    (I have 4GB of memory, so it has not been a problem yet.)
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Question: Why do you have multiple swap partitions? You only need one even if you have multiple OS's installed.

    If the OS isn't actively using swap, then proc won't report any. These days, on modern PCs with lots of RAM, swap is rarely used by the OS. A swap partition is 'usually' established on laptops where hibernation (??) is going to be used.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Just to be sure, can you post the output of:
      Code:
      grep swap /etc/fstab
      and
      Code:
      sudo blkid | grep swap

      Comment


        #4
        Originally posted by Snowhog View Post
        Question: Why do you have multiple swap partitions? You only need one even if you have multiple OS's installed.

        If the OS isn't actively using swap, then proc won't report any. These days, on modern PCs with lots of RAM, swap is rarely used by the OS. A swap partition is 'usually' established on laptops where hibernation (??) is going to be used.
        Back when I had less RAM (thus using swap more), a slower PC, and 4 hard drives, I learned you could have multiple swaps and if you gave them the same priority it worked like a RAID0. Not saying it's needed any more or in this case, just sayin'.

        Please Read Me

        Comment


          #5
          Originally posted by Snowhog View Post
          Question: Why do you have multiple swap partitions? You only need one even if you have multiple OS's installed.
          Just sayin', what if you want to hibernate multiple OS's? Or is that not possible, or a bad idea?



          Regards, John Little
          Regards, John Little

          Comment


            #6
            Hmm. Okay, I didn't consider that.

            Hibernate saves the state of your computer to the hard disk and completely powers off. When resuming, the saved state is restored to RAM.
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment

            Working...
            X