Ir para conteúdo
  • Cadastre-se

Mysql consumindo 20% de CPU


Posts Recomendados

Boa Noite @Hostpara

Abaixo esta os resultados:

root@alfa [~]# /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl

>> MySQLTuner 1.1.2 - Major Hayden <[email protected]>

>> Bug reports, feature requests, and downloads at http://mysqltuner.com/

>> Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------

[--] Skipped version check for MySQLTuner script

[OK] Currently running supported MySQL version 5.1.56-log

[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

-------- Storage Engine Statistics -------------------------------------------

[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster

[--] Data in MyISAM tables: 273M (Tables: 1102)

[--] Data in InnoDB tables: 8M (Tables: 42)

[!!] Total fragmented tables: 195

-------- Performance Metrics -------------------------------------------------

[--] Up for: 1h 29m 31s (484K q [90.174 qps], 15K conn, TX: 5B, RX: 173M)

[--] Reads / Writes: 95% / 5%

[--] Total buffers: 34.0M global + 2.7M per thread (500 max threads)

[OK] Maximum possible memory usage: 1.3G (22% of installed RAM)

[OK] Slow queries: 0% (0/484K)

[OK] Highest usage of available connections: 5% (28/500)

[OK] Key buffer size / total MyISAM indexes: 8.0M/69.0M

[OK] Key buffer hit rate: 99.6% (33M cached / 147K reads)

[!!] Query cache is disabled

[OK] Sorts requiring temporary tables: 6% (5K temp sorts / 80K sorts)

[!!] Joins performed without indexes: 222

[!!] Temporary tables created on disk: 41% (34K on disk / 84K total)

[!!] Thread cache is disabled

[!!] Table cache hit rate: 0% (64 open / 8K opened)

[OK] Open file limit used: 4% (115/2K)

[OK] Table locks acquired immediately: 99% (508K immediate / 509K locks)

[!!] InnoDB data size / buffer pool: 8.5M/8.0M

-------- Recommendations -----------------------------------------------------

General recommendations:

Run OPTIMIZE TABLE to defragment tables for better performance

MySQL started within last 24 hours - recommendations may be inaccurate

Adjust your join queries to always utilize indexes

When making adjustments, make tmp_table_size/max_heap_table_size equal

Reduce your SELECT DISTINCT queries without LIMIT clauses

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)

join_buffer_size (> 128.0K, or always use indexes with joins)

tmp_table_size (> 16M)

max_heap_table_size (> 16M)

thread_cache_size (start at 4)

table_cache (> 64)

innodb_buffer_pool_size (>= 8M)

Link para o comentário
Compartilhar em outros sites

O ideal e otimizar o mysql, segue os comandos abaixo:

acesse o ssh e rode esse comando:

# pico /etc/my.cnf

e adicione essas linhas:

thread_cache_size=4

query_cache_size=10M

table_cache=160

tmp_table_size=20M

max_heap_table_size=20M

table_cache=65

innodb_buffer_pool_size=9M

query_cache_size=9M

join_buffer_size=130K

apos isso rode os comandos ctrl+x e depois y. Apos isso reinicie o Mysql.

======

Apos executar esses comandos espere 24horas e rode o comando /usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl e poste os resultados.

Link para o comentário
Compartilhar em outros sites

@HostPara, efetuei as configurações. Dentro de 24 horas retorno com os resultados do mysqlturner.

Fugindo um pouco do assunto o PARA da sua empresa me lembra do Calypso.. Acelero Acelero Acelero meu coração, não da para segurar....

Rsrsrs

Ela foi criada quando eu morava no Pará. Em breve novidades na Host Pará. Aguarde!

Link para o comentário
Compartilhar em outros sites

Rodei o comando que pediu @Hostpara.

E retornou assim:

>> MySQLTuner 1.1.2 - Major Hayden <[email protected]>

>> Bug reports, feature requests, and downloads at http://mysqltuner.com/

>> Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------

[--] Skipped version check for MySQLTuner script

[OK] Currently running supported MySQL version 5.1.56-log

[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM

-------- Storage Engine Statistics -------------------------------------------

[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster

[--] Data in MyISAM tables: 123M (Tables: 128)

[--] Data in InnoDB tables: 144K (Tables: 9)

[!!] Total fragmented tables: 26

-------- Performance Metrics -------------------------------------------------

[--] Up for: 22h 24s (8K q [33.898 qps], 439 conn, TX: 783M, RX: 2M)

[--] Reads / Writes: 86% / 14%

[--] Total buffers: 48.0M global + 2.7M per thread (500 max threads)

[OK] Maximum possible memory usage: 1.4G (33% of installed RAM)

[OK] Slow queries: 0% (0/8K)

[OK] Highest usage of available connections: 1% (7/500)

[OK] Key buffer size / total MyISAM indexes: 8.0M/71.2M

[OK] Key buffer hit rate: 98.1% (817K cached / 15K reads)

[OK] Query cache efficiency: 64.9% (4K cached / 6K selects)

[OK] Query cache prunes per day: 0

[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)

[!!] Temporary tables created on disk: 45% (406 on disk / 895 total)

[OK] Thread cache hit rate: 98% (8 created / 439 connections)

[OK] Table cache hit rate: 81% (65 open / 80 opened)

[OK] Open file limit used: 5% (127/2K)

[OK] Table locks acquired immediately: 99% (3K immediate / 3K locks)

[OK] InnoDB data size / buffer pool: 144.0K/9.0M

-------- Recommendations -----------------------------------------------------

General recommendations:

Run OPTIMIZE TABLE to defragment tables for better performance

MySQL started within last 24 hours - recommendations may be inaccurate

When making adjustments, make tmp_table_size/max_heap_table_size equal

Reduce your SELECT DISTINCT queries without LIMIT clauses

Variables to adjust:

tmp_table_size (> 20M)

max_heap_table_size (> 20M)

Link para o comentário
Compartilhar em outros sites

acesse o ssh e rode esse comando:

# pico /etc/my.cnf

e atualize essas linhas:

tmp_table_size=28M

max_heap_table_size=28M

apos isso rode os comandos ctrl+x e depois y. Apos isso reinicie o Mysql.

======

Gostaria de saber se o processamento do Mysql reduziu ?

Link para o comentário
Compartilhar em outros sites

ol agalera executei a otimização e esta dando a seguinte mensagem

General recommendations:

Run OPTIMIZE TABLE to defragment tables for better performance

Increase table_cache gradually to avoid file descriptor limits

Variables to adjust:

*** MySQL's maximum memory usage is dangerously high ***

*** Add RAM before increasing MySQL buffer variables ***

query_cache_size (> 9M)

table_cache (> 200)

alguém poderia me ajudar o que seria esse aviso de memoria ram?

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?