Timeout

Boa tarde senhores.

Queria saber qual o motivo de depois de muitas requisições o Mikrotik apresenta nos status timeouts, mas depois continua normalmente a aceitar as requisições.

Alguns pontos:

- Por exemplo, em uma RB tem "148749 Requests", "149130 Accepts", "452 Resends" e "4 Timeouts".

- Nossa rede tem 5 mil clientes e o ping das RBs não passam de 10ms.

- O servidor onde foi instalado o Mk-Auth tem 12 processadores Intel(R) Xeon(R) CPU X5670 @ 2.93GHz, 6GB de memória, 120GB de HD e conexão Giga. Acredito que falta de recursos não deve ser.

Isso pode ser normal (estou querendo perfeição demais, rsrsrsrsrs) ou alguma configuração para o Mk-Auth usar estes recursos?

mk1.png

mk2.png

Para adicionar comentários, você deve ser membro de MK-AUTH.

Join MK-AUTH

Enviar-me um email quando as pessoas responderem –

Respostas

  • Lembrando que eu iniciei o radius com o comando "freeradius -X".

    Obrigado desde já.

  • Muito depende do banco de dados. Alguns parâmetros no acerto do MySQL — /etc/mysql/my.conf — podem fazer a diferença.

    Recursos como o memcached ajudam a manter dados muitos usados na memória. Creio que existe um módulo memcached para o Freeradius.

  • Este é meu arquivo my.cnf:

    [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
    #set-variable = max_connections=1024
    #log-slow-queries
    #safe-show-database

    key_buffer_size = 384M
    max_allowed_packet = 16M
    table_open_cache = 2048
    sort_buffer_size = 8M
    read_buffer_size = 2M
    read_rnd_buffer_size = 8M
    myisam_sort_buffer_size = 64M
    thread_cache_size = 8
    query_cache_size = 64M
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency = 32

    back_log = 50
    max_connections = 100
    max_connect_errors = 99999
    binlog_cache_size = 1M
    join_buffer_size = 8M
    query_cache_limit = 2M
    ft_min_word_len = 4
    default-storage-engine = MYISAM
    thread_stack = 240K
    transaction_isolation = REPEATABLE-READ
    tmp_table_size = 64M
    binlog_format=mixed
    slow_query_log
    long_query_time = 5
    bulk_insert_buffer_size = 64M

    # Point the following paths to a dedicated disk
    #tmpdir = /tmp/

    # Don't listen on a TCP/IP port at all. This can be a security enhancement,
    # if all processes that need to connect to mysqld run on the same host.
    # All interaction with mysqld must be made via Unix sockets or named pipes.
    # Note that using this option without enabling named pipes on Windows
    # (via the "enable-named-pipe" option) will render mysqld useless!
    #
    #skip-networking

    # Replication Master Server (default)
    # binary logging is required for replication
    log-bin=mysql-bin

    # required unique id between 1 and 2^32 - 1
    # defaults to 1 if master-host is not set
    # but will not function as a master if omitted
    server-id = 1

    # Replication Slave (comment out master section to use this)
    #
    # To configure this host as a replication slave, you can choose between
    # two methods :
    #
    # 1) Use the CHANGE MASTER TO command (fully described in our manual) -
    # the syntax is:
    #
    # CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
    # MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
    #
    # where you replace <host>, <user>, <password> by quoted strings and
    # <port> by the master's port number (3306 by default).
    #
    # Example:
    #
    # CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
    # MASTER_USER='joe', MASTER_PASSWORD='secret';
    #
    # OR
    #
    # 2) Set the variables below. However, in case you choose this method, then
    # start replication for the first time (even unsuccessfully, for example
    # if you mistyped the password in master-password and the slave fails to
    # connect), the slave will create a master.info file, and any later
    # change in this file to the variables' values below will be ignored and
    # overridden by the content of the master.info file, unless you shutdown
    # the slave server, delete master.info and restart the slaver server.
    # For that reason, you may want to leave the lines below untouched
    # (commented) and instead use CHANGE MASTER TO (see above)
    #
    # required unique id between 2 and 2^32 - 1
    # (and different from the master)
    # defaults to 2 if master-host is set
    # but will not function as a slave if omitted
    #server-id = 2
    #
    # The replication master for this slave - required
    #master-host = <hostname>
    #
    # The username the slave will use for authentication when connecting
    # to the master - required
    #master-user = <username>
    #
    # The password the slave will authenticate with when connecting to
    # the master - required
    #master-password = <password>
    #
    # The port the master is listening on.
    # optional - defaults to 3306
    #master-port = <port>
    #
    # binary logging - not required for slaves, but recommended
    #log-bin=mysql-bin
    #
    # binary logging format - mixed recommended
    #binlog_format=mixed

    # Uncomment the following if you are using InnoDB tables
    #innodb_data_home_dir = /var/lib/mysql
    #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
    #innodb_log_group_home_dir = /var/lib/mysql
    # You can set .._buffer_pool_size up to 50 - 80 %
    # of RAM but beware of setting memory usage too high
    #innodb_buffer_pool_size = 384M
    #innodb_additional_mem_pool_size = 20M
    # Set .._log_file_size to 25 % of buffer pool size
    #innodb_log_file_size = 100M
    #innodb_log_buffer_size = 8M
    #innodb_flush_log_at_trx_commit = 1
    #innodb_lock_wait_timeout = 50


    # this is only for embedded server
    [embedded]

    [myisamchk]
    key_buffer_size = 512M
    sort_buffer_size = 512M
    read_buffer = 8M
    write_buffer = 8M

    [mysqld_safe]
    # Increase the amount of open files allowed per process. Warning: Make
    # sure you have set the global system limit high enough! The high value
    # is required for a large number of opened tables
    open-files-limit = 8192

    # This group is only read by MariaDB-5.5 servers.
    # If you use the same .cnf file for MariaDB of different versions,
    # use this group for options that older servers don't understand
    [mysqld-5.5]

    # These two groups are only read by MariaDB servers, not by MySQL.
    # If you use the same .cnf file for MySQL and MariaDB,
    # you can put MariaDB-only options here
    [mariadb]

    [mariadb-5.5]

  • Tente aumentar o valor de query_cache_size

    Faça a comparação antes e depois com:

    show status like '%cache%';

  • até que é pouco esse timeout amigo, as vezes um pq travada de um swicth pode causa isso, acho que não é motivo de preocupação...

  • Otimizando o cache do banco de dados as respostas ficam mais rápidas. Uma ferramenta muita boa para tunning é o MySQLTuner.pl. Eu recomendo.

    Aumentar o Timeout para o máximo (10.000 ms) pode ajudar.

  • Uma dúvida, Pedro.

    Aquele tablespace InnoDB é usado pelo MK-AUTH?

  • no mk-auth antigos era o MyISAM, mais agora estou trocando para o XtraDB que é um InooDB melhorado...

    Marco de Freitas disse:

    Uma dúvida, Pedro.

    Aquele tablespace InnoDB é usado pelo MK-AUTH?

  • É uma novidade do MariaDB?

    Pedro Filho disse:

    no mk-auth antigos era o MyISAM, mais agora estou trocando para o XtraDB que é um InooDB melhorado...

  • sim, a nova ISO usa MariaDB no lugar do MySQL: www.goo.gl/PXErG

    Marco de Freitas disse:

    É uma novidade do MariaDB?

    Pedro Filho disse:

    no mk-auth antigos era o MyISAM, mais agora estou trocando para o XtraDB que é um InooDB melhorado...

This reply was deleted.