linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Memory / swap leak?
Date: Mon, 29 Dec 2014 10:49:32 -0800 (PST)	[thread overview]
Message-ID: <alpine.LSU.2.11.1412291026140.2692@eggly.anvils> (raw)
In-Reply-To: <54A0A3BB.1070908@ubuntu.com>

On Sun, 28 Dec 2014, Phillip Susi wrote:
> 
> Something seems to be eating up all of my swap, but it defies explanation:
> 
> root@faldara:~# free -m
>              total       used       free     shared    buffers     cached
> Mem:          3929       2881       1048        146        192       1314
> - -/+ buffers/cache:       1374       2555
> Swap:         2047       2047          0
> 
> root@faldara:~# (for file in /proc/*/status ; do cat $file ; done) |
> awk '/VmSwap/{sum += $2}END{ print sum}'
> 151804
> 
> So according to free, my entire 2 gb of swap is used, yet according to
> proc, the total swap used by all processes in the system is only 151
> mb.  How can this be?

shmem (tmpfs) uses swap, when it won't all fit in memory.  df or du on
tmpfs mounts in /proc/mounts will report on some of it (and the difference
between df and du should show if there are unlinked but still open files).
ipcs -m will report on SysV SHM.  /sys/kernel/debug/dri/*/i915_gem_objects
or similar should report on GEM objects.

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-12-29 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-29  0:43 Phillip Susi
2014-12-29 18:49 ` Hugh Dickins [this message]
2014-12-30  2:10   ` Phillip Susi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LSU.2.11.1412291026140.2692@eggly.anvils \
    --to=hughd@google.com \
    --cc=linux-mm@kvack.org \
    --cc=psusi@ubuntu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox