Re: mp2 + worker mpm + threads + threads::shared + PerlChildInitHandler

[prev] [thread] [next] [Date index for 2005/01/17]

From: Richard F. Rebel
Subject: Re: mp2 + worker mpm + threads + threads::shared + PerlChildInitHandler
Date: 18:59 on 17 Jan 2005
--=-g69/8JwVmD3GE4Zo/sZ6
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable


Another good idea... :)

But I am transfixed by this problem...  I can't seem to get each forked
apache server to have both a shared global hash between all cloned
interpreters, *and* one thread in each process that runs in the
background doing housekeeping.  I can think of numerous things that this
would be useful for.

I know I am close, but I can't seem to quite grasp what I am missing.  I
thought PerlChildInit's were called for each forked child from it's
first/main interpreter (the one that all the others are cloned from).


On Mon, 2005-01-17 at 13:59 -0500, Perrin Harkins wrote:
> On Mon, 2005-01-17 at 11:25 -0500, Richard F. Rebel wrote:
> > Unfortunately, it's high volume enough that it's no longer possible to
> > keep these counters in the databases updated in real time.  (updates ar=
e
> > to the order of 1000's per second).
>=20
> I would just use BerkeleyDB for this, which can easilly keep up, rather
> than messing with threads, but I'm interested in seeing if your
> threading idea will work well.
>=20
> > * A overseer/manager thread that wakes up once every so often and
> > updates the MySQL database with the contents of the global shared hash.
>=20
> Rather than doing that, why not just update it from a cleanup handler
> every time the counter goes up by 10000 or so?  Seems much easier to me.
>=20
> - Perrin
>=20
--=20
Richard F. Rebel

cat /dev/null > `tty`

--=-g69/8JwVmD3GE4Zo/sZ6
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)

iD8DBQBB7AsCx1ZaISfnBu0RAt4+AJ9hay3+ERqU3QrbUV4v6v6Zc5OaHgCeO5m9
tIHdEMHb+/kOIbhX5kmE3ZU=
=7xsB
-----END PGP SIGNATURE-----

--=-g69/8JwVmD3GE4Zo/sZ6--

Re: mp2 + worker mpm + threads + threads::shared + PerlChildInitHandler
Richard F. Rebel 18:59 on 17 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52