Re: Virtual memory consumption (both user and kernel) in modern CURRENT

From: Kris Kennaway <kris_at_obsecurity.org>
Date: Thu, 16 Feb 2006 20:34:28 -0500
On Thu, Feb 16, 2006 at 02:15:55PM +0200, Dmitry Pryanishnikov wrote:

> Without putchar() call my program's virtual address space isn't so big:
> 
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
> 52126 root        1 127    0  1244K   440K RUN      0:31 43.97% a.out
> 
> But with putchar() it gives us
> 
>   PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
> 58959 root        1 130    0 50100K   632K RUN      0:03 47.19% a.out
> 
> What't the reason of so terrible virtual memory consumption? I don't believe
> that just plain stdio buffering requires 50 Mbytes (!) of virtual address
> space.

Note that only 200K of extra memory is used.  Using 50MB of virtual
address space is not going to cause any problems unless the pages are
touched, which as you can see from the resident size, they aren't.
See also the old "omg, rpc.statd has as size of 256MB" entry in the
FAQ.

Kris

Received on Fri Feb 17 2006 - 00:34:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC