Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2006 20:34:28 -0500
From:      Kris Kennaway <kris@obsecurity.org>
To:        Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
Cc:        freebsd-current@freebsd.org, David Xu <davidxu@freebsd.org>
Subject:   Re: Virtual memory consumption (both user and kernel) in modern CURRENT
Message-ID:  <20060217013427.GB31540@xor.obsecurity.org>
In-Reply-To: <20060216140725.T23429@atlantis.atlantis.dp.ua>
References:  <20060215024339.N22450@atlantis.atlantis.dp.ua> <43F29BF5.4060300@freebsd.org> <20060216140725.T23429@atlantis.atlantis.dp.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--+pHx0qQiF2pBVqBT
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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:
>=20
>   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
>=20
> But with putchar() it gives us
>=20
>   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
>=20
> What't the reason of so terrible virtual memory consumption? I don't beli=
eve
> 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

--+pHx0qQiF2pBVqBT
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFD9SgjWry0BWjoQKURAmlTAKCjPABSYZyHnDdJnTKx8XuMIrY5awCgooM6
I40VAteQ3mvn22JYNxbls1U=
=y1Ns
-----END PGP SIGNATURE-----

--+pHx0qQiF2pBVqBT--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060217013427.GB31540>