Re: static apache + mem question

2004-06-25 Thread Alexander Belck
Citando Michael van Elst [EMAIL PROTECTED]:

 On Thu, Jun 24, 2004 at 07:29:30PM -0300, Alexander Belck wrote:

  There is realy a huge difference in size. The modular apche is about 300K,
 while
  the one I build in OpenPkg is about 6M. Normaly I see several instances of
  apache running (about 10 as setup in httpd.conf).
  I was wundering if using OpenPkg static version of apache will consume
 about 60M
  of my ram, or will it be smart enouth to share the common code and consume
  juste a bit more than 1 copy of apache ?

 It will share the common code but it won't share the data which
 also grows with the number of modules.

How can I avaliate the amount of memory efectivly used ?
I think that frequenly apache processes are just waiting for a connection and
will hope that in this situation the data reserved for all modules are relativly
small. They should only grow when some module is realy being used by an
webapplication and released again when the site/page is leaved.



  I'm afraid that OpenPkg static aproch isn't a good aproach for an (eaven
 small)
  ISP, where several instances of apache with lots of possible modules will
 be
  needed.

 Two observations:

 If your modular apache is about 300K then it doesn't load or use
 all the modules. So why build them into the static binary ?

I just looked at the size of /usr/sbin/httpd, I do not know how to check the
efective memmory used when running, where the necessary modules will be loaded
and obviosly much more ram will be used from the system.
Most modules are enabled, and also most time they are not used, but they are
avaible if someone whants to use them. As an ISP I could not say that I support
PHP, but do not offer lots of functions availble thru PHP.


 Building apache with all modules is a bad idea anyway. Most things
 served will be static pages, but the process serving static
 pages has to carry the weight of all the modules. You should think
 about a more flexible approach and use several apache instances
 together, each tailored for a specific purpose. With OpenPKG you
 can do this easily by creating several OpenPKG instances.

I agree that most pages will be static. But administrate lots of sites and
change them to diferent apache instances if/when some cliente tryes to use a new
functionality in his sites is, for me, unhandable.
To be able to compeet with hosting services offerd at prices as low as $3/month
I need to transfer all possible administration to the client. Thats why I'm
trying to use ISPMAN and for his requirments it seams apropriate to use OpenPKG
as the softwares are mostly uptodate, and on a normal distribution I offen got
problems to get the apropriate pre-requisits for the servers with
authentication and ldap requirements ISPMAN needs.



 N.B. Yes, this approach wastes disk space, but it helps a lot
 maintaining such an installation which is more important even
 for a small ISP.

Disk space I'm not warried about. But RAM is more expensive and sometimes
dificult to expand.

I whant to think that with static apache the response should be better as all
code is already loaded when some webapplications request there use (in modular
apache I think that the code will be loade just when the webapplication trys to
use it). I just need to know how this will impact my memmory needs.


 Greetings,
 --
 Michael van Elst
 Internet: [EMAIL PROTECTED]
 A potential Snark may lurk in every tree.
 __
 The OpenPKG Projectwww.openpkg.org
 User Communication List  [EMAIL PROTECTED]



--
ATIX Tecnologia e Com Ltda
Tel.: +55-(11) 4667-5900


This message was sent using IMP, the Internet Messaging Program.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: static apache + mem question

2004-06-25 Thread Michael van Elst
On Fri, Jun 25, 2004 at 08:51:45AM -0300, Alexander Belck wrote:

Hi,

 How can I avaliate the amount of memory efectivly used ?
 I think that frequenly apache processes are just waiting for a connection and
 will hope that in this situation the data reserved for all modules are relativly
 small. They should only grow when some module is realy being used by an
 webapplication and released again when the site/page is leaved.

The memory is allocated once it is used and stays there until the
apache process ends. You can configure the number of queries a
single apache process should answer before it terminates. By default
that is a few ten thousand requests.


  If your modular apache is about 300K then it doesn't load or use
  all the modules. So why build them into the static binary ?
 
 I just looked at the size of /usr/sbin/httpd, I do not know how to check the
 efective memmory used when running, where the necessary modules will be loaded
 and obviosly much more ram will be used from the system.

