mysql is using all memory
Posted by: Himanshu Joshi
Date: October 03, 2012 04:20AM

Hi,
The MYSQL is currently utilizing the whole of my RAM. How can I resolve it?
I am using the following version
+-------------------------+---------------------+
| Variable_name | Value |
+-------------------------+---------------------+
| protocol_version | 10 |
| version | 5.1.52-log |
| version_comment | Source distribution |
| version_compile_machine | x86_64 |
| version_compile_os | redhat-linux-gnu |
+-------------------------+---------------------+


The output of free command is as follows:


total used free shared buffers cached
Mem: 16331920 16117708 214212 0 125364 1519468
-/+ buffers/cache: 14472876 1859044
Swap: 32767992 85164 32682828


Also the output of the mysqltuner is as follows:


-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.52-log
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 1G (Tables: 8)
[--] Data in InnoDB tables: 52G (Tables: 23)
[!!] Total fragmented tables: 23

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

-------- Performance Metrics -------------------------------------------------
[--] Up for: 5d 22h 16m 41s (28M q [56.477 qps], 545 conn, TX: 47B, RX: 50B)
[--] Reads / Writes: 33% / 67%
[--] Total buffers: 12.5G global + 168.4M per thread (250 max threads)
[!!] Maximum possible memory usage: 53.6G (344% of installed RAM)
[OK] Slow queries: 0% (2K/28M)
[OK] Highest usage of available connections: 42% (107/250)
[OK] Key buffer size / total MyISAM indexes: 256.0M/551.5M
[OK] Key buffer hit rate: 100.0% (67M cached / 333 reads)
[!!] Query cache efficiency: 0.0% (4 cached / 5M selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 4 sorts)
[OK] Temporary tables created on disk: 0% (2K on disk / 413K total)
[OK] Thread cache hit rate: 68% (170 created / 545 connections)
[OK] Table cache hit rate: 62% (195 open / 312 opened)
[OK] Open file limit used: 10% (134/1K)
[OK] Table locks acquired immediately: 100% (16M immediate / 16M locks)
[!!] Connections aborted: 10%
[!!] InnoDB data size / buffer pool: 52.4G/12.0G

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce your overall MySQL memory footprint for system stability
Enable the slow query log to troubleshoot bad queries
Your applications are not closing MySQL connections properly
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_limit (> 8M, or use smaller result sets)
innodb_buffer_pool_size (>= 52G)


Kindly suggest any solution for this problem.

Thanks & Regards
Himanshu Joshi

Options: ReplyQuote


Subject
Written By
Posted
mysql is using all memory
October 03, 2012 04:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.