depois de ter instalado e configurado o servidor web na alix board 2d13 resolvi ver a utilização da memória:
#ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
o resultado foi o seguinte:
0 [aio/0]
0 [async/mgr]
0 [ata/0]
0 [ata_aux]
0 [bdi-default]
0 [crypto/0]
0 [events/0]
0 [ext4-dio-unwrit]
0 [flush-3:0]
0 [jbd2/hda1-8]
0 [kblockd/0]
0 [khelper]
0 [khubd]
0 [kpsmoused]
0 [kseriod]
0 [ksoftirqd/0]
0 [ksuspend_usbd]
0 [kswapd0]
0 [kthreadd]
0 [nfsiod]
0 [phy0]
0 [rpciod/0]
0 [sync_supers]
524 /bin/sh /usr/bin/mysqld_safe
528 /sbin/getty -L ttyS0 9600 vt100
580 logger -t mysqld -p daemon.error
612 udevd --daemon
616 udevd --daemon
668 init [2]
684 sort -b -k1,1n
716 udevd --daemon
752 pr -TW138
792 ps -e -orss=,args=
924 /usr/sbin/cron
976 /usr/sbin/sshd
1156 /usr/sbin/cherokee
1504 /usr/sbin/rsyslogd -c4
1792 -bash
1800 -bash
1880 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 103:106
2064 cherokee-admin -b
2176 /usr/sbin/cherokee-worker
2828 sshd: root@pts/0
2828 sshd: root@pts/1
6408 /usr/bin/php-cgi -b 127.0.0.1:47990
9416 python /usr/share/cherokee/admin/server.py /tmp/cherokee-admin-scgi.socket /etc/cherokee/cherokee.conf
16508 /usr/bin/php-cgi -b 127.0.0.1:47990
16576 /usr/bin/php-cgi -b 127.0.0.1:47990
18972 /usr/bin/php-cgi -b 127.0.0.1:47990
18984 /usr/bin/php-cgi -b 127.0.0.1:47990
19012 /usr/bin/php-cgi -b 127.0.0.1:47990
27012 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld
como se pode analisar o fastcgi criou 5 processos filhos (children processes) que estão a consumir uma quantidade razoável de memória ram (é de notar que a board só tem 256 MB de ram).
estes processos aguardam por responder aos pedidos de possíveis clientes. como o objectivo desta máquina é a de realizar diversas tarefas na minha rede, toda a memória ram poupada será bem vinda.
como se pode ler em http://linuxgazette.net/123/vishnu.html se
aqui http://www.fastcgi.com/drupal/node/5?q=node/10 pode ler-se "The number of running children is controlled by the PHP_FCGI_CHILDREN variable. If this is set to 0, then PHP will not fork a process manager but instead run only as a worker thread. If you are worried about memory leaks (memory leaks? In PHP?) then you can set PHP_FCGI_MAX_REQUESTS, to cause worker children to exit after that many requests.". de acordo com isto foi o que tentei na página de administração do cherokee. em Sources->PHP Interpreter comecei por desabilitar "Inherit Environment" o que permitiu configurar a variável PHP_FCGI_CHILDREN para 0.
depois foi reiniciar o servidor e ver o resultado:
0 [aio/0]
0 [async/mgr]
0 [ata/0]
0 [ata_aux]
0 [bdi-default]
0 [crypto/0]
0 [events/0]
0 [ext4-dio-unwrit]
0 [flush-3:0]
0 [jbd2/hda1-8]
0 [kblockd/0]
0 [khelper]
0 [khubd]
0 [kpsmoused]
0 [kseriod]
0 [ksoftirqd/0]
0 [ksuspend_usbd]
0 [kswapd0]
0 [kthreadd]
0 [nfsiod]
0 [phy0]
0 [rpciod/0]
0 [sync_supers]
524 /bin/sh /usr/bin/mysqld_safe
524 logger -t mysqld -p daemon.error
528 /sbin/getty -L ttyS0 9600 vt100
620 udevd --daemon
624 udevd --daemon
672 init [2]
684 sort -b -k1,1n
704 udevd --daemon
760 pr -TW138
788 ps -e -orss=,args=
920 /usr/sbin/cron
976 /usr/sbin/sshd
1148 /usr/sbin/cherokee
1512 /usr/sbin/rsyslogd -c4
1796 -bash
1864 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 103:106
2152 /usr/sbin/cherokee-worker
2828 sshd: root@pts/0
20672 /usr/bin/php-cgi -b 127.0.0.1:47990
25684 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld
fixe!
http://www.cherokee-project.com/doc/cookbook_php.html
http://www.fastcgi.com/drupal/node/5?q=node/10
http://www.fastcgi.com/drupal/
http://linuxgazette.net/123/vishnu.html
http://www.cherokee-project.com/doc/dev_cherokee.conf.html