Foros del Web » Administración de Sistemas » Cloud Computing »

Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Estas en el tema de Servidor con 8gb de ram y no puede con 50 online ayuda porfavor. en el foro de Cloud Computing en Foros del Web. Buenas a todos tengo un problema con un servidor dedicado que tiene Centos instalado. Estoy usando wordpress y un solo dominio una sola web con ...

  #1 (permalink)  
Antiguo 05/01/2011, 23:19
colextey
Invitado
 
Mensajes: n/a
Puntos:
Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Buenas a todos tengo un problema con un servidor dedicado que tiene Centos instalado. Estoy usando wordpress y un solo dominio una sola web con dominios agreados osea parkeados y estoy viendo que con el comando top hay unos picos de CPU muy pero muy elevados por parte del proceso apache httpd. se sobre carga hasta 25 cpu. os dejo un screen para si porfavor me pueden ayudar ya que he leido por todo el foro, pero son problemas de que se pasan de sus servidores lo mio es lo conrtrario ni con 8gb de ram y un sitio de 20 a 60 online no soporta prefiero un hosting de 5dlls a 120dlls que pago.

Cpu(s): 3.8%us, 10.4%sy, 0.0%ni, 85.6%id, 0.2%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 7920384k total, 3732680k used, 4187704k free, 155664k buffers
Swap: 1052248k total, 0k used, 1052248k free, 1713872k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12540 root 18 0 265m 8088 944 S 27.5 0.1 215:49.60 sw-collectd
12801 root 15 0 12876 1208 808 R 0.3 0.0 1:09.41 top
30785 apache 15 0 372m 34m 3632 S 0.3 0.4 0:01.93 httpd
1 root 15 0 10352 700 588 S 0.0 0.0 0:10.20 init
2 root RT -5 0 0 0 S 0.0 0.0 0:01.84 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.15 ksoftirqd/0
4 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0
5 root RT -5 0 0 0 S 0.0 0.0 0:00.00 migration/1
6 root 34 19 0 0 0 S 0.0 0.0 0:00.13 ksoftirqd/1
7 root RT -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/1
8 root 10 -5 0 0 0 S 0.0 0.0 0:00.08 events/0
9 root 10 -5 0 0 0 S 0.0 0.0 0:00.19 events/1
10 root 10 -5 0 0 0 S 0.0 0.0 0:04.51 khelper
79 root 12 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
84 root 10 -5 0 0 0 S 0.0 0.0 0:01.92 kblockd/0
85 root 10 -5 0 0 0 S 0.0 0.0 0:00.02 kblockd/1
86 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid
198 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/0
199 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 cqueue/1
202 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khubd
204 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kseriod
279 root 15 0 0 0 0 S 0.0 0.0 0:00.00 khungtaskd
280 root 21 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
281 root 15 0 0 0 0 S 0.0 0.0 2:16.55 pdflush
282 root 18 -5 0 0 0 S 0.0 0.0 0:00.00 kswapd0
283 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
284 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 aio/1
424 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kpsmoused
455 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 ata/0
456 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 ata/1
457 root 17 -5 0 0 0 S 0.0 0.0 0:00.00 ata_aux
461 root 14 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
462 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
463 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_2
464 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_3
465 root 10 -5 0 0 0 S 0.0 0.0 6:41.61 kjournald
490 root 11 -5 0 0 0 S 0.0 0.0 0:00.00 kauditd
523 root 21 -4 12608 776 396 S 0.0 0.0 0:00.28 udevd
856 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kedac
1288 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kstriped
1304 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kmpathd/0
1305 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kmpathd/1
1306 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kmpath_handlerd
1680 root 15 0 5912 628 504 S 0.0 0.0 1:14.56 syslogd
1683 root 15 0 3808 448 364 S 0.0 0.0 0:00.00 klogd
1726 root 10 -5 0 0 0 S 0.0 0.0 0:26.04 kondemand/0
1727 root 13 -5 0 0 0 S 0.0 0.0 0:00.00 kondemand/1
1751 dbus 19 0 21260 900 680 S 0.0 0.0 0:00.00 dbus-daemon
1764 haldaemo 15 0 30736 3796 1576 S 0.0 0.0 0:00.66 hald
1765 root 25 0 21700 1048 872 S 0.0 0.0 0:00.00 hald-runner
  #2 (permalink)  
Antiguo 06/01/2011, 00:13
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

No veo ninguna sobrecarga en tu servidor, de hecho la carga es 0 para el momento de la captura, además el valor 85.6%id quiere decir que el 85.6% del tiempo el cpu está haciendo nada absolutamente.

No creo que haya nada de que preocuparse
  #3 (permalink)  
Antiguo 06/01/2011, 00:27
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Bueno, porque el servidor se sobre carga y me muestra la ultima advertencia en roja "PROBLEMA", gracias Datacenter1 estaba leyendo uno no muchas respuestas tuyas en el foro gracias por la ayuda que me puedas brindar ya que estoy desesperado.
  #4 (permalink)  
Antiguo 06/01/2011, 00:36
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Probablemente si tomas la captura justo en el momento que ocurra el problema, la info sea de alguna utilidad

Por lo pronto podrías postear la salida de estos comandos?:

mpstat -P ALL

iostat

top -u apache de mostrará los recursos de apache únicamente, así te será más fácil concentrarte solo en los procesos de apache
  #5 (permalink)  
Antiguo 06/01/2011, 00:49
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

hola gracias.
al intentar ejecutar estos comandos no me ningun dato simplemente
-bash: mpstat: command not found
bash: iostat: command not found
top: -u missing name
  #6 (permalink)  
Antiguo 06/01/2011, 01:01
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Te agrego esto:
Dedicated Servers - DualCore AMD Athlon 64 X2 3400+ GIANT
CPU: DualCore AMD Athlon 64 X2 3400+
Memory: 8GB Memory
Operating System: CentOS 5 (64 bit) Lates version

o sera que me ti la mano en comprar este servidor? o sera muy malo? o es falta de configuracion, ya que cuando envie n tiket casi me echan la madre porque como el servidor es unmanager, entonces me dijieron a mi pregunta de que mi conexion caducaba:

Hemos optimizado apache para mas trafico,
este es el ultimo ticket de soporte que atenderemos a su peticion, si desea soporte en su server dedicado debe de contratar manage en su server asi nosotros lo administramos.

depronto te de un dato con ello
  #7 (permalink)  
Antiguo 06/01/2011, 04:32
Avatar de cincinnati  
Fecha de Ingreso: noviembre-2002
Ubicación: Cerca, muy cerca
Mensajes: 971
Antigüedad: 21 años, 5 meses
Puntos: 29
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Si el servidor es "unmanaged" es perfectamente lógico que no te presten soporte salvo que pagues por dicho soporte.

Por cierto, ¿qué quieres decir con "depronto te de un dato con ello"? ¿?
__________________
Be water my friend
  #8 (permalink)  
Antiguo 06/01/2011, 07:47
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Cita:
Iniciado por colextey Ver Mensaje
Te agrego esto:
Dedicated Servers - DualCore AMD Athlon 64 X2 3400+ GIANT
CPU: DualCore AMD Athlon 64 X2 3400+
Memory: 8GB Memory
Operating System: CentOS 5 (64 bit) Lates version

o sera que me ti la mano en comprar este servidor? o sera muy malo? o es falta de configuracion, ya que cuando envie n tiket casi me echan la madre porque como el servidor es unmanager, entonces me dijieron a mi pregunta de que mi conexion caducaba:

Hemos optimizado apache para mas trafico,
este es el ultimo ticket de soporte que atenderemos a su peticion, si desea soporte en su server dedicado debe de contratar manage en su server asi nosotros lo administramos.

depronto te de un dato con ello

Es un Athon ! de hecho un Intel Atom lo supera en potencia (y con creces)
No tienes mucha potencia del lado del servidor, aunque si abundante RAM

Apenas tenga un tiempo te enviaré algunos comandos
  #9 (permalink)  
Antiguo 06/01/2011, 08:24
Avatar de WebTech
Hosting Moderator
 
Fecha de Ingreso: octubre-2005
Ubicación: East Coast
Mensajes: 5.399
Antigüedad: 18 años, 6 meses
Puntos: 162
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Pega la configuración de Apache, puedes verlo en /etc/httpd/conf/httpd.conf, también la de mysql, posiblemente esté en /etc/my.cnf y el kernel, en /etc/sysct.conf, una vez tengamos algo de esto quizás te podamos ayudar un poco en el tema.

Saludos,
__________________
Infranetworking.com - Expertos en Hosting Multidominio, Cloud Hosting, Servidores Dedicados y Administración de Servidores Linux
  #10 (permalink)  
Antiguo 06/01/2011, 10:43
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Agradezco mucho la ayuda, aqui les pego lo que me pidieron:

my.cnf

[mysqld]
# bind-address=127.0.0.1
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
  #11 (permalink)  
Antiguo 06/01/2011, 10:45
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

sysct.conf

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 1

# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1

# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1

# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536

# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536

# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736

# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
  #12 (permalink)  
Antiguo 06/01/2011, 10:46
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Dime que exactamente te mando del httpd.conf ya que es muy largo y no me da para ponerlo aca gracias por la ayuda.
  #13 (permalink)  
Antiguo 06/01/2011, 10:56
Avatar de WebTech
Hosting Moderator
 
Fecha de Ingreso: octubre-2005
Ubicación: East Coast
Mensajes: 5.399
Antigüedad: 18 años, 6 meses
Puntos: 162
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

my.cnf y sysctl.conf están por defecto, eso se puede optimizar y mucho dependiendo de como se comporte el server, se puede hacer algo pero lo ideal es verlo en tiempo real, en base a varias estadísticas. Intentaré darte algunas líneas para optimizar dichos servicios más tarde, o quizás si Datacenter1 llega antes, él te podrá recomendar valores también.

Sobre httpd.conf indica por favor maxclients, serverlimit, timeout, keepalive, keepalivetimeout, maxkeepaliverequests

Saludos,
__________________
Infranetworking.com - Expertos en Hosting Multidominio, Cloud Hosting, Servidores Dedicados y Administración de Servidores Linux
  #14 (permalink)  
Antiguo 06/01/2011, 11:02
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Gracias Webtech.

#
# Timeout: The number of seconds before receives and sends time out.
# default 120
Timeout 45

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 200

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 10

##
## Server-Pool Size Regulation (MPM specific)
##

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 8000
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
  #15 (permalink)  
Antiguo 06/01/2011, 11:06
Avatar de atlanticadigital  
Fecha de Ingreso: agosto-2008
Ubicación: Buenos Aires - Argentina
Mensajes: 1.417
Antigüedad: 15 años, 8 meses
Puntos: 128
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Colextey, si Apache usa demasiado CPU y sin embargo el servidor dispone de bastante memoria libre, como creo que es tu caso, prueba modificar/agregar las siguientes lineas en httpd.conf:

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
MinSpareServers 45
MaxSpareServers 60
StartServers 45
MaxClients 500
MaxRequestsPerChild 5

No utilices esto si el servidor tiene poca memoria libre.

Ahora bien, si esto no te funciono y queres probar algo mas, proba esto:

Timeout 15
KeepAlive Off
#MaxKeepAliveRequests 100
#KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 250
MaxRequestsPerChild 0
RLimitCPU 10 20
RLimitNPROC 15 20

Esto ultimo no va a hacer que apache vaya mas rapido pero es una buena solucion si el servidor esta muy cargado.

Saludos y espero te sirva.
__________________
AtlanticaDigital.net
Web Hosting
Hosting Reseller
  #16 (permalink)  
Antiguo 06/01/2011, 11:08
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Uso CPU de Apache 68.8 %

Y no tengo ni 40 online.

atlanticadigital gracias lo aplicare ya mismo. sera que solo con reiniciar apache esta o toca paralo? y epezarlo restaurarlo tiene.
  #17 (permalink)  
Antiguo 06/01/2011, 11:13
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Yo sigo sin ver nada anormal en el servidor, sin embargo creo que podemos ayudarte a compensar la lentitud del servidor con la ram que tienes y probablemente Webtech pueda ayudarnos también

El siguiente sysctl.com servirá para comenzar:
Antes de sobrescribirlo, DEBES HACER UNA COPIA


systctl.conf
Código:
# The following is suitable for dedicated web server, mail, ftp server etc.
# ---------------------------------------
# BOOLEAN Values:
# a) 0 (zero) - disabled / no / false
# b) Non zero - enabled / yes / true
# --------------------------------------
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
 
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
 
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
 
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
 
# Controls whether core dumps will append the PID to the core filename
# Useful for debugging multi-threaded applications
kernel.core_uses_pid = 1
 
# Controls the use of TCP syncookies
#net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_synack_retries = 2
 
########## IPv4 networking start ##############
# Send redirects, if router, but this is just server
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
 
# Accept packets with SRR option? No
net.ipv4.conf.all.accept_source_route = 0
 
# Accept Redirects? No, this is not router
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
 
# Log packets with impossible addresses to kernel log? yes
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
 
# Ignore all ICMP ECHO and TIMESTAMP requests sent to it via broadcast/multicast
net.ipv4.icmp_echo_ignore_broadcasts = 1
 
# Prevent against the common 'syn flood attack'
net.ipv4.tcp_syncookies = 1
 
# Enable source validation by reversed path, as specified in RFC1812
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
 
########## IPv6 networking start ##############
# Number of Router Solicitations to send until assuming no routers are present.
# This is host and not router
net.ipv6.conf.default.router_solicitations = 0
 
# Accept Router Preference in RA?
net.ipv6.conf.default.accept_ra_rtr_pref = 0
 
# Learn Prefix Information in Router Advertisement
net.ipv6.conf.default.accept_ra_pinfo = 0
 
# Setting controls whether the system will accept Hop Limit settings from a router advertisement
net.ipv6.conf.default.accept_ra_defrtr = 0
 
#router advertisements can cause the system to assign a global unicast address to an interface
net.ipv6.conf.default.autoconf = 0
 
#how many neighbor solicitations to send out per address?
net.ipv6.conf.default.dad_transmits = 0
 
# How many global unicast IPv6 addresses can be assigned to each interface?
net.ipv6.conf.default.max_addresses = 1
 
########## IPv6 networking ends ##############
 
#Enable ExecShield protection
kernel.exec-shield = 1
kernel.randomize_va_space = 1
 
# TCP and memory optimization
# increase TCP max buffer size setable using setsockopt()
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 87380 8388608
 
# increase Linux auto tuning TCP buffer limits
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
net.core.netdev_max_backlog = 5000
net.ipv4.tcp_window_scaling = 1
 
# increase system file descriptor limit
fs.file-max = 100000
 
#Allow for more PIDs
kernel.pid_max = 65536
 
#Increase system IP port limits
net.ipv4.ip_local_port_range = 2000 65000

#vm tweaks
vm.dirty_background_ratio=20
vm.dirty_ratio=25
fs.aio-max-nr = 1048576
luego de colocados estos valores usa el comando sysctl -p para que entren en efecto sin reiniciar, luego sigo con mysql y httpd
  #18 (permalink)  
Antiguo 06/01/2011, 11:20
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

perfecto ya lo aplique:

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_synack_retries = 2
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
error: "net.ipv6.conf.default.router_solicitations" is an unknown key
error: "net.ipv6.conf.default.accept_ra_rtr_pref" is an unknown key
error: "net.ipv6.conf.default.accept_ra_pinfo" is an unknown key
error: "net.ipv6.conf.default.accept_ra_defrtr" is an unknown key
error: "net.ipv6.conf.default.autoconf" is an unknown key
error: "net.ipv6.conf.default.dad_transmits" is an unknown key
error: "net.ipv6.conf.default.max_addresses" is an unknown key
kernel.exec-shield = 1
kernel.randomize_va_space = 1
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 87380 8388608
net.core.rmem_max = 8388608
net.core.wmem_max = 8388608
net.core.netdev_max_backlog = 5000
net.ipv4.tcp_window_scaling = 1
fs.file-max = 100000
kernel.pid_max = 65536
net.ipv4.ip_local_port_range = 2000 65000
vm.dirty_background_ratio = 20
vm.dirty_ratio = 25
fs.aio-max-nr = 1048576

al ejecutar el comando sysctl -p me dio lo anterior todo bien?
  #19 (permalink)  
Antiguo 06/01/2011, 11:24
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

