Announcement

Collapse
No announcement yet.

Swappiness

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

    Swappiness

    So, I've been using Gutsy for a while, and it seem that KDE is "gutsy" about maxing out the used RAM. I finally managed to get a rough estimate of my RAM using one of the gDesklets.

    It seems that after an initial boot with basic programs running, I'm using 440-490 MB of 1 GB of RAM. This is more than enough RAM, likely.

    However, after a short period of time, it seems that KDE maxes out the RAM, and starts acting like it's trying to "swap", since the RAM used doesn't go down, and it stays at a high of 980+ MB.

    I can close all my running programs, and it won't free up more than maybe 20 MB of RAM. I'm not sure what I've managed to screw around with. Amarok most noticeably starts "halting" the moment that I try to load ANY page in Konqueror and ANY sort of additional complex page mechanism (such as Javascript).

    I don't know what's hogging all my memory and making it act like it's a giant ape, but it's beginning to seriously screw with me. I'm getting tired of it acting like I don't have enough RAM.

    What solutions are there for this?

    #2
    Re: Swapspace

    use the
    Code:
    top
    command in the console to determine which program use the most memory. if it uses more than 15% you should probably kill it. Good luck
    Join the dark side<br />---------------------------------------------------------------------<br />Samsung NC10 netbook running<br />PCLinuxOS 2010 // Win XP

    Comment


      #3
      Re: Swappiness

      What about having 120 sleeping tasks, with 3-4 main tasks (Konqueror, Amarok, Kopete, Console)

      Comment


        #4
        Re: Swappiness

        Linux is very very good at managing the memory (unlike other less capable operating systems I could mention). Run kinfocenter and look at the memory, a lot of it will be cache, using the RAM, rather than /swap. Linux will expand to use available memory, what is the use of having memory if your not going to use it.

        Basically, nothing to worry about.

        Comment


          #5
          Re: Swappiness

          This might interest you:
          http://www.linux.com/feature/121916
          HP Pavilion dv6 core i7 (Main)
          4 GB Ram
          Kubuntu 18.10

          Comment


            #6
            Re: Swappiness

            KSysGuard is probably the more useful tool for observing both memory and swap space.

            It is very well possible to run Linux with a swappiness of 1:
            Code:
            sudo sysctl -w vm.swappiness=1
            When there is a real memory problem this command will make you notice a difference.

            Comment


              #7
              Re: Swappiness

              Well, I'm going to play around with these ideas, but I don't know that any of them are going to be a serious solution.

              It wouldn't be something to worry about if I weren't running a laptop with applications that are busy halting and freezing on me. I thought 1 GB of RAM should be MORE than enough, but K seems to be able to fill it up (from the 400 MB it manages to use when it starts) after running just 2-3 programs. When it gets busy trying to get data back from the disk, I get MANY application gripes -- I can't type something new in OpenOffice without Amarok halting its playback for 1-4 seconds... this gets quite tedious after a while. I'm sort of getting tired writing using KNotes just because other programs want to lag me. Even once I shut things down, I still have around 960 MB of RAM being used.

              I'm confused as to why it doesn't periodically clear itself at least occasionally, before hitting the upper limit. Yes, I understand, if it's not being used by some data or another, it would be a 'waste', but it's wasting time trying to load things from disk that it could have been keeping in RAM.

              *sigh*

              I'm beginning to lose my patience with KDE as a daily user interface; I'm only persuaded to use it because Vista frightens me. When my computing experience has become as painful as it has, I begin to lose hope...

              Comment


                #8
                Re: Swappiness

                I presently have 1.32 GB of RAM in this Toshiba P4, 2.8GHz.
                Until some time last summer I was running it on half a Gig and did not have any significant problems. Then I would sometimes see use of the swab file, now it's hardly ever touched.

                Presently I have the occasion the system slows down and after some searching I ran into this swappiness command I mentioned earlier.
                Yes, generally all available memory is in use.

                I have not been able to find a single application that's causing this lock up/ slow down, it is intermittent.
                But I'm fairly sure it has some link with Java, Java enabled sites and things like OO.
                But today I've been doing all kinds of things on this computer and it never showed the problem.
                I'm browsing with Firefox with some 6 tabs open and with Konqueror with up to 25 tabs open.
                At the same time I'm burning DVD's with K3b from a USB HD to a USB burner and I'm looking through some photo's for burning using Konqueror and GQView, I even ran up Stellarium to check for moon rise.
                No problems so far.

                One suggestion, install Firefox3 B4, except for plug ins it works reasonably well and it has a considerably smaller memory footprint.
                (It will install without overwriting your existing install)

                Comment


                  #9
                  Re: Swappiness

                  Originally posted by Lore Jade

                  I thought 1 GB of RAM should be MORE than enough, but K seems to be able to fill it up (from the 400 MB it manages to use when it starts) after running just 2-3 programs. When it gets busy trying to get data back from the disk, I get MANY application gripes -- I can't type something new in OpenOffice without Amarok halting its playback for 1-4 seconds... this gets quite tedious after a while. I'm sort of getting tired writing using KNotes just because other programs want to lag me. Even once I shut things down, I still have around 960 MB of RAM being used.

                  I'm confused as to why it doesn't periodically clear itself at least occasionally, before hitting the upper limit. Yes, I understand, if it's not being used by some data or another, it would be a 'waste', but it's wasting time trying to load things from disk that it could have been keeping in RAM.
                  This is a wrong interpretation of your memory usage situation, i.e. it is a Windows-centric interpretation. In Windows, when the memory is all used, you're done -- it's a bad thing. Linux is designed to use as much memory as possible at all times -- it's a good thing to use a lot of memory, and it's the best thing to use 100% of your memory. Linux manages the allocation of memory to running processes. It is entirely normal and desirable that the usage of memory will increase after your login, hopefully up to 100%, although I don't see that often, with 4GB.

                  The performance issues that you have may involve non-needed processes or daemons running. I would encourage you to investigate it from that angle, rather than a "running out of memory" angle, because that's the wrong theory. After you log in, open the Konsole and run "top" with no quotes, and observe which processes are using the most resources. Also you might get better hard drive performance by running hdparm, if you aren't already. Here's nice article on Linux performance:

                  http://rudd-o.com/archives/2007/10/0...w-to-fix-that/

                  Comment


                    #10
                    Re: Swappiness

                    To check that it is indeed swap space that's filling up your RAM use the command "free -m":

                    $ free -m
                    total used free shared buffers cached
                    Mem: 1010 850 160 0 22 277
                    -/+ buffers/cache: 550 460
                    Swap: 2384 130 2254
                    Here, I have about 1GB total RAM, 160MB of which is free - but 300MB of this is disk buffer and cache, meaning that 460MB is technically available for applications when needed. (Actually this isn't a great example - on my desktop typically I get a much greater cache:data ratio. Darn Firefox and Eclipse...)

                    You can also see that my sizeable swap partition is only using 130MB.

                    The thinking behind this approach (warning, I'm a computer scientist!) is that it's many, many times faster to access data in RAM than it is from a hard disk - I can't remember the exact figure but we're talking several orders of magnitude. By caching disk data in RAM, any future accesses to that data are sped up dramatically.

                    Comment


                      #11
                      Re: Swappiness

                      By chance, are you still using the Strigi daemon?? This system indexing 'tool' was introduced in Gutsy, and is a resource hog. Most who realized what it was doing to their system stopped the daemon from running at boot time.
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment

                      Working...
                      X