Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14
My problem is that some applications seem to overconsume memory and not release it after closing down. I'd like to detect what's going on. I do use too many tabs ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2010
    Posts
    11

    Memory goes crazy (in KDE?)


    My problem is that some applications seem to overconsume memory and not release it after closing down. I'd like to detect what's going on.

    I do use too many tabs in firefox, but still somehow it's exceedingly greedy. Also not all space gets freed if I close firefox down!

    Moreover, I found a curious behaviour. I tried composing large images (10x A4 300dpi) into a 15MB PDF file with imagemagick and the process went crazy and consumed *all* memory until it got killed. That happened repeatedly. Whereas logging in on a normal console without X was absolutely fine.

    I have ArchLinux, KDE 4.3.4, 1GB RAM, 300MB Swap.
    I checked the RAM with memtest.

    So basically I first would like to know which processes consume how much of the memory?
    Then I'd like to know why the memory is still occupied (as shown by "free") after I close down the program? And who keeps that memory (for example the firefox process is really dead, but memory still scarce)?
    Could there be some funny error or leak that makes processes endlessly allocate memory - more than they need?

    Can anyone suggest a method to examine my problem?

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,559
    Linux will do that. Some of your memory will be taken up for caches and buffers and some will be used to keep recently run applications handy for a quicker start the nect time you use them. It will be released when needed.

    It makes sense if you think about it. There's no point having memory in your computer that isn't being used.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    Jan 2010
    Posts
    11
    That memory isn't easily released. The memory seems to be full with memory not get released and the system is slow, before I don't get a major crash somewhere.
    So I wish to find a way to release that memory. Especially if it's firefox using all of the 1GB RAM and I plan to do some image editing after closing down firefox.

    Also my actual question is how to spot who owns which memory.
    It's not good if a program allocates far more memory than it can possibly need.

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,559
    I would expect to see very little memory free on a Linux box especially if it has been used for a while. On my 4gb box, I can get upto 80% used over a weekend depending on what I do. It's currently at ~75% so it has been a varied and pretty heavy weekend of use

    FF used to have a memory leak but I think it was plugged in 3.5.

    Troubleshooting Memory Usage - RimuHosting may help with your troubleshooting
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  5. #5
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Memory management is different in Unix-like systems such as Linux. You do not need to be concerned about memory as you may have been in Windows. The memory management is much more advanced and will cache applications as needed, freeing it again when it's required. There are a lot of articles online about how it works, all in all though you can trust your system to look after itself.

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    I don't know how you are checking memory, but you should use free -m command and pay attention to second line

    Code:
    Mem:          2026       1114        912          0        264        422
    -/+ buffers/cache:        426       1599
    Swap:          478          0        478
    this is my laptop currently, only 426mb is actually used, but it seems like i'm using 1gb

  7. #7
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,559
    Quote Originally Posted by elija View Post
    I would expect to see very little memory free on a Linux box especially if it has been used for a while. On my 4gb box, I can get upto 80% used over a weekend depending on what I do. It's currently at ~75% so it has been a varied and pretty heavy weekend of use

    FF used to have a memory leak but I think it was plugged in 3.5.

    Troubleshooting Memory Usage - RimuHosting may help with your troubleshooting
    Should have added that most of my memory use is buffers and cache
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  8. #8
    Just Joined!
    Join Date
    Jan 2010
    Posts
    11
    Hmm, I've just had his problem again

    The memory is really *not* released after I close down firefox (as shown by gkrellm). Also the systems really slows down and crashes when the memory fills up even more.

    Any ideas how I can detect what's going on?
    Or the the disproportion between memory and swap size an issue?

    PS: I do not wish to fix firefox and also the problem is real.

  9. #9
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    post output of free -m command

  10. #10
    Just Joined!
    Join Date
    Jan 2010
    Posts
    11
    I need to wait until I get the no release problem, but first I just had another very annoying problem (maybe that's actually the origin of all that).

    With firefox I had
    Code:
                 total       used       free     shared    buffers     cached
    Mem:          1009        966         43          0          0         20
    -/+ buffers/cache:        946         63
    Swap:          235        235          0
    After closing firefox down I had
    Code:
                 total       used       free     shared    buffers     cached
    Mem:          1009        729        280          0          2        116
    -/+ buffers/cache:        609        399
    Swap:          235        232          3
    Btw, apart from KDE I have nothing else running now.

    Anyway, I just restarted firefox. Now the big problem was: When I had firefox running and the swap down to 0MB, the system started accessing the harddrive endlessly. The free RAM *fluctuated* around 80M for a very long time even though I didn't do anything new on the computer. As if the swapping algorithm was broken.

    Now with 1MB free swap the harddrive occationally rattles for no reason and everything I start makes it go crazy again for a moment. All in all every operation now is slow since the harddrive gets busy

    Any ideas why having zero swap is so bad and an irreversible issue?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •