1. ¡OFERTA! con cupón "DIRVPS": hosting por $0,01 y también VPS Linux y Windows por $0,01 el primer mes por Interserver ← publi
    Descartar aviso
Descartar aviso
Al usar este sitio web, aceptas que nosotros y nuestros socios podamos establecer cookies para fines tales como personalizar el contenido y la publicidad. Más información.

Ayuda para estabilizar Apache

Tema en 'VPS Hosting' iniciado por ClusterIP, 26 Sep 2015.

  1. ClusterIP

    ClusterIP Usuario activo

    Hola,

    Tengo un wordpress en un VPS con 16 GB de memoria y Plesk 12 como panel de control. Utilizo la versión 2.2.15 de Apache y Prefork como MPM.

    Tengo en torno a 400 usuarios de forma simultánea y creciendo rápido, el uso de la CPU de Apache se dispara a picos de casi el 35% y la carga del servidor llega a 4.50. Es evidente que httpd no está bien configurado y no va fino. Adjunto captura de pantalla de la gráfica del uso CPU y de un top en un momento de load average bajo.

    Esta es la configuración que tengo en httpd.conf:
    CODE, HTML o PHP Insertado:
    Timeout 30
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 5
    
    <IfModule prefork.c>
    StartServers      10
    MinSpareServers   25
    MaxSpareServers   50
    ServerLimit     1000
    MaxClients      1000
    MaxRequestsPerChild 20000
    </IfModule>
    Para la gestión de la caché tengo instalado mod_pagespeed y WP Super Caché en Wordpress.

    ¿Es coherente la configuración que tengo para las necesidades requeridas? No se como realizar los cálculos necesarios para estabilizarlo. ¿Sabéis de algún manual bueno?

    Gracias
    Un saludo
     

    Adjuntos:

  2.  
  3. Los valores MaxClients y Server Limit me parece que están demasiado altos. Waooo!!! El Timeout, déjalo en 20 mejor.

    Tienes las RPC activas.
     
    A ClusterIP le gusta esto.
  4. ClusterIP

    ClusterIP Usuario activo

    Gracias f.villalba ¿No sabes de algún manual que me permita calcular valores para ajustar la configuración en función a la demanda de recursos?
     
  5. Hola @ClusterIP

    El MaxClients es con:

    ps -ylC httpd --sort:rss y lo que te salga en MB lo divides por el doble de la RAM creo

    El ServerLimit debes poner lo mismo que el MaxClients

    Sube el MaxRequestsPerChild. Contra más alto, mucho mejor.
     
  6. Prueba con:

    Timeout 20
    ServerLimit 256
    MaxClients 256
    MaxRequestsPerChild 40000

    256 es lo máximo que se puede poner. Igual peganos un: ps -ylC httpd --sort:rss
     
  7. ClusterIP

    ClusterIP Usuario activo

    ps -ylC httpd --sort:rss
    CODE, HTML o PHP Insertado:
    S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY          TIME CMD
    S    48 21705 21703  0  80   0 29012 70178 poll_s ?        00:00:00 httpd
    S    48 21749 21703  0  80   0 38872 131188 semtim ?       00:00:00 httpd
    S    48 21756 21703  0  80   0 40632 169220 semtim ?       00:00:00 httpd
    S    48 21744 21703  0  80   0 41268 169280 semtim ?       00:00:00 httpd
    S    48 21754 21703  0  80   0 41696 150300 ep_pol ?       00:00:00 httpd
    S    48 21845 21703  0  80   0 41728 169255 semtim ?       00:00:00 httpd
    S    48 21706 21703  0  80   0 41780 150313 semtim ?       00:00:00 httpd
    S    48 21918 21703  0  80   0 41904 150344 semtim ?       00:00:00 httpd
    S    48 21728 21703  0  80   0 41976 150343 semtim ?       00:00:00 httpd
    S    48 21748 21703  0  80   0 41984 150333 semtim ?       00:00:00 httpd
    S    48 21757 21703  0  80   0 42076 169278 semtim ?       00:00:00 httpd
    S    48 21730 21703  0  80   0 42208 150374 semtim ?       00:00:00 httpd
    S    48 21914 21703  0  80   0 42272 150390 semtim ?       00:00:00 httpd
    S    48 21879 21703  0  80   0 42304 169316 semtim ?       00:00:00 httpd
    S    48 21753 21703  0  80   0 42328 169324 semtim ?       00:00:00 httpd
    S    48 21888 21703  0  80   0 42360 150426 semtim ?       00:00:00 httpd
    S    48 21894 21703  0  80   0 42456 169330 semtim ?       00:00:00 httpd
    S    48 21887 21703  0  80   0 42552 169334 semtim ?       00:00:00 httpd
    S    48 21913 21703  0  80   0 42676 188245 semtim ?       00:00:00 httpd
    S    48 21707 21703  0  80   0 43168 188265 semtim ?       00:00:00 httpd
    S    48 21758 21703  0  80   0 43440 188332 semtim ?       00:00:00 httpd
    S    48 21919 21703  0  80   0 43440 188296 semtim ?       00:00:00 httpd
    S    48 21750 21703  0  80   0 43480 169310 semtim ?       00:00:00 httpd
    S    48 21917 21703  0  80   0 43484 188349 semtim ?       00:00:00 httpd
    S    48 21731 21703  0  80   0 43608 188344 semtim ?       00:00:00 httpd
    S    48 21915 21703  0  80   0 43608 188297 semtim ?       00:00:00 httpd
    S    48 21751 21703  0  80   0 43696 188342 semtim ?       00:00:00 httpd
    S    48 21877 21703  0  80   0 44056 188332 semtim ?       00:00:00 httpd
    S    48 21921 21703  0  80   0 44136 188386 semtim ?       00:00:00 httpd
    S    48 21734 21703  0  80   0 44588 188328 semtim ?       00:00:00 httpd
    S    48 21712 21703  0  80   0 44896 188226 semtim ?       00:00:00 httpd
    S    48 21729 21703  0  80   0 46324 188617 semtim ?       00:00:00 httpd
    S    48 21916 21703  0  80   0 48064 171175 semtim ?       00:00:00 httpd
    S    48 21739 21703  0  80   0 49760 188357 semtim ?       00:00:00 httpd
    S    48 21912 21703  0  80   0 49848 171110 semtim ?       00:00:00 httpd
    S    48 21909 21703  0  80   0 50784 152605 semtim ?       00:00:00 httpd
    S    48 21910 21703  0  80   0 51780 189483 semtim ?       00:00:00 httpd
    S     0 21703     1  0  80   0 60488 112037 poll_s ?       00:00:00 httpd
    S    48 21737 21703  0  80   0 64060 193392 semtim ?       00:00:01 httpd
    S    48 21743 21703  0  80   0 79416 179201 semtim ?       00:00:00 httpd
    S    48 21747 21703  0  80   0 80704 179053 semtim ?       00:00:00 httpd
    S    48 21922 21703  0  80   0 80736 179085 semtim ?       00:00:00 httpd
    S    48 21920 21703  0  80   0 80892 179091 semtim ?       00:00:00 httpd
    S    48 21908 21703  0  80   0 82784 198148 semtim ?       00:00:00 httpd
    S    48 21892 21703  1  80   0 84048 180116 semtim ?       00:00:01 httpd
    S    48 21740 21703  0  80   0 85724 199208 semtim ?       00:00:00 httpd
    S    48 21745 21703  0  80   0 86520 199542 semtim ?       00:00:01 httpd
    S    48 21880 21703  0  80   0 87108 180496 semtim ?       00:00:01 httpd
    S    48 21741 21703  0  80   0 87608 199455 semtim ?       00:00:01 httpd
    S    48 21735 21703  0  80   0 87784 199455 semtim ?       00:00:01 httpd
    S    48 21742 21703  0  80   0 87992 199475 semtim ?       00:00:01 httpd
    S    48 21738 21703  0  80   0 89100 199577 semtim ?       00:00:01 httpd
     
  8. ClusterIP

    ClusterIP Usuario activo

    Total: 5.702.924:1.024= 5.569

    Resultaría el ajuste a 56. ¿Es correcto?
    CODE, HTML o PHP Insertado:
    ServerLimit 56
    MaxClients 56
     
  9. Lo correcto es coger el 29012 RSS y dividirlo por el doble de la ram que tengas. Creo. 29012 / 16384MB
     
  10. Lo que permite el MaxClients máximo es a 256. ServerLimit debe ir el mismo valor:
    ServerLimit
    Timeout a 20.

    La fórmula creo que es El resultado del primer proceso RSS dividivo por el doble de la RAM.
     
  11. jmginer

    jmginer Usuario activo

    Mira de activar la página de status de Apache, tocar valores así a lo loco es dar palos de ciego.
    http://www.tecmint.com/monitor-apache-web-server-load-and-page-statistics/

    Ejecuta estos comandos para tener un poco más de info:

    ps -eo pcpu,pmem,pid,user,time,args | sort -k 1 -r
    top -n 1 -b
    netstat -nt -p | sort | uniq -c

    Si tienes muchos procesos Apache, te conviene desactivar keep-alive, te irá un poco más lentillo, pero más estable especialmente si andas cojo de CPU.
     
    A ClusterIP le gusta esto.
  12. jmginer

    jmginer Usuario activo

    Cambiando de Prefork a modo Worker también deberías reducir el load del servidor considerablemente.
     
  13. Para eso mejor poner nginx con xcache en fastcgi no? En worker se jode un hilo y se va todo al carajo. O el event mpm.
     
  14. No estoy muy de acuerdo. keepalive debe ir on si se hace uso de CMS para dejar las sesiones abiertas.
     
  15. ClusterIP

    ClusterIP Usuario activo

    Estoy de acuerdo @jmginer . Me gustaría localizar documentación pertinente para modificar parámetros según necesidades puntuales. Ejecutando los comandos que indicas obtengo las siguientes salidas:
    ps -eo pcpu,pmem,pid,user,time,args | sort -k 1 -r

    Salida:
    CODE, HTML o PHP Insertado:
    %CPU %MEM   PID USER         TIME COMMAND
    2.3  0.5 10651 apache   00:00:01 /usr/sbin/httpd
    2.2  0.5 10630 apache   00:00:01 /usr/sbin/httpd
    1.7  0.5  9425 apache   00:00:06 /usr/sbin/httpd
    1.7  0.5 10620 apache   00:00:01 /usr/sbin/httpd
    1.5  0.5  9307 apache   00:00:06 /usr/sbin/httpd
    1.5  0.5 10648 apache   00:00:01 /usr/sbin/httpd
    1.0  0.5 10654 apache   00:00:00 /usr/sbin/httpd
    0.9  0.5  9311 apache   00:00:03 /usr/sbin/httpd
    0.8  0.5  9396 apache   00:00:03 /usr/sbin/httpd
    0.8  0.5 10623 apache   00:00:00 /usr/sbin/httpd
    0.8  0.5 10189 apache   00:00:01 /usr/sbin/httpd
    0.8  0.2 10655 apache   00:00:00 /usr/sbin/httpd
    0.7  0.5  9928 apache   00:00:01 /usr/sbin/httpd
    0.6  2.1 18830 mysql    00:28:35 /usr/libexec/mysqld --basedir=/usr
    var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --open-fil
    48 --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysq
    0.6  0.3  9399 apache   00:00:02 /usr/sbin/httpd
    0.6  0.3  9374 apache   00:00:02 /usr/sbin/httpd
    0.4  0.5  9423 apache   00:00:01 /usr/sbin/httpd
    0.4  0.4  9555 apache   00:00:01 /usr/sbin/httpd
    0.2  0.2 10628 apache   00:00:00 /usr/sbin/httpd
    0.2  0.0 23805 root     05:49:49 /usr/bin/python2.6 /usr/bin/fail2ba
    -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid
    0.2  0.0 17072 popuser  00:00:22 /usr/bin/imapd Maildir
    0.1  0.2 10652 apache   00:00:00 /usr/sbin/httpd
    0.1  0.2 10187 apache   00:00:00 /usr/sbin/httpd
    0.0  1.5  9088 drweb    00:00:00 /opt/drweb/drwebd.real
    0.0  1.5 14823 drweb    00:10:40 /opt/drweb/drwebd.real
    0.0  0.3  9301 root     00:00:00 /usr/sbin/httpd
    0.0  0.3  6523 popuser  00:00:06 spamd child
    0.0  0.3  6517 root     00:00:09 /usr/bin/spamd --nouser-config --us
    ser --daemonize --helper-home-dir=/var/qmail --virtual-config-dir=/va
    lnames/%d/%l/.spamassassin --create-prefs --max-children=1 -r /var/ru
    0.0  0.1  9303 apache   00:00:00 /usr/sbin/httpd
    0.0  0.1 28076 root     00:00:51 /usr/bin/sw-engine -c /usr/local/ps
    f/php.ini /usr/lib64/plesk-9.0/psa-health-monitor-notification.php
    0.0  0.1 27819 root     00:00:29 /usr/bin/sw-engine -c /usr/local/ps
    f/php.ini /usr/local/psa/admin/bin/modules/watchdog/wdcollect -c /usr
    etc/modules/watchdog/wdcollect.inc.php
    0.0  0.0     9 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  9897 named    00:00:07 /usr/sbin/named -u named -c /etc/na
    named -n 2 -t /var/named/chroot
    0.0  0.0     8 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  8777 root     01:26:18 /usr/sbin/sw-collectd -C /etc/sw-co
    ectd.conf
    0.0  0.0     7 root     00:00:00 [rpciod/2455311/]
    0.0  0.0     6 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  6944 root     00:00:00 /usr/sbin/sshd
    0.0  0.0  6898 root     00:00:00 sw-engine-fpm: master process (/etc
    sw-engine-fpm.conf)
    0.0  0.0  6737 root     00:00:00 -bash
    0.0  0.0  6724 root     00:00:00 sshd: root@pts/0
    0.0  0.0   660 root     00:01:09 /sbin/rsyslogd -i /var/run/syslogd.
    0.0  0.0     5 root     00:00:00 [rpciod/2455311/]
    0.0  0.0     4 root     00:00:00 [rpciod/2455311/]
    0.0  0.0     3 root     00:00:00 [khelper/2455311]
    0.0  0.0  3288 498      00:01:21 sw-cp-server: worker process
    
    0.0  0.0  3285 root     00:00:00 sw-cp-server: master process /usr/s
    erverd -c /etc/sw-cp-server/config
    0.0  0.0     2 root     00:00:00 [kthreadd/245531]
    0.0  0.0   295 root     00:00:00 /sbin/udevd -d
    0.0  0.0 27830 root     00:03:43 /usr/local/psa/admin/bin/modules/wa
    t -Ic /usr/local/psa/etc/modules/watchdog/monitrc
    0.0  0.0 26069 qmailq   00:00:00 qmail-clean
    0.0  0.0 26068 qmailr   00:00:00 qmail-rspawn
    0.0  0.0 26067 root     00:00:00 qmail-lspawn | /deliverquota ./Mail
    0.0  0.0 26066 qmaill   00:00:00 splogger qmail
    0.0  0.0 26064 qmails   00:00:01 qmail-send
    0.0  0.0    24 root     00:00:00 [nfsiod/2455311]
    0.0  0.0    23 root     00:00:00 [rpciod/2455311/]
    0.0  0.0    22 root     00:00:00 [rpciod/2455311/]
    0.0  0.0    21 root     00:00:00 [rpciod/2455311/]
    0.0  0.0 21536 root     00:00:00 /usr/sbin/atd
    0.0  0.0    20 root     00:00:00 [rpciod/2455311/]
    0.0  0.0     1 root     00:00:04 init
    0.0  0.0    19 root     00:00:00 [rpciod/2455311/]
    0.0  0.0 19903 root     01:31:00 /usr/libexec/gam_server
    0.0  0.0    18 root     00:00:00 [rpciod/2455311/]
    0.0  0.0 18647 root     00:00:00 /bin/sh /usr/bin/mysqld_safe --data
    b/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld
    --basedir=/usr --user=mysql
    0.0  0.0    17 root     00:00:00 [rpciod/2455311/]
    0.0  0.0 17071 root     00:00:00 /usr/bin/couriertls -server -tcpd /
    aplogin /usr/bin/imapd Maildir
    0.0  0.0    16 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  1622 root     00:00:01 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1621 root     00:00:01 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1620 root     00:00:01 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1619 root     00:00:01 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1618 root     00:00:01 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1617 root     00:00:00 /usr/lib64/courier-authlib/authdaem
    0.0  0.0  1616 root     00:00:00 /usr/sbin/courierlogger -name=couri
    on -pid=/var/run/courier-authdaemon.pid -lockfile=/var/lock/subsys/co
    aemon -start /usr/lib64/courier-authlib/authdaemond
    0.0  0.0    15 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  1599 root     00:00:04 /usr/lib64/couriertcpd -address=0 -
    -maxperip=4 -nodnslookup -noidentlookup 995 /usr/bin/couriertls -ser
    usr/sbin/pop3login /usr/lib64/plesk-9.0/pop3login Maildir
    0.0  0.0  1598 root     00:00:02 /usr/sbin/courierlogger -name=pop3d
    var/run/pop3d-ssl.pid -lockfile=/var/lock/subsys/courier-pop3s -start
    ier-pop3s /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4
    p -noidentlookup 995 /usr/bin/couriertls -server -tcpd /usr/sbin/pop3
    lib64/plesk-9.0/pop3login Maildir
    0.0  0.0  1581 root     00:00:04 /usr/lib64/couriertcpd -address=0 -
    -maxperip=4 -nodnslookup -noidentlookup 110 /usr/sbin/pop3login /usr
    k-9.0/pop3login Maildir
    0.0  0.0  1580 root     00:00:01 /usr/sbin/courierlogger -name=pop3d
    run/pop3d.pid -lockfile=/var/lock/subsys/courier-pop3d -start -name=c
    d /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslo
    ntlookup 110 /usr/sbin/pop3login /usr/lib64/plesk-9.0/pop3login Maild
    0.0  0.0  1556 root     00:00:05 /usr/lib64/couriertcpd -address=0 -
    -maxperip=4 -nodnslookup -noidentlookup 993 /usr/bin/couriertls -ser
    usr/sbin/imaplogin /usr/bin/imapd Maildir
    0.0  0.0  1555 root     00:00:02 /usr/sbin/courierlogger -name=imapd
    var/run/imapd-ssl.pid -lockfile=/var/lock/subsys/courier-imaps -start
    ier-imaps /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4
    p -noidentlookup 993 /usr/bin/couriertls -server -tcpd /usr/sbin/imap
    bin/imapd Maildir
    0.0  0.0  1538 root     00:00:05 /usr/lib64/couriertcpd -address=0 -
    -maxperip=4 -nodnslookup -noidentlookup 143 /usr/sbin/imaplogin /usr
    Maildir
    0.0  0.0  1537 root     00:00:02 /usr/sbin/courierlogger -name=imapd
    run/imapd.pid -lockfile=/var/lock/subsys/courier-imapd -start -name=c
    d /usr/lib64/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslo
    ntlookup 143 /usr/sbin/imaplogin /usr/bin/imapd Maildir
    0.0  0.0 15176 root     00:00:06 xinetd -stayalive -pidfile /var/run
    0.0  0.0    14 root     00:00:00 [rpciod/2455311/]
    0.0  0.0    13 root     00:00:00 [rpciod/2455311/]
    0.0  0.0    12 root     00:00:00 [rpciod/2455311/]
    0.0  0.0  1233 root     00:00:36 crond
    0.0  0.0    11 root     00:00:00 [rpciod/2455311/]
    0.0  0.0    10 root     00:00:00 [rpciod/2455311/]
    0.0  0.0 10919 root     00:00:00 sort -k 1 -r
    0.0  0.0 10918 root     00:00:00 ps -eo pcpu,pmem,pid,user,time,args
     
  16. ClusterIP

    ClusterIP Usuario activo

    top -n 1 -b

    Salida:
    CODE, HTML o PHP Insertado:
    top - 19:09:09 up 87 days,  4:45,  1 user,  load average: 0.70, 1.17, 1.50
    Tasks:  99 total,   7 running,  89 sleeping,   0 stopped,   3 zombie
    Cpu(s): 13.8%us,  5.5%sy,  0.1%ni, 80.5%id,  0.1%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:  16777216k total,  4916980k used, 11860236k free,        0k buffers
    Swap:        0k total,        0k used,        0k free,  1960092k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
    11148 periodic  20   0  234m  57m  23m R 41.7  0.4   0:00.30 php-cgi
    9311 apache    20   0  794m  99m 9584 R 33.7  0.6   0:05.73 httpd
    9928 apache    20   0  780m  93m  10m R 31.8  0.6   0:03.33 httpd
    9307 apache    20   0  782m  95m  10m R 25.8  0.6   0:06.81 httpd
    17072 popuser   20   0 24820 9564 1028 R 19.9  0.1   0:23.51 imapd
    9374 apache    20   0  783m  96m  10m S  2.0  0.6   0:03.90 httpd
    18830 mysql     20   0 3500m 359m 5548 S  2.0  2.2  28:36.65 mysqld
    23805 root      20   0 1963m  11m 2396 S  2.0  0.1 349:49.53 fail2ban-server
        1 root      20   0 19236 1156  936 S  0.0  0.0   0:04.50 init
        2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd/245531
        3 root      20   0     0    0    0 S  0.0  0.0   0:00.00 khelper/2455311
        4 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
        5 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
        6 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
        7 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
        8 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
        9 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       10 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       11 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       14 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       15 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       16 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       17 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       18 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       19 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       20 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       21 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       22 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rpciod/2455311/
       24 root      20   0     0    0    0 S  0.0  0.0   0:00.00 nfsiod/2455311
      295 root      16  -4 10644  344  340 S  0.0  0.0   0:00.00 udevd
      660 root      20   0  179m 4736  860 S  0.0  0.0   1:09.47 rsyslogd
    1233 root      20   0  114m 1000  616 S  0.0  0.0   0:36.49 crond
    1537 root      20   0  4072  492  396 S  0.0  0.0   0:02.01 courierlogger
    1538 root      20   0 11912  896  756 S  0.0  0.0   0:05.79 couriertcpd
    1555 root      20   0  4072  492  396 S  0.0  0.0   0:02.24 courierlogger
    1556 root      20   0 11912  896  756 S  0.0  0.0   0:05.06 couriertcpd
    1580 root      20   0  4072  488  396 S  0.0  0.0   0:01.77 courierlogger
    1581 root      20   0 11912  896  756 S  0.0  0.0   0:04.59 couriertcpd
    1598 root      20   0  4072  492  396 S  0.0  0.0   0:02.07 courierlogger
    1599 root      20   0 11912  892  756 S  0.0  0.0   0:04.05 couriertcpd
    1616 root      20   0  4072  488  396 S  0.0  0.0   0:00.00 courierlogger
    1617 root      20   0 29848 1300  936 S  0.0  0.0   0:00.78 authdaemond
    1618 root      20   0 31952 1852 1356 S  0.0  0.0   0:01.88 authdaemond
    1619 root      20   0 31952 1852 1356 S  0.0  0.0   0:01.84 authdaemond
    1620 root      20   0 31952 1800 1312 S  0.0  0.0   0:01.85 authdaemond
    1621 root      20   0 31952 1852 1356 S  0.0  0.0   0:01.76 authdaemond
    1622 root      20   0 31952 1852 1356 S  0.0  0.0   0:01.79 authdaemond
    3285 root      20   0 44956 1484  268 S  0.0  0.0   0:00.00 sw-cp-serverd
    3288 sw-cp-se  20   0 46064 4152 1820 S  0.0  0.0   1:21.99 sw-cp-serverd
    6517 root      20   0  236m  51m 3276 S  0.0  0.3   0:09.18 spamd
    6523 popuser   20   0  237m  50m 1864 S  0.0  0.3   0:06.76 spamd
    6724 root      20   0  105m 4744 3664 S  0.0  0.0   0:00.11 sshd
    6737 root      20   0  108m 4324 1596 S  0.0  0.0   0:00.06 bash
    6898 root      20   0  343m 9624 1052 S  0.0  0.1   0:00.45 sw-engine-fpm
    6944 root      20   0 66220 1140  432 S  0.0  0.0   0:00.00 sshd
    8777 root      20   0  528m 3008  940 S  0.0  0.0  86:18.48 sw-collectd
    9088 drweb     20   0  285m 250m  432 S  0.0  1.5   0:00.01 drwebd.real
    9301 root      20   0  437m  59m  26m S  0.0  0.4   0:00.21 httpd
    9303 apache    20   0  274m  28m  504 S  0.0  0.2   0:00.00 httpd
    9396 apache    20   0  781m  93m 9784 S  0.0  0.6   0:03.62 httpd
    9399 apache    20   0  744m  57m 9752 S  0.0  0.3   0:02.73 httpd
    9423 apache    20   0  780m  89m 8792 S  0.0  0.5   0:02.69 httpd
    9425 apache    20   0  780m  93m  10m S  0.0  0.6   0:06.96 httpd
    9555 apache    20   0  759m  68m 9.9m S  0.0  0.4   0:02.47 httpd
    9897 named     20   0  230m 9912 1268 S  0.0  0.1   0:07.97 named
    10187 apache    20   0  756m  65m 8632 S  0.0  0.4   0:01.88 httpd
    10189 apache    20   0  781m  93m 9360 S  0.0  0.6   0:01.72 httpd
    10620 apache    20   0  781m  89m 8440 S  0.0  0.5   0:02.53 httpd
    10628 apache    20   0  740m  49m 8616 S  0.0  0.3   0:00.91 httpd
    10630 apache    20   0  781m  91m 8064 S  0.0  0.6   0:03.75 httpd
    10648 apache    20   0  781m  88m 7968 S  0.0  0.5   0:01.66 httpd
    10651 apache    20   0  772m  80m 7556 S  0.0  0.5   0:02.38 httpd
    10652 apache    20   0  756m  62m 7620 S  0.0  0.4   0:01.05 httpd
    10654 apache    20   0  778m  84m 7112 S  0.0  0.5   0:01.55 httpd
    10655 apache    20   0  740m  47m 8196 S  0.0  0.3   0:00.85 httpd
    10931 drweb     20   0  285m 250m  292 S  0.0  1.5   0:00.00 drwebd.real
    11083 apache    20   0  708m  84m 5496 S  0.0  0.5   0:01.47 httpd
    11142 periodic  20   0     0    0    0 Z  0.0  0.0   0:00.04 php-cgi <defunct>
    11143 periodic  20   0     0    0    0 Z  0.0  0.0   0:00.04 php-cgi <defunct>
    11144 periodic  20   0     0    0    0 Z  0.0  0.0   0:00.04 php-cgi <defunct>
    11150 root      20   0 15056 1152  872 R  0.0  0.0   0:00.00 top
    11151 root      20   0  8244  776  652 R  0.0  0.0   0:00.00 suexec
    14823 drweb     20   0  285m 251m 1708 S  0.0  1.5  10:40.79 drwebd.real
    15176 root      20   0 21720  968  716 S  0.0  0.0   0:06.48 xinetd
    17071 root      20   0 35156 2848 2188 S  0.0  0.0   0:00.05 couriertls
    18647 root      20   0  103m 1476 1216 S  0.0  0.0   0:00.01 mysqld_safe
    19903 root      20   0 14100 1576  932 S  0.0  0.0  91:00.78 gam_server
    21536 root      20   0 21108  384  364 S  0.0  0.0   0:00.05 atd
    26064 qmails    20   0  4124  596  484 S  0.0  0.0   0:01.46 qmail-send
    26066 qmaill    20   0  4076  596  500 S  0.0  0.0   0:00.14 splogger
    26067 root      20   0  4116  472  356 S  0.0  0.0   0:00.21 qmail-lspawn
    26068 qmailr    20   0  4116  504  372 S  0.0  0.0   0:00.00 qmail-rspawn
    26069 qmailq    20   0  4072  444  360 S  0.0  0.0   0:00.21 qmail-clean
    27819 root      20   0  341m  27m  18m S  0.0  0.2   0:29.47 sw-engine
    27830 root      20   0  117m 3752 2776 S  0.0  0.0   3:43.40 monit
    28076 root      20   0  354m  30m 5272 S  0.0  0.2   0:51.47 sw-engine
     
  17. ClusterIP

    ClusterIP Usuario activo

    En el momento de la captura del comando top hay 25 usuarios conectados.
     

    Adjuntos:

  18. ClusterIP

    ClusterIP Usuario activo

    Corregidme la fórmula que empleo si no están bien hechos los cálculos. He logrado una disminución de carga de Apache muy considerable.

    Con 120 usuarios conectados la carga es de 2,4 GB, por lo tanto quedan disponibles 13,6 GB de memoria. Divido la asignación de memoria que tengo en la configuración de Wordpress (64 MB) por la RAM que le queda disponible para conocer los valores que asignaré a ServerLimit y a MaxClients:
    CODE, HTML o PHP Insertado:
    <IfModule prefork.c>
    StartServers       8
    MinSpareServers    5
    MaxSpareServers   20
    ServerLimit      200
    MaxClients       200
    MaxRequestsPerChild 10000
    </IfModule>
     
    A nonamef191118 le gusta esto.
  19. ideasmultiples

    ideasmultiples Usuario activo

    Es muy probable que tu problema venga de la DDBB mas que del apache.

    :cool:
     
    A nonamef191118 le gusta esto.
  20. ClusterIP

    ClusterIP Usuario activo

    La DDBB me da valores correctos. ¿Aprecias algo anómalo? Esta es la configuración que tengo en my.cnf:
    CODE, HTML o PHP Insertado:
    [mysqld]
    local-infile=0
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    # Disabling symbolic-links is recommended to prevent assorted security risks
    symbolic-links=0
    
    # Configuracion personalizada
    slow-query-log = 1
    slow-query-log-file = /var/log/mysql-slow.log
    long_query_time = 2
    log-queries-not-using-indexes
    query_cache_limit=512M
    query_cache_size=512M
    query_cache_type=1
    max_connections=100
    interactive_timeout=100
    
    # Reducimos wait_timeout para prevenir que clientes inactivos retengan conexion
    wait_timeout=30
    connect_timeout=10
    
    thread_cache_size=256
    key_buffer=250M
    join_buffer=8M
    join_buffer_size=8M
    record_buffer=1M
    sort_buffer_size=2M
    read_buffer_size=2M
    max_connect_errors=10
    max_allowed_packet=16M
    table_cache=3000
    table_definition_cache=3000
    max_heap_table_size=64M
    tmp_table_size=64M
    open_files_limit=2048
    
    [mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
     


Alojamiento web, Hosting Reseller, Servidores Dedicados - All in Hosting


    
    
    
    
Blog · Sitios amigos: GuiaHosting · Unidominios · Interalta ·