Hi Manoj--
There does not have to be a query running in order for MySQL to be
holding a lot of memory. You've allocated 28GB to your buffer pool;
that memory is going to be sucked up by MySQL as soon as the server
starts, even if it's empty. Add in the rest of the memory that MySQL
uses for things besides the buffer pool, and it's not difficult to see
how you could be at 97.3% of your available memory even under no load.
The kernel OOM-killer typically looks for the process that has the
largest amount of memory in use - and in your case, that's MySQL, so
it's no surprise that it killed it when your system ran out of resources.
I don't know what else you have running on this server or what the rest
of your MySQL configuration settings are, but as a start, I would
suggest that you turn down your buffer pool allocation. Something in
the 24G-26G range would probably be a good starting point.
Hope that helps--
e.
On 06/20/2012 03:19 AM, Manoj Chauhan wrote:
> Hi All,
>
> We have Percona Mysql Server version: 5.5.16 with Master - Slave
> replication. Mysql on Master server got restarted automatically, we
> checked the Kernel and system logs and found that it was restarted
> because of Out of memory. After restart, tom command shows that 97.3%
> memory is holding my Mysql even there is no query running.
>
> Total Memory is 32G
> Memory assigned to innodb buffer pool = 28G
>
> As The Linux kernel has a functionality called Out Of Memory Killer (or
> OOM Killer) responsible for dealing with memory exhaustion. If system
> reaches a point where it may soon run out of all memory, OOM Killer
> *looks for a process it could kill* and ends its life.
>
> Please suggest??
>
> *top output*
> ###################
> top - 03:05:16 up 39 days, 16:56, 3 users, load average: 0.01, 0.05, 0.07
> Tasks: 277 total, 1 running, 276 sleeping, 0 stopped, 0 zombie
> Cpu(s): 0.1%us, 0.0%sy, 0.0%ni, 99.8%id, 0.0%wa, 0.0%hi, 0.0%si,
> 0.0%st
> Mem: 32949816k total, 32613172k used, 336644k free, 83848k buffers
> Swap: 524280k total, 267588k used, 256692k free, 295836k cached
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 21988 mysql 15 0 31.0g 30g 4540 S 1.7 97.3 362:58.01 mysqld
> 5318 root 15 0 12872 1260 832 R 0.7 0.0 0:00.02 top
> 23532 gsc 18 0 12872 1196 764 S 0.3 0.0 15:43.64 top
> 1 root 15 0 10348 84 52 S 0.0 0.0 4:32.92 init
>
> [root@avl-db10 logs]# free -m
> total used free shared buffers cached
> Mem: 32177 31850 326 0 84 289
> -/+ buffers/cache: 31476 700
> Swap: 511 261 250
>
>
> *Kernel Logs*
--
Ernie Souhrada, CMDBA, RHCE, CCNA
Senior Consultant, Percona, Inc. [
http://www.percona.com ]
email:
ernest....@percona.com
phone:
+1-888-401-3401 x543 [ US/Arizona : GMT-7 ]
skype: ravyn440