Speicherbedarf + installation von Apache, PHP, MySQL

From: Oskar Eyb <oskar(at)solls.net>
Date: Sat, 8 Nov 2003 02:10:18 +0100

Hallo!

Ich habe eben mal Apache und PHP auf den neuesten Stand gebracht. Dabei
viel mir der hohe Speicherbedarf des Indianers auf.

  PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
84344 www 2 0 19452K 11688K sbwait 0:01 2.69% 2.69% httpd

Der MySQL-Server geht auch in ungeahnte Höhen

 343 mysqld 2 0 53328K 3996K poll 25:43 0.00% 0.00% mysqld
 345 mysqld 2 0 53200K 872K poll 23:07 0.00% 0.00% mysqld

Wenn ich die top-manpage richtig interpretiere

> SIZE is the total size of the process (text, data, and stack), RES is the
> current amount of resident memory (both SIZE and RES are given in kilobytes)

dann gleicht der SIZE-Wert dem Arbeitsspeicherbedarf.

Die Ressourcen-Konfiguration dürfte ziemlich Defaultmäßig sein:

MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150
MaxRequestsPerChild 0

Beim Starten ist mir zudem nicht ganz klar, was diese Warnung bezügl.
mod_php4.c zu bedeuten hat:

apachectl startssl
[Sat Nov 8 00:19:59 2003] [warn] module mod_php4.c is already added,
skipping /usr/local/sbin/apachectl startssl: httpd started

In httpd.conf:
LoadModule php4_module libexec/apache/libphp4.so
AddModule mod_php4.c

Das www/apache13-modssl/Makefile habe ich leicht angepasst... (In welcher
Datei sollte man das normalerweise machen, damit die Änderungen
nach einem cvs-Update nicht überschrieben werden?)

CONFIGURE_ARGS+=--prefix=${PREFIX} \
                --server-uid=www \
                --server-gid=www \
                --with-perl=${PERL} \
                --with-layout=FreeBSD \
                --without-confadjust \
                --enable-module=mmap_static \
                --disable-module=auth_dbm \
                --enable-module=headers \
                --enable-module=info \
                --enable-module=log_referer \
                --enable-module=log_agent \
                --enable-module=rewrite \
                --enable-module=so \
                --enable-module=vhost_alias \
                --enable-module=ssl \
                --enable-module=define \
                ${SUEXEC_CONF}

httpd -l
Compiled-in modules:
  http_core.c
  mod_mmap_static.c
  mod_vhost_alias.c
  mod_env.c
  mod_define.c
  mod_log_config.c
  mod_log_agent.c
  mod_log_referer.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_info.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_rewrite.c
  mod_access.c
  mod_auth.c
  mod_headers.c
  mod_so.c
  mod_setenvif.c
  mod_ssl.c

PHP wurde auch mit einigen zusätzlichen Features compiliert.

Das Gespann habe ich einfach aus den Ports installiert.

In /etc/make.conf hinzugefügt: APACHE_PORT?=www/apache13-modssl

PHP scheint ja nun als dynamisches Modul benutzt zu werden.
Es hätte doch Vorteile PHP statisch im Apachen zu haben. So wollte ich
das eigentlich auch. Nur, wie geht das mit den Ports?

Und was kann ich gegen den Speicherhunger tun? Bei 20MB pro Prozess kann
doch etwas nicht stimmen.

-- 
Oskar
To Unsubscribe: send mail to majordomo.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sat 08 Nov 2003 - 02:11:11 CET

search this site