O
oortega
Gamma
Programador
Verificación en dos pasos activada
Verificado por Whatsapp
Hola
Mi duda es la siguiente como debo de configurar mi apache y mysql para que mi pagina no vaya tan lenta , anteriormente tenia 512 de ram con unas 4000 visitas en promedio y el sitio iba bien ahora que tiene 11000 mi sitio tarda demasiado en cargar , es un sitio de peliculas , esta hecho en python , bd mysql , he subido la ram a 1gb y nada , he buscado en internet como optimizarlo pero veo que depende mucho de que este consumiendo muchos recursos , esta es una captura que hice :
3708 www-data 18 0 36284 19m 4072 S 1 1.0 0:02.08 /usr/sbin/apache2 -k start
1 root 18 0 2024 728 632 S 0 0.0 1:45.16 init [2]
1439 root 18 0 8664 808 472 S 0 0.0 0:00.00 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
1440 root 18 0 8664 496 160 S 0 0.0 0:00.00 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
1447 root 15 0 1732 648 528 S 0 0.0 0:47.16 /sbin/syslogd
1454 daemon 18 0 2152 424 292 S 0 0.0 0:00.15 /usr/sbin/atd
1462 bind 18 0 97136 25m 2628 S 0 1.2 7:58.10 /usr/sbin/named -u bind
1520 root 15 0 2284 884 696 S 0 0.0 0:19.89 /usr/sbin/cron
1527 messageb 15 0 2572 860 636 S 0 0.0 0:00.06 /usr/bin/dbus-daemon --system
1930 root 15 0 5672 644 420 S 0 0.0 0:00.32 pure-ftpd (SERVER)
1971 root 18 0 9992 1972 864 S 0 0.1 2:55.12 sendmail: MTA: accepting connections
1974 root 15 0 5484 976 592 S 0 0.0 0:54.48 /usr/sbin/sshd
2017 root 18 0 2388 864 692 S 0 0.0 0:00.00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_c
3303 www-data 15 0 45340 28m 4376 S 0 1.4 0:10.29 /usr/sbin/apache2 -k start
3358 www-data 15 0 45676 28m 4344 S 0 1.4 0:09.66 /usr/sbin/apache2 -k start
3399 www-data 15 0 45444 28m 4344 S 0 1.4 0:08.06 /usr/sbin/apache2 -k start
3563 www-data 15 0 46392 29m 4344 S 0 1.4 0:06.74 /usr/sbin/apache2 -k start
3585 www-data 15 0 45776 29m 4288 S 0 1.4 0:06.39 /usr/sbin/apache2 -k start
3591 www-data 15 0 45456 28m 4376 S 0 1.4 0:06.90 /usr/sbin/apache2 -k start
3718 www-data 15 0 44808 27m 4228 S 0 1.4 0:02.38 /usr/sbin/apache2 -k start
3719 root 15 0 8672 3116 2540 S 0 0.1 0:00.07 sshd: root@notty
3722 root 15 0 1924 836 660 S 0 0.0 0:00.00 /usr/lib/openssh/sftp-server
3723 www-data 15 0 36228 19m 4060 S 0 1.0 0:01.56 /usr/sbin/apache2 -k start
3725 root 15 0 8672 3104 2548 S 0 0.1 0:00.08 sshd: root@pts/0
3727 root 15 0 3032 1692 1296 S 0 0.1 0:00.00 -bash
y esta es una grafica de mi servidor , siempre esta en 500 mb de ram
esta es la configuracion que tengo :
Timeout 120
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 3
MaxSpareServers 5
ServerLimit 10
MaxClients 10
MaxRequestsPerChild 1000
</IfModule>
<IfModule mpm_worker_module>
StartServers 1
MinSpareThreads 1
MaxSpareThreads 4
ThreadLimit 64
ThreadsPerChild 25
MaxClients 10
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 1
MaxClients 10
MinSpareThreads 1
MaxSpareThreads 4
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
en mysql :
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 200
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_concurrency = 286
interactive_timeout = 25
wait_timeout = 15
connect_timeout = 10
max_connect_errors = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 6M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
sort_buffer = 64K
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
Que podria optimizar para que ya no este tan lento mi sitio 😱
Mi duda es la siguiente como debo de configurar mi apache y mysql para que mi pagina no vaya tan lenta , anteriormente tenia 512 de ram con unas 4000 visitas en promedio y el sitio iba bien ahora que tiene 11000 mi sitio tarda demasiado en cargar , es un sitio de peliculas , esta hecho en python , bd mysql , he subido la ram a 1gb y nada , he buscado en internet como optimizarlo pero veo que depende mucho de que este consumiendo muchos recursos , esta es una captura que hice :
3708 www-data 18 0 36284 19m 4072 S 1 1.0 0:02.08 /usr/sbin/apache2 -k start
1 root 18 0 2024 728 632 S 0 0.0 1:45.16 init [2]
1439 root 18 0 8664 808 472 S 0 0.0 0:00.00 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
1440 root 18 0 8664 496 160 S 0 0.0 0:00.00 /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
1447 root 15 0 1732 648 528 S 0 0.0 0:47.16 /sbin/syslogd
1454 daemon 18 0 2152 424 292 S 0 0.0 0:00.15 /usr/sbin/atd
1462 bind 18 0 97136 25m 2628 S 0 1.2 7:58.10 /usr/sbin/named -u bind
1520 root 15 0 2284 884 696 S 0 0.0 0:19.89 /usr/sbin/cron
1527 messageb 15 0 2572 860 636 S 0 0.0 0:00.06 /usr/bin/dbus-daemon --system
1930 root 15 0 5672 644 420 S 0 0.0 0:00.32 pure-ftpd (SERVER)
1971 root 18 0 9992 1972 864 S 0 0.1 2:55.12 sendmail: MTA: accepting connections
1974 root 15 0 5484 976 592 S 0 0.0 0:54.48 /usr/sbin/sshd
2017 root 18 0 2388 864 692 S 0 0.0 0:00.00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_c
3303 www-data 15 0 45340 28m 4376 S 0 1.4 0:10.29 /usr/sbin/apache2 -k start
3358 www-data 15 0 45676 28m 4344 S 0 1.4 0:09.66 /usr/sbin/apache2 -k start
3399 www-data 15 0 45444 28m 4344 S 0 1.4 0:08.06 /usr/sbin/apache2 -k start
3563 www-data 15 0 46392 29m 4344 S 0 1.4 0:06.74 /usr/sbin/apache2 -k start
3585 www-data 15 0 45776 29m 4288 S 0 1.4 0:06.39 /usr/sbin/apache2 -k start
3591 www-data 15 0 45456 28m 4376 S 0 1.4 0:06.90 /usr/sbin/apache2 -k start
3718 www-data 15 0 44808 27m 4228 S 0 1.4 0:02.38 /usr/sbin/apache2 -k start
3719 root 15 0 8672 3116 2540 S 0 0.1 0:00.07 sshd: root@notty
3722 root 15 0 1924 836 660 S 0 0.0 0:00.00 /usr/lib/openssh/sftp-server
3723 www-data 15 0 36228 19m 4060 S 0 1.0 0:01.56 /usr/sbin/apache2 -k start
3725 root 15 0 8672 3104 2548 S 0 0.1 0:00.08 sshd: root@pts/0
3727 root 15 0 3032 1692 1296 S 0 0.1 0:00.00 -bash
y esta es una grafica de mi servidor , siempre esta en 500 mb de ram

esta es la configuracion que tengo :
Timeout 120
KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 3
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 3
MaxSpareServers 5
ServerLimit 10
MaxClients 10
MaxRequestsPerChild 1000
</IfModule>
<IfModule mpm_worker_module>
StartServers 1
MinSpareThreads 1
MaxSpareThreads 4
ThreadLimit 64
ThreadsPerChild 25
MaxClients 10
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
StartServers 1
MaxClients 10
MinSpareThreads 1
MaxSpareThreads 4
ThreadLimit 64
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
en mysql :
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
default-character-set=utf8
default-collation=utf8_general_ci
character-set-server=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
max_connections = 200
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_concurrency = 286
interactive_timeout = 25
wait_timeout = 15
connect_timeout = 10
max_connect_errors = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 6M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
sort_buffer = 64K
read_buffer = 16M
write_buffer = 16M
[mysqlhotcopy]
interactive-timeout
Que podria optimizar para que ya no este tan lento mi sitio 😱