All of lore.kernel.org
 help / color / mirror / Atom feed
* Memory / swap leak?
@ 2014-12-29  0:43 Phillip Susi
  2014-12-29 18:49 ` Hugh Dickins
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Susi @ 2014-12-29  0:43 UTC (permalink / raw)
  To: linux-mm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

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?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCgAGBQJUoKO7AAoJENRVrw2cjl5ReXwH/3bS3ZUSU3ej0xiW+LwVMULg
MBJN43Jy4VCmaRbfs6HuDBmNINffGoPg2sV4Uq/fOyzhWdgL7FduT9eSkHtueO/M
yvVCN+gawtD1izdPL35XnWXyxaz8RWLA5kkUw8ze2HUEkFd1q6GRCLalweUdruxN
HVBE3EGSYWLkDD++2b4EVpjYeg7I/Zf85gLYMRGUQki4630VHfWgf9l+SlGWgVRC
u8EToFeORLglrq7t1tf5Y+p/3h/l0iyqGwrzUb8qnloTfsWQadUmoffmW8LMrp+7
THdW77JwPp/R+KAFd7tvDD0AcGOZ4+fHa+pXDpGF+3pH6/w12JlOp+gbJoHRu5w=
=m+bq
-----END PGP SIGNATURE-----

--
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory / swap leak?
  2014-12-29  0:43 Memory / swap leak? Phillip Susi
@ 2014-12-29 18:49 ` Hugh Dickins
  2014-12-30  2:10   ` Phillip Susi
  0 siblings, 1 reply; 3+ messages in thread
From: Hugh Dickins @ 2014-12-29 18:49 UTC (permalink / raw)
  To: Phillip Susi; +Cc: linux-mm

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Memory / swap leak?
  2014-12-29 18:49 ` Hugh Dickins
@ 2014-12-30  2:10   ` Phillip Susi
  0 siblings, 0 replies; 3+ messages in thread
From: Phillip Susi @ 2014-12-30  2:10 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: linux-mm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 12/29/2014 01:49 PM, Hugh Dickins wrote:
> 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.

Thanks, I didn't think about tmpfs.  Turns out the Ubuntu bootchart
package filled the max 2G of the /dev tmpfs.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCgAGBQJUogmVAAoJENRVrw2cjl5RBMsIAKpU5WYeR2w7S0w7j532Imom
G3bwXkFdsDaZ0UUbK6H7uBneqgnMRGGGAjBUtGsjb2TWva4mV+StqkGoqdcVTrgP
NMQ7X/ypgYNa2Zisu4NO8AnyhHkR+ca1JQ0h806puyyHK8EFAoeleUCkzhemCFgT
PfI3pLA/l5x96+jBtEDrgELjVBDwuUGXt8txVLEV3WJfcfRpzR/DfUITyMQTQZjV
O++yeZJnVYWHWRmPjQmGM1bSxmpvovyOXwiVQhiKUd8nb9rvUDnvCSPLfiVrLrUK
cO4cIraHaVJ4KbVjrY7b+zFeDw1NeKakYpO0qW0pR2CPBk39jFSTy/flv+oe/Tk=
=NMKa
-----END PGP SIGNATURE-----

--
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-30  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-29  0:43 Memory / swap leak? Phillip Susi
2014-12-29 18:49 ` Hugh Dickins
2014-12-30  2:10   ` Phillip Susi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.