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 optimizar servidor

Tema en 'Servidores Dedicados' iniciado por mart28, 21 Nov 2016.

  1. mart28

    mart28 Nuevo usuario

    hola

    tengo un servidor kimsufi de ovh con debian 8 una distribucion tocada por ellos con ispconfig seleccionar y a funcionar.
    El caso es qtengo uan web con un woommerce y va muy lenta hay dias que va bien +- tarda 3 segundos en cargar pero otros tarda hasta 17 segundos.
    La web no tienen muchas visitas unas 200 al dia +- y usuarios ala vez conectados no hay mas de 3

    He tratado de optimizar los procesos de apache etc, y no e conseguido ninguan mejora , no se si se trata de que uso ispconfig o que pero toco reinicio apache el servidor etc y no cambia el tiempo al hacer un tst ab


    Apache Memory Usage (MB): 157.969
    Average Proccess Size (MB): 26.3281




    top -n 1 -b > top; head -30 top
    top - 10:57:24 up 4 days, 20:07, 1 user, load average: 0,05, 0,04, 0,05
    Tasks: 162 total, 1 running, 161 sleeping, 0 stopped, 0 zombie
    %Cpu(s): 2,8 us, 0,6 sy, 0,0 ni, 96,4 id, 0,2 wa, 0,0 hi, 0,0 si, 0,0 st
    KiB Mem: 2016796 total, 1914368 used, 102428 free, 79996 buffers
    KiB Swap: 523260 total, 140620 used, 382640 free. 792056 cached Mem

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    2623 root 20 0 27288 1520 1080 R 12,2 0,1 0:00.02 top
    1 root 20 0 29660 3044 1616 S 0,0 0,2 0:25.29 systemd
    2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd
    3 root 20 0 0 0 0 S 0,0 0,0 0:08.20 ksoftirqd/0
    5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:+
    7 root 20 0 0 0 0 S 0,0 0,0 2:34.25 rcu_sched
    8 root 20 0 0 0 0 S 0,0 0,0 0:00.00 rcu_bh
    9 root rt 0 0 0 0 S 0,0 0,0 0:03.59 migration/0
    10 root rt 0 0 0 0 S 0,0 0,0 0:03.14 migration/1
    11 root 20 0 0 0 0 S 0,0 0,0 0:06.98 ksoftirqd/1
    13 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/1:+
    14 root rt 0 0 0 0 S 0,0 0,0 0:03.67 migration/2
    15 root 20 0 0 0 0 S 0,0 0,0 0:07.04 ksoftirqd/2
    17 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/2:+
    18 root rt 0 0 0 0 S 0,0 0,0 0:03.17 migration/3
    19 root 20 0 0 0 0 S 0,0 0,0 0:06.46 ksoftirqd/3
    21 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/3:+
    22 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 khelper
    23 root 20 0 0 0 0 S 0,0 0,0 0:00.01 kdevtmpfs
    24 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 netns
    25 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 writeback
    26 root 25 5 0 0 0 S 0,0 0,0 0:00.00 ksmd
    27 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kintegrityd



    free -m
    total used free shared buffers cached
    Mem: 1969 1873 96 175 78 773
    -/+ buffers/cache: 1021 948
    Swap: 510 137 373
     
  2.  
  3. mart28

    mart28 Nuevo usuario

    configuracion de apache


    Timeout 20

    KeepAlive On

    MaxKeepAliveRequests 100


    KeepAliveTimeout 3



    # These need to be set in /etc/apache2/envvars
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}


    #

    HostnameLookups Off




    esta es la configuracion que tengo ahora




    /etc/apache2/mods-available




    <IfModule mpm_prefork_module>

    StartServers 2

    MinSpareServers 2

    MaxSpareServers 5

    MaxRequestWorkers 7

    MaxConnectionsPerChild 300

    </IfModule>



    He probado esta



    IfModule mpm_prefork_module>

    StartServers 5

    MinSpareServers 20

    MaxSpareServers 60

    MaxRequestWorkers 60

    MaxConnectionsPerChild 300




    La configuracion la cambio en apache mods avalables

    service apache2 restart





    El servidor es un kimsufi con 2Gb de ram

    Apache esta trabajando en modo prefork

    He probado mil configuraciones poner todo a 1 valores gigantes y al hacer probar los bencharms

    ab -n25 -c1


    Siempre optengo el mismo valor +- con 2 segundos de diferencia

    Concurrency Level: 1

    Time taken for tests: 50.136 seconds

    Complete requests: 25

    Failed requests: 24




    Pero si voy a gtmetrix y mido lo que tarda en cargar si que hay diferencias,




    He desactivado supercache,

    Tengo instalado memcache pero no lo e desactivado
     
  4. mart28

    mart28 Nuevo usuario

    He tratado tambien de optimizar mysql




    Este es mi fichuero config










    # The MySQL database server configuration file.
    #
    # You can copy this to one of:
    # - "/etc/mysql/my.cnf" to set global options,
    # - "~/.my.cnf" to set user-specific options.
    #
    # One can use all long options that the program supports.
    # Run program with --help to get a list of available options and with
    # --print-defaults to see which it would actually understand and use.
    #
    # For explanations see
    # http://dev.mysql.com/doc/mysql/en/server-system-variables.html




    # This will be passed to all mysql clients
    # It has been reported that passwords should be enclosed with ticks/quotes
    # escpecially if they contain "#" chars...
    # Remember to edit /etc/mysql/debian.cnf when changing the socket location.
    [client]
    port = 3306
    socket = /var/run/mysqld/mysqld.sock




    # Here is entries for some specific programs
    # The following values assume you have at least 32M ram




    # This was formally known as [safe_mysqld]. Both versions are currently parsed.
    [mysqld_safe]
    socket = /var/run/mysqld/mysqld.sock
    nice = 0




    [mysqld]
    #
    # * Basic Settings
    #
    user = mysql
    pid-file = /var/run/mysqld/mysqld.pid
    socket = /var/run/mysqld/mysqld.sock
    port = 3306
    basedir = /usr
    datadir = /var/lib/mysql
    tmpdir = /tmp
    lc-messages-dir = /usr/share/mysql
    skip-external-locking
    log-slow-queries=/var/log/mysql-slow-queries.log
    long_query_time = 1
    log-queries-not-using-indexes





    #
    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address = 127.0.0.1
    #
    # * Fine Tuning
    #
    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 = 100
    #table_cache = 64
    #thread_concurrency = 10
    #
    # * Query Cache Configuration
    #
    query_cache_limit = 1M
    query_cache_size = 16M
    #
    # * Logging and Replication
    #
    # Both location gets rotated by the cronjob.
    # Be aware that this log type is a performance killer.
    # As of 5.1 you can enable the log at runtime!
    #general_log_file = /var/log/mysql/mysql.log
    #general_log = 1
    #
    # Error log - should be very few entries.
    #
    log_error = /var/log/mysql/error.log
    #
    # Here you can see queries with especially long duration
    #slow_query_log_file = /var/log/mysql/mysql-slow.log
    #slow_query_log = 1
    #long_query_time = 2
    #log_queries_not_using_indexes
    #
    # The following can be used as easy to replay backup logs or for replication.
    # note: if you are setting up a replication slave, see README.Debian about
    # other settings you may need to change.
    #server-id = 1
    #log_bin = /var/log/mysql/mysql-bin.log
    expire_logs_days = 10
    max_binlog_size = 100M
    #binlog_do_db = include_database_name
    #binlog_ignore_db = include_database_name
    #
    # * InnoDB
    #
    # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
    # Read the manual for more InnoDB related options. There are many!
    #
    # * Security Features
    #
    # Read the manual, too, if you want chroot!
    # chroot = /var/lib/mysql/
    #
    # For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
    #
    ssl
    ssl-ca=/etc/mysql/cacert.pem
    ssl-cert=/etc/mysql/server-cert.pem
    ssl-key=/etc/mysql/server-key.pem
    # needs OpennSSL build
    ssl-cipher=DH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA---





    [mysqldump]
    quick
    quote-names
    max_allowed_packet = 16M




    [mysql]
    #no-auto-rehash # faster start of mysql but no tab completition




    [isamchk]
    key_buffer = 16M
    query_cache_type = 0
    tmp_table_size = 32M
    max_heap_table_size = 16M
    table_open_cache = 500
    innodb_file_per_table = ON
    innodb_log_file_size = 32M










    #
    # * IMPORTANT: Additional settings that can override those from this file!
    # The files must end with '.cnf', otherwise they'll be ignored.
    #
    !includedir /etc/mysql/conf.d/
     
  5. mart28

    mart28 Nuevo usuario

    y estas son las recomendaciones del




    ./mysqltuner.pl
    >> MySQLTuner 1.7.0 - Major Hayden <major@mhtx.net>
    >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >> Run with '--help' for additional options and output filtering




    [--] Skipped version check for MySQLTuner script
    [OK] Logged in using credentials from debian maintenance account.
    [OK] Currently running supported MySQL version 5.5.52-0+deb8u1-log
    [OK] Operating on 64-bit architecture




    -------- Storage Engine Statistics -----------------------------------------------------------------
    [--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
    [--] Data in MyISAM tables: 319M (Tables: 290)
    [--] Data in InnoDB tables: 15M (Tables: 119)
    [OK] Total fragmented tables: 0




    -------- Security Recommendations ------------------------------------------------------------------
    [OK] There are no anonymous accounts for any database users
    [OK] All database users have passwords assigned
    [!!] There is no basic password file list!




    -------- CVE Security Recommendations --------------------------------------------------------------
    [--] Skipped due to --cvefile option undefined




    -------- Performance Metrics -----------------------------------------------------------------------
    [--] Up for: 4d 20h 29m 8s (5M q [11.951 qps], 49K conn, TX: 17G, RX: 893M)
    [--] Reads / Writes: 72% / 28%
    [--] Binary logging is disabled
    [--] Physical Memory : 1.9G
    [--] Max MySQL memory : 597.8M
    [--] Other process memory: 709.3M
    [--] Total buffers: 192.0M global + 2.7M per thread (151 max threads)
    [--] P_S Max memory usage: 0B
    [--] Galera GCache Max memory usage: 0B
    [OK] Maximum reached memory usage: 229.6M (11.66% of installed RAM)
    [OK] Maximum possible memory usage: 597.8M (30.35% of installed RAM)
    [OK] Overall possible memory usage with other process is compatible with memory available
    [OK] Slow queries: 0% (18K/5M)
    [OK] Highest usage of available connections: 9% (14/151)
    [OK] Aborted connections: 2.93% (1438/49026)
    [!!] name resolution is active : a reverse name resolution is made for each new connection and can reduce performance
    [!!] Query cache may be disabled by default due to mutex contention.
    [OK] Sorts requiring temporary tables: 0% (0 temp sorts / 58K sorts)
    [OK] No joins without indexes
    [!!] Temporary tables created on disk: 56% (34K on disk / 59K total)
    [OK] Thread cache hit rate: 99% (36 created / 49K connections)
    [!!] Table cache hit rate: 2% (400 open / 19K opened)
    [OK] Open file limit used: 52% (540/1K)
    [OK] Table locks acquired immediately: 99% (1M immediate / 1M locks)




    -------- Performance schema ------------------------------------------------------------------------
    [--] Performance schema is disabled.




    -------- ThreadPool Metrics ------------------------------------------------------------------------
    [--] ThreadPool stat is disabled.




    -------- MyISAM Metrics ----------------------------------------------------------------------------
    [!!] Key buffer used: 63.8% (10M used / 16M cache)
    [OK] Key buffer size / total MyISAM indexes: 16.0M/45.8M
    [OK] Read Key buffer hit rate: 100.0% (302M cached / 105K reads)
    [!!] Write Key buffer hit rate: 32.4% (476K cached / 321K writes)




    -------- InnoDB Metrics ----------------------------------------------------------------------------
    [--] InnoDB is enabled.
    [--] InnoDB Thread Concurrency: 0
    [!!] InnoDB File per table is not activated
    [OK] InnoDB buffer pool / data size: 128.0M/15.9M
    [!!] Ratio InnoDB log file size / InnoDB Buffer pool size (3.90625 %): 5.0M/128.0M should be equal 25%
    [OK] InnoDB buffer pool instances: 1
    [--] InnoDB Buffer Pool Chunk Size not used or defined in your version
    [OK] InnoDB Read buffer efficiency: 99.96% (2381059 hits/ 2382008 total)
    [!!] InnoDB Write Log efficiency: 75.68% (1537 hits/ 2031 total)
    [OK] InnoDB log waits: 0.00% (0 waits / 494 writes)




    -------- AriaDB Metrics ----------------------------------------------------------------------------
    [--] AriaDB is disabled.




    -------- TokuDB Metrics ----------------------------------------------------------------------------
    [--] TokuDB is disabled.




    -------- XtraDB Metrics ----------------------------------------------------------------------------
    [--] XtraDB is disabled.




    -------- RocksDB Metrics ---------------------------------------------------------------------------
    [--] RocksDB is disabled.




    -------- Spider Metrics ----------------------------------------------------------------------------
    [--] Spider is disabled.




    -------- Connect Metrics ---------------------------------------------------------------------------
    [--] Connect is disabled.




    -------- Galera Metrics ----------------------------------------------------------------------------
    [--] Galera is disabled.




    -------- Replication Metrics -----------------------------------------------------------------------
    [--] Galera Synchronous replication: NO
    [--] No replication slave(s) for this server.
    [--] This is a standalone server.




    -------- Recommendations ---------------------------------------------------------------------------
    General recommendations:
    Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1
    When making adjustments, make tmp_table_size/max_heap_table_size equal
    Reduce your SELECT DISTINCT queries which have no LIMIT clause
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
    Beware that open_files_limit (1024) variable
    should be greater than table_open_cache (400)
    Variables to adjust:
    query_cache_type (=0)
    tmp_table_size (> 16M)
    max_heap_table_size (> 16M)
    table_open_cache (> 400)
    innodb_file_per_table=ON
    innodb_log_file_size should be equals to 1/4 of buffer pool size (=32M) if possible.

















    Las variables para ajustar ya las cambie

    en




    /etc/mysql

    y hago service mysql restart







    Reinie el servidor incluso pero me sigue diciendo lo mismo




    Lo escribo todo donde no es?

    Que estoy haciendo mal para que me salga siempre el mismo tiempo al hacer un test bencharmk y el tune me diga que cambien las mismas variables




    Siento escribirlo por separado pero no me dejaba escribir un psot de mas 1000 caracteres

    gracias
     
  6. coldhosting

    coldhosting Usuario activo

    Por que no intentas optimizar wordpress mejor?

    Instala el Plugin de WP-Cache, el WP Smush para optimizar imagenes y el WP-Optimize para optimizar las tablas de la base de datos, con eso su web ira mas fluida y rápida.
     
  7. badger

    badger Usuario activo

    Hola, si cambias Apache por Nginx vas a notar una gran mejoría. Usa también PHP-FPM.

    Aparte de eso, para optimizar wordpress lo que mejor resultado me dió (aunque dejé de usarlo hace años) fue quitarle todos los plugins y gestionar la caché desde fuera. Quizá te sirva esta respuesta: http://www.comunidadhosting.com/t/s...web-montadas-con-wordpress.58997/#post-528390

    El proveedor de VPS también es importante.
     
  8. marin

    marin Usuario activo

    Y las características de tu servidor son...

    Tal vez sea que tu servidor ya no da más a basto.
     
  9. mart28

    mart28 Nuevo usuario

    hola
    Mi servidor es un Atom™ N2800 con 2gb de ram. No creo que no pueda mas por que es una unica web con 200 usuarios diarios, como mucho 3 a la vez conectados,
    Yo he desactivado el cache de wordpress por que no conseguia al hacer un test de berchmans que se modificaran los resultados que salian por que siempre eran los mismos tiempos y pense que seria por el cache por lo que no cambian y no conseguia mejorar los tiempos.
    Como cache uso super cache wp smuth y el WP-Optimize tambien lo tengo ahora mismo desactivados.
    el server es poco potente eso si. pero deberian de poder mejorar los tiempos al cambiar los procesos , los star server ...
     
  10. indedmedia

    indedmedia Usuario activo

    Hola @mart28 , sólo me ha hecho falta leer 4 palabras de tu explicación para saber qué te sucede....

    En estas cuatro palabras está la clave "tengo un servidor kimsufi", la he marcado en negrita.

    Los servidores Kimsufi son servidores de muy muy muy pero que MUY baja calidad, servidores con discos muy lentos, viejos y obsoletos, reutilizados y todo lo que puedas imaginar. Esa gama de servidores es una gama creada para estudiantes, para chapurrear con los servidores y aprender, no para tener webs en producción.

    Cambia ese servidor por un VPS cualquiera y seguro que ya notas la diferencia.

    un saludo.
     
  11. mart28

    mart28 Nuevo usuario

    cuando se me termine el contrato me ire a un vps
    gracias
     
  12. indedmedia

    indedmedia Usuario activo

    Notarás la diferencia y mucho, ahora bien, coge un buen VPS ya que estás ;)
     
  13. marlenHJ

    marlenHJ Nuevo usuario

    una pregunta que usaste para hacer la replicacion de base de datos?
     
  14. roymx

    roymx Usuario activo

    Si no tienes muchas visitas porque no utilizas hosting compartido, que tenga cloudlinux y que te asigen 1 core y 1gb de ram, no te seria suficiente, podrias hacer la prueba
     
  15. justice13

    justice13 Usuario activo

    Desde 2016 ya le habrá dado tiempo a decidirse xD
     
  16. roymx

    roymx Usuario activo

    :eek: jajaja :omgh:lol: jajjaa es verdad.
     


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


    
    
    
    
Blog · Sitios amigos: GuiaHosting · Unidominios · Interalta ·