Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #159044

Re: Tracking down memory leaks

From The Wanderer <wanderer@fastmail.fm>
Newsgroups linux.debian.user
Subject Re: Tracking down memory leaks
Date 2015-10-13 16:40 +0200
Message-ID <qj8Ub-Wq-39@gated-at.bofh.it> (permalink)
References <qj8Ku-KS-19@gated-at.bofh.it>
Organization This space intentionally left blank.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 2015-10-13 at 10:26, Marc Shapiro wrote:

> Is there a way to determine what is using up my memory?  I have an
> 8GB system and every few days the memory usage rises to over 7 GB and
> up to a GB, or more of swap is used.  Granted, I have 3 X sessions
> running, along with 2 instances of Firefox and one of Chrome, not to
> mention up to 3 instances of Libre Office, but... When I first added
> the 8 GB (I used to do this on 2.25 GB!) I could run for months
> without having a memory problem.  Now it's every few days.
> 
> When this happens, I exit all programs and shut down all three X 
> sessions.  I also log out the other two users.  This leaves me with
> only a single login and nothing but bash running.  When I run 'free'
> it usually shows over 2 GB in use!  When I reboot, the memory usage
> is back down at about 250 MB.  Much more reasonable.
> 
> So how do I tell what is using up the memory and not freeing it up?

My usual first stop is top. Launch it, then press 'M' (capitalized) to
sort by memory usage; that will tell you what process(es) is(/are) using
up the largest share(s) of the RAM.

What the next steps are depends on what those processes are. In my case,
with the last significant memory leak I found, the process was X, and
further digging revealed that the X heap size was growing without limit;
it turned out to be a problem with fglrx, and went away when I switched
to the radeon drivers.

In your case, since it apparently happens without X running, the only
candidates I can think of are background (daemon-like) processes or the
kernel itself.

> Is there a way to free that memory without having to reboot?

Depends what process(es) is/are using it.

If it's a background daemon, restart that daemon.

If it's the kernel, probably not, but it would be worth reporting the
problem as a bug against the kernel.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Tracking down memory leaks Marc Shapiro <marcnshap@gmail.com> - 2015-10-13 16:30 +0200
  Re: Tracking down memory leaks The Wanderer <wanderer@fastmail.fm> - 2015-10-13 16:40 +0200
  Re: Tracking down memory leaks Don Armstrong <don@debian.org> - 2015-10-13 17:00 +0200
    Re: Tracking down memory leaks Marc Shapiro <marcnshap@gmail.com> - 2015-10-17 18:10 +0200
      Re: Tracking down memory leaks Don Armstrong <don@debian.org> - 2015-10-18 22:00 +0200
        Re: Tracking down memory leaks Marc Shapiro <marcnshap@gmail.com> - 2015-10-21 07:00 +0200
          Re: Tracking down memory leaks Jörg-Volker Peetz <jvpeetz@web.de> - 2015-10-21 08:40 +0200
            Re: Tracking down memory leaks (SOLVED) Marc Shapiro <marcnshap@gmail.com> - 2015-10-22 16:30 +0200
              Re: Tracking down memory leaks (SOLVED) Nicolas George <george@nsup.org> - 2015-10-22 16:40 +0200
                Re: Tracking down memory leaks (SOLVED) Cindy-Sue Causey <butterflybytes@gmail.com> - 2015-10-23 19:30 +0200
                Re: Tracking down memory leaks (SOLVED) Nicolas George <george@nsup.org> - 2015-10-23 19:40 +0200
                Re: Tracking down memory leaks (SOLVED) Lisi Reisz <lisi.reisz@gmail.com> - 2015-10-23 20:10 +0200
                Re: Tracking down memory leaks (SOLVED) The Wanderer <wanderer@fastmail.fm> - 2015-10-23 20:40 +0200
                Re: Tracking down memory leaks (SOLVED) Reco <recoverym4n@gmail.com> - 2015-10-23 20:20 +0200
                Browser tabs, was Re: Tracking down memory leaks David Wright <deblis@lionunicorn.co.uk> - 2015-10-23 21:00 +0200
              Re: Tracking down memory leaks David Wright <deblis@lionunicorn.co.uk> - 2015-10-22 17:30 +0200
                Re: Tracking down memory leaks Marc Shapiro <marcnshap@gmail.com> - 2015-10-24 08:30 +0200
              Re: Tracking down memory leaks (SOLVED) <tomas@tuxteam.de> - 2015-10-23 09:40 +0200
        Re: Tracking down memory leaks Michael Jones <mj@mikejonesey.co.uk> - 2015-10-21 23:40 +0200
  Re: Tracking down memory leaks Michael Jones <mj@mikejonesey.co.uk> - 2015-10-21 23:30 +0200
  Re: Tracking down memory leaks Michael Jones <mj@mikejonesey.co.uk> - 2015-10-21 23:40 +0200

csiph-web