List:General Discussion« Previous MessageNext Message »
From:Clyde Lewis Date:October 16 2006 5:46pm
Subject:MySQL Swapping problem
View as plain text  
A little confused as to why MySql is swapping when there is more than 
enough real memory still available on the server. I'm having a 
serious problem with a production server running out of swap space 
and in turn causing mysql to crash with the following error message. 
According to the TOP report, there is more than 14G available to the server.

Error:
Version: '4.1.11-max-log'  socket: 
'/export/ctrl/mysqladmin/mysql.sock'  port: 3306  MySQL Community 
Edition - Experimental (GPL)
061013 12:39:47  InnoDB: Error: cannot allocate 73919464 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 595973856 bytes. Operating system errno: 11
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: We keep retrying the allocation for 60 seconds...
061013 12:39:50  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...

Top on server:
load averages:  0.11,  0.12,  0.13       11:37:55
140 processes: 138 sleeping, 1 stopped, 1 on cpu
CPU states: 99.1% idle,  0.2% user,  0.6% kernel,  0.0% iowait,  0.0% swap
Memory: 32G real, 14G free, 30G swap in use, 145M swap free

    PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
   2556 mysql     19  59    0  954M  735M sleep   23.5H  0.14% mysqld
  20373 mysql     31  59    0  954M  706M sleep   78:23  0.13% mysqld
  27559 mysql     47  59    0 1011M  990M sleep   26.6H  0.09% mysqld
   2049 mysql     18  59    0  943M  701M sleep   16.8H  0.07% mysqld
   2810 mysql     26  59    0  947M  754M sleep  766:37  0.05% mysqld
   2370 mysql     24  59    0  963M  825M sleep   31.7H  0.01% mysqld
  29472 mysql      1  59    0 3144K 2024K cpu/11   0:00  0.01% top
   2432 mysql     20  59    0  952M  732M sleep  800:57  0.01% mysqld
  22967 mysql     31  59    0  934M  139M sleep    5:02  0.01% mysqld
   2742 mysql     18  59    0  947M  722M sleep   17.6H  0.00% mysqld
   2494 mysql     20  59    0  945M  728M sleep  782:58  0.00% mysqld
   2880 mysql     26  59    0  972M  828M sleep  910:23  0.00% mysqld

Any help would be greatly appreciated.

Thanks in advance,
CL

Thread
MySQL Swapping problemClyde Lewis16 Oct