Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I just noticed something interesting, which has been happening as of late. When I first boot up my laptop (gentoo-2.6.12-r13) and run free -m, I get ~65 megs of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    133

    Memory Leak?!


    Hi,
    I just noticed something interesting, which has been happening as of late. When I first boot up my laptop (gentoo-2.6.12-r13) and run free -m, I get ~65 megs of used ram without caches and buffers. This is under E17.
    Anyways, After about a day of normal use (firefox, thunderbird, muine, gaim, eclipse, gnome-terminal), if I run free -m again, I get ~500 megs of used ram without caches and buffers! This is with all programs closed except E17 itself.
    If I run gnome-system-monitor, and look at the processes, it does not account for this massive ram usage. I can't seem to track down why this is happening. Does anyone have a suggestion of where to look, or why this might be happening?

    Thanks,
    Mike

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Can you try $ ps aux?
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  3. #3
    Linux Newbie GNOME_n00b's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    142
    mjman
    firefox is well known to be a memory hog. if you leave it open, it will eat up your RAM.

  4. #4
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    133
    free reports very high usage even after I close firefox.

    I wrote a quick little perl script that totals the RSS and VSZ values from ps, and I get this when I'm running muine and firefox:

    rss total: 526 Mb
    vsz total: 1073 Mb

    This pretty closely agrees with the output from free. However, when I close
    firefox and muine, the output from free barely changes, but my script gives:

    rss total: 140 Mb
    vsz total: 308 Mb

    which is much closer to what I would expect. I don't get it...

  5. #5
    Linux Newbie GNOME_n00b's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    142
    seems to be quite a considerable decrease after you quit firefox. try quitting thunderbird too.

    just a wild thought, but are you sure you haven't been hacked (ie ps is giving results that are hiding the tracks of a rootkit). what you've said doesn't say whether you're permanantly connected to the internet and/or running a server etc....so i can only make reasoned guesses.
    don't get worried or anything . thats probably not the case, but given the information, i can only speculate.

  6. #6
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    133
    Just found the culprit!

    I took a look in /etc/cron.daily to find that updatedb was running nightly. I rebooted, bringing the mem usage down to ~65 megs. Then, I ran updatedb, and when it finished, the mem usage was at >500 megs, and remained that high after the process stopped.

    weird.

  7. #7
    Linux Newbie GNOME_n00b's Avatar
    Join Date
    May 2005
    Location
    UK
    Posts
    142
    glad you found the cause . i'm really surprised that updatedb used up that much memory for such a long period. for me, it only runs for about 5 minutes . its quite resource hungry for that 5 minutes, though.

  8. #8
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    133
    Well the weird thing is that even after updatedb finishes, free and vmstat still claim that the memory is in use. Almost like there is a bug in the kernel that is causing it to reserve memory for a processes that has ended.

Posting Permissions

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