Camargo Posted April 10, 2013 Share Posted April 10, 2013 Preciso de uma dica de como configurar o Apache na perspectiva de que tenho os seguintes recursos: 4 Cores 8GB de RAM 10000 GB de HD FCGI (Usa muito mais memória que o SuPHP) No momento, configurei assim Start Servers: 5 Minimum Spare Servers: 5 Maximum Spare Servers: 10 Server Limit: 1526 Max Request Workers: 256 Max Connections Per Child: 1000 Keep-Alive: On Max Keep-Alive Requests: 200 Keep-Alive Timeout: 3 Timeout: 300 Estas configurações que estou usando, (que estão trabalhando perfeitamente no meu servidor) foram sugeridas por um tutorial na internet para aguentar até 30.000 Mas a pergunta é: ESTOU UTILIZANDO TODO O POTENCIAL QUE TENHO, CONSIDERANDO QUE TENHO 4 CORES E 8GB DE MEMÓRIA RAM? Link to comment Share on other sites More sharing options...
Jefferson Posted April 10, 2013 Share Posted April 10, 2013 Instale o Varnish Cache. Ele irá te ajudar muito. █ DDR Host - https://www.ddrhost.com.br █ Hospedagem de Sites, Revenda de Hospedagem, Servidores Virtuais, Registro de Domínios Link to comment Share on other sites More sharing options...
Dexter Posted April 11, 2013 Share Posted April 11, 2013 eu utilizo o apache booster no cpanel Varnish+nginx+apache Link to comment Share on other sites More sharing options...
Alexandre Duran Posted April 11, 2013 Share Posted April 11, 2013 Não configure, use o NGINX/VARNISH e seja feliz. Link to comment Share on other sites More sharing options...
Dennis Posted April 11, 2013 Share Posted April 11, 2013 Pessoal, vim com a mesma dúvida dele, tenho o seguinte servidor para configurar, quero configura-lo para o maior pico de requições simultanias possíveis. Servidor: Dual Intel® Xeon®2 x E5-2620 2.0GHz 128GB DDR3 2x SDD Porta de 1GB Já configurei o varnish com 8GB reservado. Realmente não precisa configurar o apache? Configuração do varnish: # Configuration file for varnish # # /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this # shell script fragment. # # Maximum number of open files (for ulimit -n) NFILES=131072 # Locked shared memory (for ulimit -l) # Default log size is 82MB + header MEMLOCK=82000 # Maximum size of corefile (for ulimit -c). Default in Fedora is 0 # DAEMON_COREFILE_LIMIT="unlimited" # Set this to 1 to make init script reload try to switch vcl without restart. # To make this work, you need to set the following variables # explicit: VARNISH_VCL_CONF, VARNISH_ADMIN_LISTEN_ADDRESS, # VARNISH_ADMIN_LISTEN_PORT, VARNISH_SECRET_FILE, or in short, # use Alternative 3, Advanced configuration, below RELOAD_VCL=1 # This file contains 4 alternatives, please use only one. ## Alternative 1, Minimal configuration, no VCL # # Listen on port 6081, administration on localhost:6082, and forward to # content server on localhost:8080. Use a fixed-size cache file. # #DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -b localhost:8080 \ # -u varnish -g varnish \ # -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 2, Configuration with VCL # # Listen on port 6081, administration on localhost:6082, and forward to # one content server selected by the vcl file, based on the request. Use a # fixed-size cache file. # #DAEMON_OPTS="-a :6081 \ # -T localhost:6082 \ # -f /etc/varnish/default.vcl \ # -u varnish -g varnish \ # -S /etc/varnish/secret \ # -s file,/var/lib/varnish/varnish_storage.bin,1G" ## Alternative 3, Advanced configuration # # See varnishd(1) for more information. # # # Main configuration file. You probably want to change it :) VARNISH_VCL_CONF=/etc/varnish/default.vcl # # # Default address and port to bind to # # Blank address means all IPv4 and IPv6 interfaces, otherwise specify # # a host name, an IPv4 dotted quad, or an IPv6 address in brackets. # VARNISH_LISTEN_ADDRESS= VARNISH_LISTEN_PORT=80 # # # Telnet admin interface listen address and port VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1 VARNISH_ADMIN_LISTEN_PORT=6082 # # # Shared secret file for admin interface VARNISH_SECRET_FILE=/etc/varnish/secret # # # The minimum number of worker threads to start VARNISH_MIN_THREADS=50 # # # The Maximum number of worker threads to start VARNISH_MAX_THREADS=1000 # # # Idle timeout for worker threads VARNISH_THREAD_TIMEOUT=120 # # # Cache file location VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin # # # Cache file size: in bytes, optionally using k / M / G / T suffix, # # or in percentage of available disk space using the % suffix. VARNISH_STORAGE_SIZE=8G # # # Backend storage specification VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}" # # # Default TTL used when the backend does not specify one VARNISH_TTL=120 # # # DAEMON_OPTS is used by the init script. If you add or remove options, make # # sure you update this section, too. DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ -f ${VARNISH_VCL_CONF} \ -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ -t ${VARNISH_TTL} \ -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \ -u varnish -g varnish \ -S ${VARNISH_SECRET_FILE} \ -s ${VARNISH_STORAGE}" # ## Alternative 4, Do It Yourself. See varnishd(1) for more information. # # DAEMON_OPTS="" Link to comment Share on other sites More sharing options...
Camargo Posted April 11, 2013 Author Share Posted April 11, 2013 Estou com o Apache 2.4 ligado. Não combina com o ApacheBooster, nem com o NGinxcp por causa de um módulo. Nas configurações que fiz acima, antes fica assim: Com SuPHP Loads 2.0 Memória: 8% Agora com FastCGI Loads: 0.5 Memória: 27% Vejo que o Apache 2.4 + FastCGI fez (todo) o papel que o NGinxCP faria. Detalhe: Eu tinha o ApacheBoster ligado, mas volta e meia dava problema com o cacheamento e alguns scripts em PHP travam. Estou BASTANTE satisfeito com o Apache 2.4.4. Link to comment Share on other sites More sharing options...
Jesmarcelo Posted April 11, 2013 Share Posted April 11, 2013 Utilizar o suphp acredito que traria uma segurança maior que o fcgi. <br /><br /><br />Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts