Hi all!

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
http://perl.apache.org/docs/2.0/user...l#Startup_File
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 Shared: 6172672 Unshared: 53174272

Then I set the startup.pl, but removed and included different modules,
just to see what happens. The results are consistent, though:
Size: 76079104 Shared: 5763072 Unshared: 70316032
Size: 78835712 Shared: 5947392 Unshared: 72888320
Size: 73920512 Shared: 4878336 Unshared: 69042176

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?

Cheers,

Kjetil
--
Kjetil Kjernsmo
Information Systems Developer
Opera Software ASA