Ir para conteúdo
  • Cadastre-se

Ajuda Otimização De Mysql - Tunningprimer E Mysqltunner


Posts Recomendados

Colegas boa tarde, gostaria da ajuda e opinião de vocês na otimização deste BD. Servidor dedicado com 32G de memória

Fiz 2 teste, segue os 2 abaixo:

 

tunningprimer.sh

 

 

-- MYSQL PERFORMANCE TUNING PRIMER --
             - By: Matthew Montgomery -
 
MySQL Version 5.0.96-community-log x86_64
 
Uptime = 0 days 0 hrs 1 min 1 sec
Avg. qps = 208
Total Questions = 12736
Threads Connected = 11
 
Warning: Server has not been running for at least 48hrs.
It may not be safe to use these recommendations
 
To find out more information on how each of these
runtime variables effects performance visit:
for info about MySQL's Enterprise Monitoring and Advisory Service
 
SLOW QUERIES
The slow query log is enabled.
Current long_query_time = 10 sec.
You have 0 out of 12757 that take longer than 10 sec. to complete
Your long_query_time seems to be fine
 
BINARY UPDATE LOG
The binary update log is NOT enabled.
You will not be able to do point in time recovery
 
WORKER THREADS
Current thread_cache_size = 0
Current threads_cached = 0
Current threads_per_sec = 3
Historic threads_per_sec = 29
Threads created per/sec are overrunning threads cached
You should raise thread_cache_size
 
MAX CONNECTIONS
Current max_connections = 4000
Current threads_connected = 1
Historic max_used_connections = 14
The number of used connections is 0% 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 = 56 M
Current InnoDB data space = 72 M
Current InnoDB buffer pool free = 0 %
Current innodb_buffer_pool_size = 8 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 : 56 M
Configured Max Per-thread Buffers : 10.74 G
Configured Max Global Buffers : 17 M
Configured Max Memory Limit : 10.75 G
Physical Memory : 15.58 G
Max memory limit seem to be within acceptable norms
 
KEY BUFFER
No key reads?!
Seriously look into using some indexes
Current MyISAM index space = 650 K
Current key_buffer_size = 7 M
Key cache miss rate is 1 : 0
Key buffer free ratio = 81 %
Your key_buffer_size seems to be fine
 
QUERY CACHE
Query cache is supported but not enabled
Perhaps you should set the query_cache_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 = 132.00 K
You have had 0 queries where a join could not use an index properly
Your joins seem to be using indexes properly
 
OPEN FILES LIMIT
Current open_files_limit = 20000 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_cache value = 64 tables
You have a total of 175 tables
You have 64 open tables.
Current table_cache hit rate is 10%
, while 100% of your table cache is in use
You should probably increase your table_cache
 
TEMP TABLES
Current max_heap_table_size = 16 M
Current tmp_table_size = 32 M
Of 1533 temp tables, 4% were created on disk
Effective in-memory tmp_table_size is limited to max_heap_table_size.
Created disk tmp tables ratio seems fine
 
TABLE SCANS
Current read_buffer_size = 128 K
Current table scan ratio = 625 : 1
read_buffer_size seems to be fine
 
TABLE LOCKING
Current Lock Wait ratio = 0 : 13041
Your table locking seems to be fine
 
--------------------------------------------------------------------------------------------------------
 
agora pelo mysqltunner
 
-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.96-community-log
[OK] Operating on 64-bit architecture
 
-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB +Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 1M (Tables: 71)
[--] Data in InnoDB tables: 72M (Tables: 87)
[OK] Total fragmented tables: 0
 
-------- Performance Metrics -------------------------------------------------
[--] Up for: 1m 45s (19K q [186.952 qps], 5K conn, TX: 5M, RX: 2M)
[--] Reads / Writes: 90% / 10%
[--] Total buffers: 34.0M global + 2.7M per thread (4000 max threads)
[OK] Maximum possible memory usage: 10.8G (69% of installed RAM)
[OK] Slow queries: 0% (0/19K)
[OK] Highest usage of available connections: 0% (14/4000)
[OK] Key buffer size / total MyISAM indexes: 8.0M/646.0K
[!!] Key buffer hit rate: 0.0% (46 cached / 46 reads)
[!!] Query cache is disabled
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 43 sorts)
[OK] Temporary tables created on disk: 4% (76 on disk / 1K total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 8% (64 open / 775 opened)
[OK] Open file limit used: 0% (5/20K)
[OK] Table locks acquired immediately: 100% (6K immediate / 6K locks)
[!!] InnoDB data size / buffer pool: 73.0M/8.0M
 
-------- Recommendations -----------------------------------------------------
General recommendations:
    MySQL started within last 24 hours - recommendations may be inaccurate
    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)
    thread_cache_size (start at 4)
    table_cache (> 64)
    innodb_buffer_pool_size (>= 72M)

 

Link para o comentário
Compartilhar em outros sites

Tem coisas muito errada nesse seu my.cnf.

 

atualize/Acrescente as seguintes variáveis e valores:

max_connections = 200
 
 
sort_buffer=1M
join_buffer=1M
max_join_size=1M
 
query_cache_limit = 1M
 
query_cache_size = 384M
 
#Aplique aqui o num. cores x 2
thread_concurrency=
 
#Aplique aqui num. cores
thread_cache_size=
 
table_cache=200
tmp_table_cache=300M
 

innodb_buffer_pool_size = 96M
 
#Aplique aqui o num. cores / 2
innodb_thread_concurrency=4
Link para o comentário
Compartilhar em outros sites

Obrigado joaopaulo, vou aplicar suas dicas e depois posto o resultado. Valeu !

 

Tem coisas muito errada nesse seu my.cnf.

 

atualize/Acrescente as seguintes variáveis e valores:

 

max_connections = 200
 
 
sort_buffer=1M
join_buffer=1M
max_join_size=1M
 
query_cache_limit = 1M
 
query_cache_size = 384M
 
#Aplique aqui o num. cores x 2
thread_concurrency=
 
#Aplique aqui num. cores
thread_cache_size=
 
table_cache=200
tmp_table_cache=300M
 

innodb_buffer_pool_size = 96M
 
#Aplique aqui o num. cores / 2
innodb_thread_concurrency=4
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...

Informação Importante

Concorda com os nossos termos?