Re: Bad coding practices in Fedora packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/03/2012 02:57 PM, Pádraig Brady wrote:
Just a comment on the accuracy of the numbers.

# ps_mem.py¹ | grep tracker

   3.2 MiB + 730.5 KiB =   3.9 MiB       tracker-miner-fs
   3.9 MiB + 722.5 KiB =   4.6 MiB       tracker-miner-flickr
   5.5 MiB + 549.0 KiB =   6.0 MiB       tracker-store

One of simple, yet least ambiguous methods of determining how many
pages is REALLY used only by a process is to nuke it in a mostly
quiescent system, and compare MemFree just before that and just after that:

# cat /proc/meminfo >/tmp/1; killall tracker-store; sleep 1; cat /proc/meminfo >/tmp/2; cat /tmp/1 /tmp/2 | grep MemFree
MemFree:         1940372 kB
MemFree:         1963860 kB

As you see, killing it on my machine freed over 23 megs worth of pages.
Note that any shared pages (such as glibc) are not freed this way;
also, non-mapped pages (such as large, but unused malloced space, or large,
but unused file mappings) also do not contribute to MemFree increase.
IOW: this method does not give artificially inflated numbers.

IOW: I do not think I overestimated memory consumption in my original post.
If anything, I probably underestimated it.

I would appreciate if this discussion would not be derailed onto
off-topic tracks of "exactly how many bytes were in use?"
and "my memory measurement method is better than yours".

--
vda
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux