Страница 3 из 3 ПерваяПервая 123
Показано с 21 по 26 из 26

Тема: Падает сервер MySQL

  1. #21
    Member
    Регистрация
    09.09.2019
    Сообщений
    53

    По умолчанию

    Спасибо еще раз.

    Изменения в my.cnf внес.

    TimeOut 60 в Apache поставить не могу, так как иногда запускаю скрипт который бывает выполняется дольше.

    антиддос изменил как вы предложили с 5 и 15 на 50 и 15.

  2. #22
    Member
    Регистрация
    09.09.2019
    Сообщений
    53

    По умолчанию

    Сделал повторно:

    Код:
    curl -L https://raw.githubusercontent.com/BMDan/tuning-primer.sh/master/tuning-primer.sh | bash
    результат:

    Код:
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                
                                     Dload  Upload   Total   Spent    Left  Speed                                  
    100 62937  100 62937    0     0   179k      0 --:--:-- --:--:-- --:--:--  179k                                 
    
     -- MYSQL PERFORMANCE TUNING PRIMER --
          - By: Matthew Montgomery -                                                                               
                                                                                                                   
    MySQL Version 5.5.65-MariaDB x86_64                                                                            
                                                                                                                   
    Uptime = 2 days 20 hrs 48 min 42 sec                                                                           
    Avg. qps = 2                                                                                                   
    Total Questions = 622076                                                                                       
    Threads Connected = 1                                                                                          
                                                                                                                   
    Server has been running for over 48hrs.                                                                        
    It should be safe to follow these recommendations                                                              
                                                                                                                   
    To find out more information on how each of these
    runtime variables effects performance visit:
    http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
    Visit http://www.mysql.com/products/enterprise/advisors.html
    for info about MySQL's Enterprise Monitoring and Advisory Service
                                                                                                                   
    SLOW QUERIES
    The slow query log is NOT enabled.
                                                                                                                   
    BINARY UPDATE LOG
    The binary update log is NOT enabled.                                                                          
    You will not be able to do point in time recovery
    See http://dev.mysql.com/doc/refman/5.5/en/point-in-time-recovery.html
    
    WORKER THREADS
    Current thread_cache_size = 8                                                                                  
    Current threads_cached = 3                                                                                     
    Current threads_per_sec = 0                                                                                    
    Historic threads_per_sec = 0                                                                                   
    Your thread_cache_size is fine
    
    MAX CONNECTIONS
    Current max_connections = 50                                                                                   
    Current threads_connected = 1                                                                                  
    Historic max_used_connections = 4                                                                              
    The number of used connections is 8% of the configured maximum.
    You are using less than 10% of your configured max_connections.
    Lowering max_connections could help to avoid an over-allocation of memory
    See "MEMORY USAGE" section to make sure you are not over-allocating
    
    INNODB STATUS
    Current InnoDB index space = 256 K                                                                             
    Current InnoDB data space = 704 K                                                                              
    Current InnoDB buffer pool free = 47 %                                                                         
    Current innodb_buffer_pool_size = 16 M                                                                         
    Depending on how much space your innodb indexes take up it may be safe                                         
    to increase this value to up to 2 / 3 of total system memory                                                   
                                                                                                                   
    MEMORY USAGE
    Max Memory Ever Allocated : 236 M                                                                              
    Configured Max Per-thread Buffers : 157 M                                                                      
    Configured Max Global Buffers : 224 M                                                                          
    Configured Max Memory Limit : 381 M                                                                            
    Physical Memory : 991 M                                                                                        
    Max memory limit seem to be within acceptable norms
    
    KEY BUFFER
    Current MyISAM index space = 31 M                                                                              
    Current key_buffer_size = 64 M                                                                                 
    Key cache miss rate is 1 : 22                                                                                  
    Key buffer free ratio = 33 %                                                                                   
    Your key_buffer_size seems to be too high.
    Perhaps you can use these resources elsewhere
    
    QUERY CACHE
    Query cache is enabled                                                                                         
    Current query_cache_size = 128 M
    Current query_cache_used = 2 M                                                                                 
    Current query_cache_limit = 512 K                                                                              
    Current Query cache Memory fill ratio = 2.17 %                                                                 
    Current query_cache_min_res_unit = 512 bytes                                                                   
    Your query_cache_size seems to be too high.
    Perhaps you can use these resources elsewhere
    MySQL won't cache query results that are larger than query_cache_limit in size
    
    SORT OPERATIONS
    Current sort_buffer_size = 2 M                                                                                 
    Current read_rnd_buffer_size = 256 K                                                                           
    Sort buffer seems to be fine
    
    JOINS
    Current join_buffer_size = 516.00 K                                                                            
    You have had 347 queries where a join could not use an index properly                                          
    You should enable "log-queries-not-using-indexes"                                                              
    Then look for non indexed joins in the slow query log.                                                         
    If you are unable to optimize your queries you may want to increase your                                       
    join_buffer_size to accommodate larger joins in one pass.                                                      
                                                                                                                   
    Note! This script will still suggest raising the join_buffer_size when
    ANY joins not using indexes are found.                                                                         
                                                                                                                   
    OPEN FILES LIMIT
    Current open_files_limit = 861 files                                                                           
    The open_files_limit should typically be set to at least 2x-3x
    that of table_cache if you have heavy MyISAM usage.
    Your open_files_limit value seems to be fine
    
    TABLE CACHE
    Current table_open_cache = 400 tables                                                                          
    Current table_definition_cache = 400 tables                                                                    
    You have a total of 151 tables                                                                                 
    You have 249 open tables.
    The table_cache value seems to be fine
    
    TEMP TABLES
    Current max_heap_table_size = 16 M                                                                             
    Current tmp_table_size = 16 M                                                                                  
    Of 1786 temp tables, 27% were created on disk                                                                  
    Perhaps you should increase your tmp_table_size and/or max_heap_table_size
    to reduce the number of disk-based temporary tables                                                            
    Note! BLOB and TEXT columns are not allow in memory tables.                                                    
    If you are using these columns raising these values might not impact your 
    ratio of on disk temp tables.
    
    TABLE SCANS
    Current read_buffer_size = 128 K                                                                               
    Current table scan ratio = 2624 : 1                                                                            
    read_buffer_size seems to be fine
    
    TABLE LOCKING
    Current Lock Wait ratio = 1 : 8077                                                                             
    Your table locking seems to be fine

  3. #23
    Member
    Регистрация
    09.09.2019
    Сообщений
    53

    По умолчанию

    и еще:

    Код:
    show global status where variable_name like 'Threads%';
    результат:

    Код:
    +-------------------+-------+                                                                                  
    | Variable_name     | Value |                                                                                  
    +-------------------+-------+                                                                                  
    | Threads_cached    | 3     |                                                                                  
    | Threads_connected | 1     |                                                                                  
    | Threads_created   | 4     |                                                                                  
    | Threads_running   | 1     |                                                                                  
    +-------------------+-------+                                                                                  
    4 rows in set (0.00 sec)

  4. #24
    Senior Member Аватар для Noize_MC
    Регистрация
    04.11.2012
    Адрес
    Moscow, Russia
    Сообщений
    304

    По умолчанию

    Понизьте query_cache_size до 32, а max_heap_table_size и tmp_table_size увеличьте до 64
    В остальном у вас теперь все отлично.

  5. #25
    Member
    Регистрация
    09.09.2019
    Сообщений
    53

    По умолчанию

    Noize_MC, спасибо большое!

  6. #26
    Senior Member Аватар для Noize_MC
    Регистрация
    04.11.2012
    Адрес
    Moscow, Russia
    Сообщений
    304

    По умолчанию

    Рад был помочь

Метки этой темы

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •