Re: static apache + mem question
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
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]
Apache + PHP + PEAR
As I'm unable to build apache --with=mod_php_pear I was wondering if I could do something similar as done with modular apache. In my previus instalations, I installed apache, then I downloaded a updated version of PEAR from HORDE (since I couldn't upgrade enouth the pear package from the distro) where I could use pear's setup utility to download and install other new functions. To make this work from apache I just needed to add in httpd.conf for the HORDE site php_value include_path '/usr/share/php:/usr/share/php/pear:.' QUESTION: Should it work if I just build OpenPkg --with=mod_php and than download HORDEs PEAR into /opkg/lib/php/pear and add a php_value include_path '/opkg/include/php:/opkg/lib/php/pear:.' 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
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
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]
Apache + HORDE
I run the test script from horde over the apache I build with OpenPkg and it complains of modules that I could not find in the apache.spec. Is there some diferent name or can I install aditional php_modules ? Horde_complains: # MCAL Support: No # Mcrypt Support: No PEAR *** That I expected, as I could not compile apache with=mod_php_pear * PEAR - No * Check your PHP include_path setting to make sure it has the PEAR library directory. * Recent PEAR - No * Mail - No * Log - No * DB - No * Net_Socket - No * Date - No * HTML_Common/HTML_Select - No Valid XHTML 1.0! This message was sent using IMP, the Internet Messaging Program. __ The OpenPKG Projectwww.openpkg.org User Communication List [EMAIL PROTECTED]
Re: Apache + HORDE
I can't understand why your rpm -qi apache doesn't refer to mod_php_pear. I build php with_pear support and apache with the modules except pear and horde test page still complains for the absence of PEAR. I saw that your apche has an php_mcrypt option, so I added it to my apache.spec that compiled without complaining, but horde still does not recognize mcrypt support Alex Citando Bill Campbell [EMAIL PROTECTED]: On Fri, Jun 25, 2004, Alexander Belck wrote: I run the test script from horde over the apache I build with OpenPkg and it complains of modules that I could not find in the apache.spec. Is there some diferent name or can I install aditional php_modules ? I've built horde and imp SRPMS for OpenPkg Release 2.0 with the apache from current. I can make these available if people are interested. First off, you need to build the current version of php with pear support. Next you need to build current apache with appropriate modules. I've attached ``openpkg rpm -i apache'' output from one of our machines. Finally, you need to do a ``pear install Log'' on the installed system as that module isn't in the php with_pear module (I haven't taken the time to figure out php and pear enough to build OpenPKG rpms to add pear modules). At that point you should be ready to configure mysql, horde, and imp. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Systems, Inc. UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ Memoirs -- Bill Clinton is getting $12 million for his memoirs, and his wife Hillary got $8 million for hers. That's $20 million for memories from two people who for eight years repeatedly testified they couldn't remember anything. -- 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]
apache mod_php_pear X php
Why does a static build of apache with_mod_php_pear conflicts with the static build of php in OpenPkg 2.0 ? I supose this is resolved in some way in the current branch, as Bill Campbell was able to install php with_pear and apache in a way to satisfy HORDEs requirement of pear. Should this be downgraded to 2.0 breanch ? 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
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]
Re: Apache + HORDE
On Fri, Jun 25, 2004, Alexander Belck wrote: I can't understand why your rpm -qi apache doesn't refer to mod_php_pear. I build php with_pear support and apache with the modules except pear and horde test page still complains for the absence of PEAR. I'm running apache from CURRENT not Release 2.0. This has been fixed in the current php and apache SRPMS. Bill -- INTERNET: [EMAIL PROTECTED] Bill Campbell; Celestial Software LLC UUCP: camco!bill PO Box 820; 6641 E. Mercer Way FAX:(206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 URL: http://www.celestial.com/ In Germany they first came for the Communists and I didn't speak up because I wasn't a Communist. Then they came for the Jews, and I didn't speak up because I wasn't a Jew. Then they came for the trade unionists, and I didn't speak up because I wasn't a trade unionist. Then they came for the Catholics, and I didn't speak up because I was a Protestant. Then they came for me -- and by that time no one was left to speak up. -- Pastor Martin Niemoller __ The OpenPKG Projectwww.openpkg.org User Communication List [EMAIL PROTECTED]