[Sugar-devel] OT: determining memory usage of short-lived processes

Tomeu Vizoso tomeu at sugarlabs.org
Mon Jun 8 05:29:56 EDT 2009


On Sun, Jun 7, 2009 at 12:26, Sascha
Silbe<sascha-ml-ui-sugar-devel at silbe.org> wrote:
> On Sun, Jun 07, 2009 at 12:28:58AM +0200, Martin Langhoff wrote:
>
> [ps_mem.py]
>>
>> Perhaps you knew it already -- it's a good tool worthy of promotion so...
>
> Got to know it only recently and it's indeed very useful, even though it
> requires root access (for obvious reasons).

I guess root access is for estimating the shared mem footprint of your
app. Perhaps the private mem part is enough for you?

Regards,

Tomeu

>> Run the whole thing under /usr/bin/time, which is different from the
>> shell's 'time' built-in.
>
> Interesting, always thought they have the same output. Thanks for the tip!
>
>> The report is actually about the pagefaults, which for relatively short
>> runs relate almost linearly to mem usage.
>
> But doesn't it include non-RAM pagefaults (i.e. mmap()ed files) as well?
> It's a shame that Linux doesn't support most of the interesting fields (only
> utime, stime, minflt, majflt, nvcsw and nivcsw according to getrusage(2)).
> Even the proc files used by ps_mem.py are empty (in zombie state).
>
> CU Sascha
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iQEcBAEBAgAGBQJKK5XZAAoJELpz82VMF3DaHqQIAIt0vcWnP08+YKnKThR32cVM
> E8594wpLj1w7bMRz0fatfT3Q9DXfr0+57zuT3d7uV/swBkIZGM9viep1mRBQ6YLO
> YSbF075BRBInWqYlCrmGoUoIuaxcGH6ZrmhZo4YFVG4dTvoXP8vuJ4FscLf5lC90
> JMo7ezP43ukznDLgn+OVEVQOiRFTbsyQqNY8eM0srDsWTlU5jwxqeHqOK3fcP3Ky
> GG+t2atXk4aFNKg9tVoDfQRw09q47RF2GeBe/X0+abYQI33H6mNgQ2Ob2QDjVzO3
> 354sgLOxDxfcdc/dY9f3ywXInE2HvUD3zh9mG+zHc5Tk4hueMXazJ4zoN8qVvlQ=
> =fvaJ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>


More information about the Sugar-devel mailing list