Announcement

Collapse
No announcement yet.

[SOLVED] Swap Size Error

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

    [SOLVED] Swap Size Error

    I am trying out Xbuntu x64 v9.10 and as it lacks a forum (IRC-Chat is not very useful) I thought I'd check here.

    When installing I made an error and set the SWAP to 0 but the system auto set it to the default minimum 8mb.

    Since then I changed it to 2GB in GParted and it now shows as 2GB in size.

    When I look at memory usage in System Monitor I see that SWAP is still 8mb max.

    Wonder which is correct and how, if at all, I could fix this?
    The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

    #2
    Re: Swap Size Error

    Doubt this is an issue, but did you check the UUID on the swap partition after you resized it with GParted? You'll need to run:
    Code:
    sudo blkid
    and compare the UUID reported for your swap to that in your fstab entry. If they aren't the same, change the UUID in fstab.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Swap Size Error

      Thanks.

      The UID reported for my swap is the same as in the fstab entry.
      The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

      Comment


        #4
        Re: Swap Size Error

        With the System Monitor open, click on the System Load tab, then right-click on the Memory and Swap History graph, click on Properties > Scales and see what values are showing in Vertical Scale and if Automatic range detection is checked - mine is not so checked, and my Swap size is read correctly,
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Swap Size Error

          None of the settings referred to seem to be available; please see screenshot.

          Also now it is even more weird with System Monitor showing 507.8MB unlike the 8MB the earlier time.

          GParted shows as 2GB which was the set value.

          [img width=400 height=332]http://img188.imageshack.us/img188/2905/69897048.png[/img]

          [img width=400 height=265]http://img188.imageshack.us/img188/3950/98029996.png[/img]
          The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

          Comment


            #6
            Re: Swap Size Error

            In your picture - Resources - try right-clicking on the Memory and Swap History graph and see if you don't see what I've described.

            By the way, what version of KDE are you running? Your System Monitory looks different than mine (KDE 4.3.4).
            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Swap Size Error

              No right click options available in System Monitor.

              Linux R2D2 2.6.31-18-generic
              KDE 4.3.2
              The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

              Comment


                #8
                Re: Swap Size Error

                Code:
                man swapon
                So if you made a 8MB swap file during installation, and you don't want to use it, then
                Code:
                sudo swapoff /proc/filename
                should disable it.

                and if you have set up your 2GB swap partition in /etc/fstab, then

                Code:
                sudo swapon /dev/sda7
                should enable it.

                Comment


                  #9
                  Re: Swap Size Error

                  Read the mkswap man page. Just because you have a 2GB swap partition doesn't mean 2GB is in use, especially if the swap partition wasn't set up correctly in the first place.

                  Hope this helps -
                  we see things not as they are, but as we are.
                  -- anais nin

                  Comment


                    #10
                    Re: Swap Size Error

                    Originally posted by dibl
                    Code:
                    man swapon
                    So if you made a 8MB swap file during installation, and you don't want to use it, then
                    Code:
                    sudo swapoff /proc/filename
                    should disable it.

                    and if you have set up your 2GB swap partition in /etc/fstab, then

                    Code:
                    sudo swapon /dev/sda7
                    should enable it.
                    As mentioned, the swap is enabled at boot and GParted shows it as 2GB though System Monitor initially showed the original 8mb it now shows 507MB. Which reading is correct is the problem.

                    The swap shown in System Monitor is the total swap available not what is just in use.
                    The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

                    Comment


                      #11
                      Re: Swap Size Error

                      Are you using the gnome system monitor rather than kde's ksysguard (that might explain why you don't see the options)

                      As for the original problem, what does:
                      Code:
                      swapon -s
                      report?

                      Comment


                        #12
                        Re: Swap Size Error

                        Originally posted by kubicle
                        Are you using the gnome system monitor rather than kde's ksysguard (that might explain why you don't see the options)

                        As for the original problem, what does:
                        Code:
                        swapon -s
                        report?
                        As I mentioned at the beginning I am using Xbuntu and came here due to lack of a proper Xbuntu forum. I am using the default System Monitor in Xbuntu.

                        [img width=400 height=52]http://img97.imageshack.us/img97/8306/57524626.png[/img]
                        The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

                        Comment


                          #13
                          Re: Swap Size Error

                          Ah, didn't notice you were on xubuntu.

                          As you can see from 'swapon -s' output, your system is using a ram based (compressed) swap device that's 500Mb in size, and your swap partition is still reported as 8Mb. These is where you get the 500+Mb of swap available to your system.

                          I'd suggest the following:
                          1.
                          Code:
                          sudo swapoff -a
                          (disable all swap)
                          2.
                          Code:
                          sudo mkswap /dev/sda7
                          (recreate the swap space on /dev/sda7)
                          3.
                          Code:
                          sudo swapon /dev/sda7
                          (enable swap on /dev/sda7)
                          4. check 'swapon -s' and your system monitor to see whether your swap is shown correctly, you should also try a reboot to see that it is working after a boot

                          Here's some more information on ramzswap devices (out of interest, did you create it yourself, or did the system make it on it's own...possibly due to lack of swap space?):
                          http://compcache.googlecode.com/hg/README
                          http://code.google.com/p/compcache/w...ingAndUsingNew
                          http://compcache.googlecode.com/hg/s...zscontrol.html

                          Comment


                            #14
                            Re: Swap Size Error

                            Originally posted by kubicle
                            Ah, didn't notice you were on xubuntu.

                            As you can see from 'swapon -s' output, your system is using a ram based (compressed) swap device that's 500Mb in size, and your swap partition is still reported as 8Mb. These is where you get the 500+Mb of swap available to your system.

                            I'd suggest the following:
                            1.
                            Code:
                            sudo swapoff -a
                            (disable all swap)
                            2.
                            Code:
                            sudo mkswap /dev/sda7
                            (recreate the swap space on /dev/sda7)
                            3.
                            Code:
                            sudo swapon /dev/sda7
                            (enable swap on /dev/sda7)
                            4. check 'swapon -s' and your system monitor to see whether your swap is shown correctly, you should also try a reboot to see that it is working after a boot

                            Here's some more information on ramzswap devices (out of interest, did you create it yourself, or did the system make it on it's own...possibly due to lack of swap space?):
                            That finally fixed it as following System Monitor screenshot shows. Now both SM and GParted show the same value for swap. As for the ramzswap I did not do anything but, as you pointed out, the system most probably did due to lack of swap space.

                            [img width=400 height=338]http://img690.imageshack.us/img690/3811/68567261.png[/img]

                            Thanks for your help; I really appreciate it.

                            Regards
                            The way to see by faith is to shut the eye of reason .....Benjamin Franklin<br />Kubuntu 9.10 x64&nbsp; Xbuntu 9.10 x64&nbsp; Win7 x64 Ultimate<br />Linux User: 416878&nbsp; &nbsp; Kubuntu User: 22154

                            Comment

                            Working...
                            X