Re: measuring shared memory on linux (was [Fwd: Re: /proc/*/statm, exactly what does "shared" mean?)]

[prev] [thread] [next] [Date index for 2005/02/14]

From: Richard F. Rebel
Subject: Re: measuring shared memory on linux (was [Fwd: Re: /proc/*/statm, exactly what does "shared" mean?)]
Date: 23:00 on 14 Feb 2005
--=-U58Zk7AlVg3Hj/jJ2WVo
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Mon, 2005-02-14 at 17:39 -0500, Perrin Harkins wrote:
> > Thanks for pursuing that issue at the linux kernel list, Richard. As yo=
u=20
> > have suggested it doesn't look very good.
>=20
> I want to add my thanks too.

You are welcome.  I wish I wasn't the bearer of such bad news tho.

> Or on anything at all, since the size measurements they use include
> things that really shouldn't be counted as part of the process size.
>=20
> It seems that to tune properly you would need to send in requests with a
> benchmarking tool and keep adjusting MaxClients upward while watching
> the free memory on the box.  That's really ugly.  Maybe there's a way to
> count memory used by each process slowly but accurately which we could
> use during tuning at least.
>=20
> - Perrin

That is an ugly way, but probably the only way we have at this time.

I received further information on the linux kernel mailing list.
Basically we can apply a 'patch', okay, a *hack* that is very unlikely
to ever end up in the vanilla kernel and start maintaining it.

The way I see it, unless we patch/hack the kernel to count the
information we are interested in, we are SOL.  If we do add it, expect a
significant performance hit and don't expect it to be in the vanilla
kernel.

I am going to *try* and take the code sample I was given and wedge it
into the right place on a machine sometime this week.  If it works, I'll
let you know.  Maybe we can convince someone on lkml that if we make a
way to turn this *feature* on or off with a sysctl and put it somewhere
else in /proc/<pid/* that they'll put it in the vanilla kernel.  Then
someone with more of a clue than I have can maintain it :)

Best,

Richard


--=20
Richard F. Rebel

cat /dev/null > `tty`

--=-U58Zk7AlVg3Hj/jJ2WVo
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBCES2gx1ZaISfnBu0RAnr5AJkBkIvjZWiPJE50rgj0z3/PS3KhUwCfTK97
B0cC2pviCM0JKsfyD67f5J4=
=0NA9
-----END PGP SIGNATURE-----

--=-U58Zk7AlVg3Hj/jJ2WVo--

Re: measuring shared memory on linux (was [Fwd: Re: /proc/*/statm, exactly what does "shared" mean?)]
Richard F. Rebel 23:00 on 14 Feb 2005

Generated at 10:23 on 16 Feb 2005 by mariachi v0.52