otra cosa que tambien creo que te sirva pueden ser estos datos:
Uso CPU de Apache 60.8 %
Uso de CPU de MySQL 0.9 %
Uso memoria de Apache 5.6% usadas (431 MB de 7.55 GB)
Uso de memoria de MySQL 0.6% usadas (44.5 MB de 7.55 GB

en si no entiendo e problema es de CPU me imagino, bueno os agradesco enormemente la ayuda que me estan brindando gracias.
  #20 (permalink)  
Antiguo 06/01/2011, 11:29
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Para ver como está MySQL y algunas sugerencias, te recomiendo ejecutar este comando y postear la salida:

Código:
wget mysqltuner.pl
perl mysqltuner.pl
y en httpd.conf podríamos colocar estos valores para comenzar:

Código:
Timeout 20
KeepAlive On
MaxKeepAliveRequests 0
KeepAliveTimeout 3

<IfModule prefork.c>
StartServers       2
MinSpareServers    2
MaxSpareServers    5
ServerLimit        200
MaxClients         200
MaxRequestsPerChild  4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75 
ThreadsPerChild 25
MaxRequestsPerChild 50000
</IfModule>
Estos valores deben aumentar el consumo de memoria pero bajar la carga de CPU

Por otro lado, un cache de php como eaccelerator y algunos plugins de cache para wordpress ayudarán
  #21 (permalink)  
Antiguo 06/01/2011, 11:32
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

para wget mysqltuner.pl

--2011-01-06 19:26:29-- http://mysqltuner.pl/
Resolving mysqltuner.pl... 174.143.142.58
Connecting to mysqltuner.pl|174.143.142.58|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mysqltuner.pl/mysqltuner.pl [following]
--2011-01-06 19:26:29-- http://mysqltuner.pl/mysqltuner.pl
Connecting to mysqltuner.pl|174.143.142.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 39054 (38K) [text/plain]
Saving to: `mysqltuner.pl'

100%[================================================== ========================================>] 39,054 --.-K/s in 0.1s

2011-01-06 19:26:29 (359 KB/s) - `mysqltuner.pl' saved [39054/39054]

y para perl mysqltuner.pl

>> MySQLTuner 1.0.1 - Major Hayden <[email protected]>
>> Bug reports, feature requests, and downloads at http://mysqltuner.com/
>> Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.77
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive +BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2M (Tables: 101)
[--] Data in InnoDB tables: 2M (Tables: 173)
[!!] BDB is enabled but isn't being used
[!!] Total fragmented tables: 2

-------- Performance Metrics -------------------------------------------------
[--] Up for: 4d 23h 48m 3s (2M q [4.911 qps], 251K conn, TX: 10B, RX: 246M)
[--] Reads / Writes: 99% / 1%
[--] Total buffers: 34.0M global + 2.7M per thread (100 max threads)
[OK] Maximum possible memory usage: 309.0M (3% of installed RAM)
[OK] Slow queries: 0% (0/2M)
[OK] Highest usage of available connections: 39% (39/100)
[OK] Key buffer size / total MyISAM indexes: 8.0M/1.3M
[OK] Key buffer hit rate: 99.9% (68M cached / 36K reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 292K sorts)
[!!] Temporary tables created on disk: 49% (239K on disk / 488K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (64 open / 6K opened)
[OK] Open file limit used: 0% (46/65K)
[OK] Table locks acquired immediately: 99% (2M immediate / 2M locks)
[OK] InnoDB data size / buffer pool: 2.9M/8.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
Add skip-bdb to MySQL configuration to disable BDB
Run OPTIMIZE TABLE to defragment tables for better performance
Enable the slow query log to troubleshoot bad queries
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Set thread_cache_size to 4 as a starting value
Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
query_cache_size (>= 8M)
tmp_table_size (> 32M)
max_heap_table_size (> 16M)
thread_cache_size (start at 4)
table_cache (> 64)
  #22 (permalink)  
Antiguo 06/01/2011, 11:32
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Por último quisiera ver la salida de iostat, para instalarlo puedes hacer:

para instalar:
Código:
yum install sysstat
Para ejecutar:
Código:
iostat
Para ver el top solo de apache:
Código:
top -u apache
  #23 (permalink)  
Antiguo 06/01/2011, 11:42
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

my.cnf DEBES HACER BACKUP DEL ANTERIOR:

Código:
[mysqld]
# bind-address=127.0.0.1
set-variable=local-infile=0
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
interactive_timeout=100
wait_timeout=15
connect_timeout=10
safe-show-database
query_cache_type=1
query_cache_size = 32M
query_cache_limit = 32M
join_buffer_size = 1M
read_buffer_size = 1M
thread_cache_size = 32
thread_concurrency = 2
table_cache = 2000
tmp_table_size = 32M
max_heap_table_size = 32M
innodb_buffer_pool_size = 32M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
low_priority_updates = 1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
  #24 (permalink)  
Antiguo 06/01/2011, 11:46
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

iostat
Linux 2.6.18-194.26.1.el5 (colossus921.com) 01/06/2011

avg-cpu: %user %nice %system %iowait %steal %idle
9.47 0.00 1.10 0.02 0.00 89.42

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 5.70 3.18 141.29 6486245 288036974
sda1 0.00 0.00 0.00 1548 6
sda2 5.70 3.18 141.29 6482746 288036968
sda3 0.00 0.00 0.00 1607 0

para top -u apache

35505 apache 16 0 314m 31m 3452 S 15.9 0.4 0:00.48 httpd
35510 apache 16 0 315m 31m 3484 S 7.0 0.4 0:00.50 httpd
35296 apache 15 0 315m 31m 3660 S 0.3 0.4 0:00.86 httpd
35456 apache 15 0 316m 32m 3612 S 0.3 0.4 0:01.17 httpd
34753 apache 18 0 229m 5964 476 S 0.0 0.1 0:00.00 httpd
35316 apache 15 0 315m 32m 3608 S 0.0 0.4 0:01.97 httpd
35338 apache 15 0 315m 31m 3484 S 0.0 0.4 0:01.23 httpd
35348 apache 15 0 314m 31m 3452 S 0.0 0.4 0:00.48 httpd
35369 apache 15 0 296m 10m 1820 S 0.0 0.1 0:00.00 httpd
35388 apache 15 0 315m 32m 3624 S 0.0 0.4 0:00.99 httpd
35404 apache 15 0 296m 10m 1820 S 0.0 0.1 0:00.02 httpd
35405 apache 15 0 314m 31m 3452 S 0.0 0.4 0:00.48 httpd
35409 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35413 apache 15 0 316m 32m 3676 S 0.0 0.4 0:01.47 httpd
35416 apache 15 0 316m 32m 3672 S 0.0 0.4 0:02.90 httpd
35418 apache 15 0 315m 31m 3484 S 0.0 0.4 0:00.44 httpd
35422 apache 15 0 315m 32m 3692 S 0.0 0.4 0:01.52 httpd
35430 apache 15 0 315m 32m 3672 S 0.0 0.4 0:00.63 httpd
35450 apache 15 0 316m 32m 3652 S 0.0 0.4 0:01.51 httpd
35457 apache 15 0 315m 31m 3660 S 0.0 0.4 0:00.57 httpd
35470 apache 15 0 315m 31m 3484 S 0.0 0.4 0:00.95 httpd
35500 apache 15 0 296m 10m 1816 S 0.0 0.1 0:00.00 httpd
35502 apache 15 0 296m 10m 1816 S 0.0 0.1 0:00.00 httpd
35503 apache 15 0 296m 10m 1816 S 0.0 0.1 0:00.00 httpd
35506 apache 15 0 296m 10m 1820 S 0.0 0.1 0:00.00 httpd
35507 apache 15 0 315m 31m 3388 S 0.0 0.4 0:00.50 httpd
35511 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35512 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35514 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35515 apache 15 0 296m 10m 1820 S 0.0 0.1 0:00.00 httpd
35517 apache 15 0 315m 31m 3612 S 0.0 0.4 0:00.61 httpd
35518 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35519 apache 15 0 295m 10m 1816 S 0.0 0.1 0:00.00 httpd
35520 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35530 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35532 apache 15 0 295m 10m 1700 S 0.0 0.1 0:00.00 httpd
35533 apache 15 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35534 apache 15 0 296m 10m 1816 S 0.0 0.1 0:00.00 httpd
35535 apache 17 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35536 apache 18 0 295m 10m 1720 S 0.0 0.1 0:00.00 httpd
35537 apache 18 0 295m 9632 880 S 0.0 0.1 0:00.00 httpd

muchas gracias Datacenter1
  #25 (permalink)  
Antiguo 06/01/2011, 11:46
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Luego de aplicados las optimizaciones para httpd.conf, sysctl.conf y mysql.conf, cuentanos como se siente el servidor

Que versión de apache usas? pueden verla con httpd -v

Tienes algún panel de control instalado?

Tienes algún cache PHP?

Hay excelentes plugins para Wordpress que pueden hacer la diferencia, además wordpress se comporta muy bien con eaccelerator
  #26 (permalink)  
Antiguo 06/01/2011, 11:50
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Server version: Apache/2.2.3
Server built: Aug 30 2010 12:28:40

Tienes algún panel de control instalado?
si plesk

Tienes algún cache PHP?
no lo se, creo que no.

deacuerdo con eaccelerator vi que le ayudastes a alguien que tenia igual que yo 8gb de ram y estuve intentando ayer con la guia que le dejastes y no me funciono la instalacion.
  #27 (permalink)  
Antiguo 06/01/2011, 11:55
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

excelente perfecto de 60% que andaba el server CPU quedo en Uso CPU de Apache 19.2 % igual no sera mucho, no mas para tener 26 conectados cuando tome la estadistica?
  #28 (permalink)  
Antiguo 06/01/2011, 12:02
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Cita:
Iniciado por colextey Ver Mensaje
excelente perfecto de 60% que andaba el server CPU quedo en Uso CPU de Apache 19.2 % igual no sera mucho, no mas para tener 26 conectados cuando tome la estadistica?
Me alegra que haya mejorada, instalar eaccelerator ayudará muchísimo, especialmente debido a que tienes ram libre y se podría colocar el cache en un disco ram, pero no es fácil realizar esta instalación con solo darte las instrucciones

Un manual de instalación se encuentra en: (en Ingles) http://eaccelerator.net/wiki/InstallFromSource

Lo mejor es que intentes hacerlo y cualquier duda puntual la posteas aquí

Otro sistema que deberías instalar es un plugin de Wordpress llamado W3 Total Cache, puede ser un poco complicado para novatos, pero con este plugin he bajado considerablemente los tiempos de carga y la carga de servidor de un sitio Worpress que supera las 300 conexiones simultáneas
  #29 (permalink)  
Antiguo 06/01/2011, 12:12
colextey
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

Datacenter1, En realidad eaccelerator es complicado de instalar y de que funcione o no?

Ya que realmente no conozco aun muchas cosas, gracias por tu amabilidad tan desinteresada.

Te comento, yo llego hasta donde se descomprime pero al ejecutar estos comandos dice bash no encontrado.

phpize
./configure
make
make install

Última edición por colextey; 06/01/2011 a las 12:30
  #30 (permalink)  
Antiguo 06/01/2011, 12:40
Avatar de Datacenter1
Usuario no validado
 
Fecha de Ingreso: agosto-2005
Ubicación: Chicago
Mensajes: 1.982
Antigüedad: 18 años, 8 meses
Puntos: 144
Respuesta: Servidor con 8gb de ram y no puede con 50 online ayuda porfavor.

No considero que sea difícil, aquí va un minitutorial:

Primero que nada debes saber la ubicación de php.ini normalmente se encuentra en /usr/local/lib/php.ini pero esto puede variar, una forma de buscarlo es con el comando whereis php.ini o con el comando php -i |grep "Loaded Configuration File"

Una vez que lo tienes ubicado, ejecuta estos comandos:

Código:
cd /usr/local/src
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.zip
unzip eaccelerator-0.9.6.1.zip
cd  eaccelerator-0.9.6.1
phpize
./configure 
make
make install

## Creamos un directorio para eaccelerator
mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator
Ahora en tu php.ini debes colocar las siguientes instrucciones:
Código:
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
y reiniciar apache

luego puedes ver si el módulo ha cargado ejecutando php -i|grep eaccelerator

Nota: si falla la instalación, apache probablemente no arrancará, debes comentar las lineas de eaccelerator y reiniciar apache de nuevo

Esto te dará una instalación básica pero funcional de eaccelerator

Etiquetas: ram, servidores
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:24.