This is a discussion on Re: Loading at startup to use shared memory - modperl ; --nextPart4858679.JgZtURbvPc Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 06 November 2006 17:48, Kjetil Kjernsmo wrote: > I'm working on improving the scalability and performance of our app. It > is rather bad, and I noticed that not many ...
On Monday 06 November 2006 17:48, Kjetil Kjernsmo wrote:
> I'm working on improving the scalability and performance of our app. It
> is rather bad, and I noticed that not many minutes after restart, the
> amount of shared memory is down to 10% of the total memory (and I'm at
> least at 1/3 on my home Axkit::App::TABOO), and besides, it is bad from
> the start too.
> Obviously, there is a lot to gain here, since we run a lot of children
> across many backends.
> So, I pulled out Stas and Eric's book, which has a chapter about it.
> That's about mod_perl 1.0, but much of it I presume still is valid.
> Also, I found an example in
> which I tried.
> I have not used the example script of Stas and Eric, but instead insert
> some GTop stuff in a registry script that loads a small picture from
> the database. It doesn't really use a lot of the stuff I load at
> startup. Then I warn the numbers, to find them in the Apache log.
> Then, I have stared at the numbers with bewilderment.
> Without any startup.pl file:
> Size: 59346944 =A0Shared: 6172672 =A0=A0=A0=A0=A0=A0=A0=A0Unshared: 53174=
> Then I set the startup.pl, but removed and included different modules,
> just to see what happens. The results are consistent, though:
> Size: 76079104 =A0Shared: 5763072 =A0=A0=A0=A0=A0=A0=A0=A0Unshared: 70316=
> Size: 78835712 =A0Shared: 5947392 =A0=A0=A0=A0=A0=A0=A0=A0Unshared: 72888=
> Size: 73920512 =A0Shared: 4878336 =A0=A0=A0=A0=A0=A0=A0=A0Unshared: 69042=
> So, what I see is that consistently, the amount of shared memory goes
> down when I preload modules at server startup... Weird, huh?
> It is pretty clear that total memory per child must go up by preloading
> modules, but the idea was that the shared portion of it should be much
> greater... I mean, just the code, which is identical per child, should
> contribute to this...
> I've been monitoring top as the server runs too, and it seems consistent
> with these findings, also on other parts of the server. I guess we
> should rewrite a lot of stuff here, but I was hoping this would be a
> quick fix for some of our problems, as I think there is a lot in here
> that would reasonably be in shared memory pages. So, any ideas where I
> can start to understand why this isn't shared?
What operating system is it? If linux see=20
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----