OVH Community, votre nouvel espace communautaire.

Problème MySQL


TBC_Ly0n
04/11/2014, 19h14
Qu'est-ce que tu ne comprends pas là-dedans :

Code:
INNODB STATUS
Current InnoDB index space = 13.99 G
Current InnoDB data space = 15.10 G
Current InnoDB buffer pool free = 81 %
Current innodb_buffer_pool_size = 17.00 G
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 : 17.09 G
Configured Max Per-thread Buffers : 403 M
Configured Max Global Buffers : 17.04 G
Configured Max Memory Limit : 17.44 G
Physical Memory : 14.72 G
L'innodb_buffer_pool_size correspond à de l'utilisation en RAM !

Je t'invite à vérifier que toutes tes tables InnoDB ont le ROW_FORMAT='Compressed'
Innodb_file_per_table, évidemment...

Cherche mon pseudo sur le forum avec le mot innodb, tu devrais trouver pas mal d'astuces

Rizz
04/11/2014, 16h51
Bonjour,

Lorsque je modifie innodb_buffer_pool_size à une valeur supérieur à 20G comme le demande MySQL Tuner, Mon serveur MySQL ne redémarre pas.. Une idée?
Essaie avec un serveur qui a plus de 20go de RAM... Et oui mysql tuner est débile il propose des valeurs sans savoir si c'est possible sur ta machine. Bizarrement tu n'a pas vu, ou tu n'est pas courant, que tu as 16go.
Je te conseille de ne même pas toucher à ta base ni à ta config si l'informatique t'es si familière...

NuxOL
04/11/2014, 08h54
Au niveau des logs j'ai ceci:

Nov 4 02:32:02 debian mysqld_safe: Starting mysqld daemon with databases from /home/mysql
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [Note] Plugin 'FEDERATED' is disabled.
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: The InnoDB memory heap is disabled
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Mutexes and rw_locks use GCC atomic builtins
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Compressed tables use zlib 1.2.7
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Using Linux native AIO
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Initializing buffer pool, size = 17.0G
Nov 4 02:32:02 debian mysqld: InnoDB: mmap(18681430016 bytes) failed; errno 12
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Completed initialization of buffer pool
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 InnoDB: Fatal error: cannot allocate memory for the buffer pool
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [ERROR] Plugin 'InnoDB' init function returned error.
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [ERROR] Unknown/unsupported storage engine: InnoDB
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [ERROR] Aborting
Nov 4 02:32:02 debian mysqld:
Nov 4 02:32:02 debian mysqld: 141104 2:32:02 [Note] /usr/sbin/mysqld: Shutdown complete
Nov 4 02:32:02 debian mysqld:
Nov 4 02:32:02 debian mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Au niveau de tuning-primer;

-- MYSQL PERFORMANCE TUNING PRIMER --
- By: Matthew Montgomery -

MySQL Version 5.5.40-0+wheezy1 x86_64

Uptime = 0 days 8 hrs 19 min 41 sec
Avg. qps = 14
Total Questions = 433574
Threads Connected = 16

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:
http://dev.mysql.com/doc/refman/5.5/...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.
Current long_query_time = 10.000000 sec.
You have 0 out of 433595 that take longer than 10.000000 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
See http://dev.mysql.com/doc/refman/5.5/...-recovery.html

WORKER THREADS
Current thread_cache_size = 8
Current threads_cached = 1
Current threads_per_sec = 0
Historic threads_per_sec = 0
Your thread_cache_size is fine

MAX CONNECTIONS
Current max_connections = 150
Current threads_connected = 16
Historic max_used_connections = 17
The number of used connections is 11% of the configured maximum.
Your max_connections variable seems to be fine.

INNODB STATUS
Current InnoDB index space = 13.99 G
Current InnoDB data space = 15.10 G
Current InnoDB buffer pool free = 81 %
Current innodb_buffer_pool_size = 17.00 G
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 : 17.09 G
Configured Max Per-thread Buffers : 403 M
Configured Max Global Buffers : 17.04 G
Configured Max Memory Limit : 17.44 G
Physical Memory : 14.72 G

Max memory limit exceeds 90% of physical memory

KEY BUFFER
Current MyISAM index space = 291 K
Current key_buffer_size = 16 M
Key cache miss rate is 1 : 12835
Key buffer free ratio = 81 %
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 = 16 M
Current query_cache_used = 4 M
Current query_cache_limit = 1 M
Current Query cache Memory fill ratio = 25.22 %
Current query_cache_min_res_unit = 4 K
Query Cache is 29 % fragmented
Run "FLUSH QUERY CACHE" periodically to defragment the query cache memory
If you have many small queries lower 'query_cache_min_res_unit' to reduce fragmentation.
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 = 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 = 3760 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 = 1800 tables
Current table_definition_cache = 400 tables
You have a total of 208 tables
You have 217 open tables.
The table_cache value seems to be fine

TEMP TABLES
Current max_heap_table_size = 350 M
Current tmp_table_size = 350 M
Of 2948 temp tables, 46% 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 = 30 : 1
read_buffer_size seems to be fine

TABLE LOCKING
Current Lock Wait ratio = 0 : 433868
Your table locking seems to be fine
Et voici mon mysqltuner:

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.5.40-0+wheezy1
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 523K (Tables: 27)
[--] Data in InnoDB tables: 15G (Tables: 140)
[--] Data in PERFORMANCE_SCHEMA tables: 0B (Tables: 17)
[!!] Total fragmented tables: 142

-------- Security Recommendations -------------------------------------------
[OK] All database users have passwords assigned

-------- Performance Metrics -------------------------------------------------
[--] Up for: 8h 21m 52s (436K q [14.500 qps], 11K conn, TX: 1B, RX: 25M)
[--] Reads / Writes: 75% / 25%
[--] Total buffers: 17.4G global + 2.7M per thread (150 max threads)
[!!] Maximum possible memory usage: 17.8G (120% of installed RAM)
[OK] Slow queries: 0% (0/436K)
[OK] Highest usage of available connections: 11% (17/150)
[OK] Key buffer size / total MyISAM indexes: 16.0M/282.0K
[OK] Key buffer hit rate: 100.0% (322K cached / 25 reads)
[OK] Query cache efficiency: 25.1% (59K cached / 236K selects)
[!!] Query cache prunes per day: 92325
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 1K sorts)
[!!] Temporary tables created on disk: 46% (2K on disk / 5K total)
[OK] Thread cache hit rate: 99% (17 created / 11K connections)
[OK] Table cache hit rate: 20% (217 open / 1K opened)
[OK] Open file limit used: 2% (103/3K)
[OK] Table locks acquired immediately: 100% (280K immediate / 280K locks)
[OK] InnoDB data size / buffer pool: 15.1G/17.0G

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
MySQL started within last 24 hours - recommendations may be inaccurate
Reduce your overall MySQL memory footprint for system stability
Enable the slow query log to troubleshoot bad queries
Temporary table size is already large - reduce result set size
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (> 16M)
Je peux également voir que la mémoire est trop élevé j'ai déjà essayer de résoudre, sans succès

TBC_Ly0n
03/11/2014, 18h37
Généralement, sur Debian, c'est dans /var/log/daemon.log que sont loggés les messages au démarrage.
Sinon, le tuning-primer ?

NuxOL
03/11/2014, 18h27
J'ai l'impression que les logs ne sont pas enregistré.
Niveau OS: Linux - Debian 7.5
Version MySQL: mysql Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readl2

TBC_Ly0n
03/11/2014, 17h58
Que disent les logs ?
Quel OS ?
Quelle version de MySQL ?

- - - Mise à jour - - -

Et le tuning-primer, aussi, ça peut aider

captainadmin
03/11/2014, 16h39
Bonjour,

Il faut voir quelles sont les ressources de ton serveur ?

Bonne soirée
http://www.captainadmin.com

Nowwhat
03/11/2014, 14h21
Bonjour:

Google innodb_buffer_pool_size
La première suggestion, How large should be mysql innodb_buffer_pool_size? me semble bien traitre le sujet.

NuxOL
03/11/2014, 14h13
Bonjour,

Lorsque je modifie innodb_buffer_pool_size à une valeur supérieur à 20G comme le demande MySQL Tuner, Mon serveur MySQL ne redémarre pas.. Une idée?

Merci d'avance