This however is the important number. Check with 'ps' or 'top'.


 Most modules are enabled, and also most time they are not used, but they are
 avaible if someone whants to use them. As an ISP I could not say that I support
 PHP, but do not offer lots of functions availble thru PHP.

As an ISP you should not run a single Apache with mod_php for more than
one customer. PHP safe mode is a myth :-)


Greetings,
-- 
Michael van Elst
Internet: [EMAIL PROTECTED]
A potential Snark may lurk in every tree.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: static apache + mem question

2004-06-25 Thread Alexander Belck
Citando Michael van Elst [EMAIL PROTECTED]:

 On Fri, Jun 25, 2004 at 08:51:45AM -0300, Alexander Belck wrote:


 As an ISP you should not run a single Apache with mod_php for more than
 one customer. PHP safe mode is a myth :-)

Do I need a hole new OpenPkg instalation with a diferent opkg_root to have
distingt apache builds (one with_mod_php, one without) and processes ?
How many client connections can a single apache process handle (simultaneos
browsing of one site) ?
I thoght that multiple apache processes could be activated if the number of
request require it and shuted down if to many are idle.

About security problems with php, are they just there for acessing sites where
php is enabled, or only to the persons with write publishing access to the
sites tree directory (that will mean that the ISP client has bad intensions to
exploit the php security flaus, not any unknown guy at the web) ?




 Greetings,
 --
 Michael van Elst
 Internet: [EMAIL PROTECTED]
 A potential Snark may lurk in every tree.
 __
 The OpenPKG Projectwww.openpkg.org
 User Communication List  [EMAIL PROTECTED]



--
ATIX Tecnologia e Com Ltda
Tel.: +55-(11) 4667-5900


This message was sent using IMP, the Internet Messaging Program.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: static apache + mem question

2004-06-25 Thread Michael van Elst
On Fri, Jun 25, 2004 at 10:59:42AM -0300, Alexander Belck wrote:

 Do I need a hole new OpenPkg instalation with a diferent opkg_root to have
 distingt apache builds (one with_mod_php, one without) and processes ?

You need a new OpenPKG instance to get different apache builds. You
could run several Apache instances from a single OpenPKG instance if
you provide your own startup scripts and configurations, but using
multiple OpenPKG instances is easier to maintain, especially once you
want to migrate a server to a different machine.


 How many client connections can a single apache process handle (simultaneos
 browsing of one site) ?

A single process can handle only a single connection at a time. However,
most connections are very short (in particular those serving static content)
and multiple users won't notice the latency.

Note that the OS itself (the kernel) queues incoming connections, so that
a part of the client connection is already served in parallel. For static
content that effect is significant.


 I thoght that multiple apache processes could be activated if the number of
 request require it and shuted down if to many are idle.

Yes, that is done automatically. Apache starts one master process that
controls any number of child processes. Each child handles a single
connection.

For small servers some 4-10 processes are enough.
For big servers you may want maybe up to a few hundred processes.

A good approach for a high end server is also to split it into
various parts that serve static pages, dynamic content and large
files. Each type wants a specific apache configuration for best
performance.


 About security problems with php, are they just there for acessing sites where
 php is enabled, or only to the persons with write publishing access to the
 sites tree directory (that will mean that the ISP client has bad intensions to
 exploit the php security flaus, not any unknown guy at the web) ?

The person who can write php scripts of course has direct control over
any exploit. But often even visitors can use the same exploits because
most PHP scripts are buggy.

The point is that all customers on that server become victims, not just
the one that hosts the exploit. A single bad customer can compromise
all your customers.


Greetings,
-- 
Michael van Elst
Internet: [EMAIL PROTECTED]
A potential Snark may lurk in every tree.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: static apache + mem question

2004-06-25 Thread Alexander Belck
From my running httpd using top I got:

  PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
 9169 nobody14   0 14504 9,9M  7936 S 1,7  8,2   0:14 httpd
 8773 nobody 9   0 14164 9976  6004 S 0,0  8,1   0:11 httpd
 9155 nobody 9   0 13992 9828  9220 S 0,0  7,9   0:10 httpd


What does this means ?
Is the size in Kb, so that my biggest httpd process is using 14Mb ?
What means RSS (it seams confusing to me since the first says 9,9M and the
second only 9976 about 1000 times smaler)

Thanks,

Alex

Citando Michael van Elst [EMAIL PROTECTED]:

 On Fri, Jun 25, 2004 at 08:51:45AM -0300, Alexander Belck wrote:

 Hi,

  How can I avaliate the amount of memory efectivly used ?
  I think that frequenly apache processes are just waiting for a connection
 and
  will hope that in this situation the data reserved for all modules are
 relativly
  small. They should only grow when some module is realy being used by an
  webapplication and released again when the site/page is leaved.

 The memory is allocated once it is used and stays there until the
 apache process ends. You can configure the number of queries a
 single apache process should answer before it terminates. By default
 that is a few ten thousand requests.


   If your modular apache is about 300K then it doesn't load or use
   all the modules. So why build them into the static binary ?
 
  I just looked at the size of /usr/sbin/httpd, I do not know how to check
 the
  efective memmory used when running, where the necessary modules will be
 loaded
  and obviosly much more ram will be used from the system.

 This however is the important number. Check with 'ps' or 'top'.


  Most modules are enabled, and also most time they are not used, but they
 are
  avaible if someone whants to use them. As an ISP I could not say that I
 support
  PHP, but do not offer lots of functions availble thru PHP.

 As an ISP you should not run a single Apache with mod_php for more than
 one customer. PHP safe mode is a myth :-)


 Greetings,
 --
 Michael van Elst
 Internet: [EMAIL PROTECTED]
 A potential Snark may lurk in every tree.
 __
 The OpenPKG Projectwww.openpkg.org
 User Communication List  [EMAIL PROTECTED]



--
ATIX Tecnologia e Com Ltda
Tel.: +55-(11) 4667-5900


This message was sent using IMP, the Internet Messaging Program.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


static apache + mem question

2004-06-24 Thread Alexander Belck
Now that I'm geting near to have apache build, I did some comparision with
previus instalations (using distros modular apache).

There is realy a huge difference in size. The modular apche is about 300K, while
the one I build in OpenPkg is about 6M. Normaly I see several instances of
apache running (about 10 as setup in httpd.conf).
I was wundering if using OpenPkg static version of apache will consume about 60M
of my ram, or will it be smart enouth to share the common code and consume
juste a bit more than 1 copy of apache ?

I'm afraid that OpenPkg static aproch isn't a good aproach for an (eaven small)
ISP, where several instances of apache with lots of possible modules will be
needed.

I apreciate any comments.

Thanks,

Alex


This message was sent using IMP, the Internet Messaging Program.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]


Re: static apache + mem question

2004-06-24 Thread Michael van Elst
On Thu, Jun 24, 2004 at 07:29:30PM -0300, Alexander Belck wrote:

 There is realy a huge difference in size. The modular apche is about 300K, while
 the one I build in OpenPkg is about 6M. Normaly I see several instances of
 apache running (about 10 as setup in httpd.conf).
 I was wundering if using OpenPkg static version of apache will consume about 60M
 of my ram, or will it be smart enouth to share the common code and consume
 juste a bit more than 1 copy of apache ?

It will share the common code but it won't share the data which
also grows with the number of modules.


 I'm afraid that OpenPkg static aproch isn't a good aproach for an (eaven small)
 ISP, where several instances of apache with lots of possible modules will be
 needed.

Two observations:

If your modular apache is about 300K then it doesn't load or use
all the modules. So why build them into the static binary ?

Building apache with all modules is a bad idea anyway. Most things
served will be static pages, but the process serving static
pages has to carry the weight of all the modules. You should think
about a more flexible approach and use several apache instances
together, each tailored for a specific purpose. With OpenPKG you
can do this easily by creating several OpenPKG instances.

N.B. Yes, this approach wastes disk space, but it helps a lot
maintaining such an installation which is more important even
for a small ISP.

Greetings,
-- 
Michael van Elst
Internet: [EMAIL PROTECTED]
A potential Snark may lurk in every tree.
__
The OpenPKG Projectwww.openpkg.org
User Communication List  [EMAIL PROTECTED]