Announcement

Collapse
No announcement yet.

virtual memory not taken into account

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

    virtual memory not taken into account

    Since I installed kubuntu, my box was slow, compared to what i was used on other linux distributions, see:
    http://kubuntuforums.net/forums/inde...opic=3114608.0

    Once the problem resolved, I found that my MSI340x laptop was still not that sharp. So I went to investigate more in depth memory thru the use of different tools and commands:
    http://www.cyberciti.biz/faq/linux-check-memory-usage/

    To my surprise the command free -m yielded the following output:
    fl@MSIX340:~$ free -m
    total used free shared buffers cached
    Mem: 1976 1255 721 0 61 648
    -/+ buffers/cache: 545 1431
    Swap: 0 0 0
    fl@MSIX340:~$

    Does that mean, that I have access to no swap memory at all? While I know that I have as a 1GiB partition on the hdd. If this is the case, how do I assign the virtual memory to be used by kubuntu?

    Edited: the swap partition is 1GiB and not 1 meg

    #2
    Re: virtual memory not taken into account

    Well, do you have your swap partition identified in your /etc/fstab file?

    Let's see the output of:
    Code:
    cat /etc/fstab
    and
    Code:
    sudo blkid
    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: virtual memory not taken into account

      Good to see you around. Here is the output:

      fl@MSIX340:~$ cat /etc/fstab
      # /etc/fstab: static file system information.
      #
      # Use 'blkid -o value -s UUID' to print the universally unique identifier
      # for a device; this may be used with UUID= as a more robust way to name
      # devices that works even if disks are added and removed. See fstab(5).
      #
      # <file system> <mount point> <type> <options> <dump> <pass>
      proc /proc proc nodev,noexec,nosuid 0 0
      /dev/sda5 / ext2 errors=remount-ro 0 1
      # swap was on /dev/sda10 during installation
      UUID=68ff3589-f4f1-4ffc-91a7-c511dcbc6afb none swap sw 0 0
      /dev/scd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
      fl@MSIX340:~$


      fl@MSIX340:~$ sudo blkid
      [sudo] password for fl:
      /dev/sda1: UUID="A07E59777E594766" TYPE="ntfs"
      /dev/sda5: UUID="163f273c-d3d2-42f7-ae90-8091071ff409" TYPE="ext2"
      /dev/sda6: UUID="1e3ed85f-3d09-4ac7-ac96-2a421490f8ca" TYPE="ext2"
      /dev/sda7: UUID="9da4aa97-57a2-42b6-a069-9b40f65ad8bd" TYPE="ext2"
      /dev/sda8: UUID="28580a60-371b-400a-b170-24036b6030fe" SEC_TYPE="ext2" TYPE="ext3"
      /dev/sda9: UUID="90172e85-ac61-43d0-8388-0878ed80239a" SEC_TYPE="ext2" TYPE="ext3"
      /dev/sda10: UUID="9a241518-ae4f-4fd6-aaee-c016372c6339" TYPE="swap"
      fl@MSIX340:~$

      Comment


        #4
        Re: virtual memory not taken into account

        Originally posted by francois.e
        Good to see you around. Here is the output:

        fl@MSIX340:~$ cat /etc/fstab
        # swap was on /dev/sda10 during installation
        UUID=68ff3589-f4f1-4ffc-91a7-c511dcbc6afb none swap sw 0 0
        fl@MSIX340:~$


        fl@MSIX340:~$ sudo blkid
        /dev/sda10: UUID="9a241518-ae4f-4fd6-aaee-c016372c6339" TYPE="swap"
        fl@MSIX340:~$
        Update the UUID for the swap entry in /etc/fstab to reflect what it actually is (now) as reflected by blkid. Then reboot. Rerun free -m and you'll see your swap.
        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: virtual memory not taken into account

          Thanks a lot. You are a resource (including memory) without limits. After modifying fstab according to your procedure the new output is:

          fl@MSIX340:~$ free -m
          total used free shared buffers cached
          Mem: 1976 1383 592 0 62 688
          -/+ buffers/cache: 633 1343
          Swap: 1074 0 1074
          fl@MSIX340:~$

          By the way,

          1) is there another way than going in to root mode and using vi /path/to/file to modify the files with root access? Otherwise, I will relearn the way to do it.

          2) is it possible that the memory problem that I had with firefox gnash applet was due to the absence of a swap file? (See Tried basics but Kubuntu is still slow!: http://kubuntuforums.net/forums/inde...opic=3114608.0)



          Comment


            #6
            Re: virtual memory not taken into account

            Originally posted by francois.e

            1) is there another way than going in to root mode and using vi /path/to/file to modify the files with root access? Otherwise, I will relearn the way to do it.
            In the CLI, you can use nano (after you install it) -- it provides a visible command menu, so you don't have to memorize obscure keystroke sequences.

            On the KDE desktop, you can do Alt-F2 "kdesudo kate" with no quote marks, to invoke the KDE Advanced Text Editor in Super User (aka root) mode.

            2) is it possible that the memory problem that I had with firefox gnash applet was due to the absence of a swap file? (See Tried basics but Kubuntu is still slow!: http://kubuntuforums.net/forums/inde...opic=3114608.0)
            Only if gnash needed to use swap -- a question that depends on other aspects of your system, mainly the amount of memory installed.

            Comment


              #7
              Re: virtual memory not taken into account

              You may also wish to adjust your swappiness. Read this page for info. I have mine set to 10. You have 2GB of memory, so a lower setting would probably be right for you.

              https://help.ubuntu.com/community/SwapFaq

              Comment


                #8
                Re: virtual memory not taken into account

                Thanks for the tips:

                I have added vm.swappiness=10 at the end of the prescribed file thru nano:
                root@MSIX340:/home/fl# nano /etc/sysctl.conf
                root@MSIX340:/home/fl#

                Nano works great.

                Lets see if swappiness will make a difference after reboot.

                l@MSIX340:~$ free -m
                total used free shared buffers cached
                Mem: 1976 1117 859 0 66 470
                -/+ buffers/cache: 580 1395
                Swap: 1074 0 1074
                fl@MSIX340:~$

                Swap does not seem to be used. Maybe, I should start many applications to see it work? In addition, as I have a lot of hdd space, maybe I should increase the swap partition to 2gig. Will that make a big difference?

                Comment


                  #9
                  Re: virtual memory not taken into account

                  Swap rarely gets used, at least here. I have 2Gb of RAM and a 2Gb swap partition. I don't use many memory intensive programs at one time either.

                  That your swap isn't being utilized is not a bad thing. It just means that Linux doesn't need it - yet.
                  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


                    #10
                    Re: virtual memory not taken into account

                    I'm running 8.04 with 3GB, but I recently installed Chromium and that eats up all the memory in short order and then it starts to go into disk swap. This is the only program that I have ever seen use swap. Before that I didn't think that it would ever get used. What I did was disable it and my machine runs fine. And Chromium works better too. I've heard people say that you don't need to use swap nowadays - and I would agree. My guess is that it may be useful in keeping a machine from freezing in an extreme case, but I've never seen that situation.

                    One more thing, I have recently installed Linux on two machines with 64MB and 256MB respectively. I noted with interest that the 64MB machine, although completely bogged down, still did not go into swap.

                    Comment


                      #11
                      Re: virtual memory not taken into account

                      I recalled reading somewhere about gnash and memory /cpu issues and found this

                      http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575089

                      http://lxer.com/module/forums/t/30974/

                      Could this be your problem? What happens if you use Flash instead?

                      Comment


                        #12
                        Re: virtual memory not taken into account

                        Interesting about gnash. I'll run top once in a while and see if it shows up. As far as Flash is concerned, I have no idea if, when, or where, it is running. Players come and go and sometimes the music keeps playing regardless. It is a well hidden process. It doesn't even show up in the process table. Pretty sneaky stuff. I guess that's why it doesn't really work properly. Kubuntu needs a Flash control panel. (I'd better stop before I really get going. lol) Anyway, what I'm saying is that I know no way to run Flash or not.

                        Comment


                          #13
                          Re: virtual memory not taken into account

                          Flash does have a problem sometimes with not closing the process after you have used it. And it does use a lot of processor resources. It shows up in the process listing as npviewer.bin.

                          Comment


                            #14
                            Re: virtual memory not taken into account

                            Thanks Detonate, that at least confirms my sanity. Rather than totally hijack this thread, I've started another one about Flash here.

                            I'm still interested in the original thread and wonder if anybody else has ever experienced Linux using swap. Like I said earlier, I turned it off and the Chromium runs better and nothing else is effected. I honestly don't think we need to add a swap partition to a Linux install - it's just a waste.


                            Comment


                              #15
                              Re: virtual memory not taken into account

                              In normal use gkrellm reports no swap usage for me (Dell inspiron 630m, 2Gb Ram).

                              On waking up from hibernation that I have induced, 2 mb of the swap partition is used. If the laptop hibernates through lack of use, then on resume it's more and it's not cleared until I shut down.

                              Comment

                              Working...
                              X