[BENCHMARK] Server Resources

2005-01-14 Thread sofadmin
First let me apologize if this is not the appropriate forum for my question.
I thought it would be because the issue has to do with
apache/modperl/mysql performance.

We have recently added a site to our server which hosts 30 other sites.
The new site uses modperl & MySQL. After adding the new site, the server
we were on (shared server at a national server farm) had major resource
problems (too many connections & load avg up to 30 not infrequently) &
eventually crashed. We moved to a new dedicated server which gave us more
resources, but we're still experiencing intermittent sluggishness - load
avg approaching 10 - and this is before this new site really becomes
active. Maybe 20 logins per day currently - in 10 days we'll have ~ 4000.

I've made changes to Apache config, following suggestions in the mod_perl
performance tuning docs:
MinSpareServers 5
MaxSpareServers 10
MaxClients=75
MaxRequestsPerChild 500

I've made efforts to optimize the database & queries, and have made
changes to the my.cnf file following suggestions in the High Performance
MySQL O'Reilly book & a couple of postings that seemed to have some
similarity to our situation:
set-variable = key_buffer_size=128M
set-variable = table_cache=1024
set-variable = join_buffer=1M
set-variable = sort_buffer=2M
set-variable = record_buffer=1M
set-variable = wait_timeout=20
set-variable = thread_cache=8

But before I go any further with testing & modifying configurations &
perhaps code, I'd like to have some good idea that the server we currently
are running on should be able to handle this new site & the 30 others - 2
running WebGUI, 12 use MySQL (4-5 fairly heavily), 4 modperl.

The server is a Pentium 3 800 MHz with 768M RAM (of which we can use ~640,
according to the server sysadmin)

It's running Ensim 4.0 with Fedora Core 1 with Embedded Perl version
v5.8.1 for Apache/1.3.31 (Unix) (Red-Hat/Linux) mod_perl/1.29 PHP/4.3.8
FrontPage/5.0.2.2635 mod_ssl/2.8.18 OpenSSL/0.9.7a
MySQL version 3.23.58

Any constructive suggestions are very welcome.

Thanks.

Sys




Re: [BENCHMARK] Server Resources

2005-01-14 Thread sofadmin
Thanks for the suggestions. We are planning on migrating to Apache 2.0,
but I need to read up on the implications to the various sites first.

Do you think this server has enough resources to handle our sites without
trouble?

Sys

>>
>> But before I go any further with testing & modifying configurations &
>> perhaps code, I'd like to have some good idea that the server we
>> currently
>> are running on should be able to handle this new site & the 30 others -
>> 2
>> running WebGUI, 12 use MySQL (4-5 fairly heavily), 4 modperl.
>>
>> The server is a Pentium 3 800 MHz with 768M RAM (of which we can use
>> ~640,
>> according to the server sysadmin)
>>
>> It's running Ensim 4.0 with Fedora Core 1 with Embedded Perl version
>> v5.8.1 for Apache/1.3.31 (Unix) (Red-Hat/Linux) mod_perl/1.29 PHP/4.3.8
>> FrontPage/5.0.2.2635 mod_ssl/2.8.18 OpenSSL/0.9.7a
>> MySQL version 3.23.58
>>
>> Any constructive suggestions are very welcome.
>>
>> Thanks.
>>
>> Sys
>>
>>
>




Re: [BENCHMARK] Server Resources

2005-01-15 Thread sofadmin

> Hey there
>
> It strikes me that your problem is directly related to memory usage.
> Linux machines have a bad problem in that if your apache children get
> swapped out ->for any reason at all<-, they will lose any shared memory
> that they may have had before being swapped out.  When they are swapped
> back in, they take up more RAM than before, so the system swaps out
> another Apache process, and so on, until the system enters the
> "downward spiral of death".

Thanks for the heads up on this -- I've been seeing this happen with the
process size & didn't know what to attribute it to. I implemented
Apache::SizeLimit a couple months ago when we added a WebGUI site -
processes were growing extravagantly. Still haven't found the ideal
setting, but getting closer, I think.

Sys



Re: [BENCHMARK] Server Resources

2005-01-15 Thread sofadmin
.
>
> Probably the biggest bang for the buck with the least effort or code
> changes is to set up a lightweight (i.e. non-mod_perl) reverse proxy httpd
> in front of the httpd that is running mod_perl:
>

Would you recommend squid or mod_proxy?




Re: CGI::Session or CGI::Application

2005-01-15 Thread sofadmin
Interesting, your comments on CGI::Session vs Apache::Session as I've had
nothing but trouble with Apache::Session::File -- session data
inconsistently being written to the file. Several years ago I first tried
Apache::Session, but had the problem with data being saved in the session,
so tried CGI::Session, which at the time also used a tied hash &
everything worked fine (used ::File & ::MySQL, both). Unfortunately, a
recent server upgrade forced a CGI::Session module upgrade -- & the newer
module had removed the tied hash implementation in favor of an object
oriented one. Couldn't find the older module with tied hash implementation
anywhere, so quickly changed to using Apache::Session for those sites that
were using the session module. The ::MySQL module seems OK, but the ::File
module had same problem as before - inconsistent writing of data to the
session. So, I had to scramble to re-write code for several sites to
implement the 'new' CGI::Session oo implementation. Do you use the
Apache::Session::File module or one of the others?

Sys



>
> Octavian Rasnita wrote:
>> Hi,
>>
>> If I want to use CGI::Session or CGI::Application, can I do it if I use
>> mod_perl or there are better modules for using with MP?
>
> Just a couple of thoughts:
>CGI::Session does not appear to be well maintained. It's very popular
> and I know many people who have tried to send in patches and fixes but
> the author has been unresponsive. There is also no way to 'guarantee'
> that no too session will have the same id with CGI::Session, especially
> in a multi-server environment (eg, load-balanced cluster).
>
> Lately I have switched to using Apache::Session (and sometimes wrapping
> it in an object interface since it's a tied-hash). It's well maintained
> and you can easily use something like mod_unique_id with Apache to
> almost absolutely guarantee that each new request will have it's own id
> and can there use that id when you start a session.
>
> On a C::A note, I wonder how hard it would be for Cees to add
> Apache::Session support to C::A::P::Session.
>
> --
> Michael Peters
> Developer
> Plus Three, LP
>




Re: CGI::Session or CGI::Application

2005-01-16 Thread sofadmin
>
> [EMAIL PROTECTED] wrote:
>> Interesting, your comments on CGI::Session vs Apache::Session as I've
>> had
>> nothing but trouble with Apache::Session::File -- session data
>> inconsistently being written to the file.
>
> I'm sorry to hear that. Did you mention those problems to the author or
> bring it up on the mod_perl list? Were you using just
> Apache::Session::File or Apache::Session::Flex? I suspect that it was
> having issues with locking the files so maybe trying another locking
> mechanism (using Flex) might have helped. But that's just a guess.

I only use the ::File implementation with a few sites where traffic is
fairly minimal & I didn't think the overhead of a MySQL db was worth it.
I'm not familiar with ::Flex. I will check it out. Thanks for the advice.

Sys