??????????????mysql????????????????mysql????OOM????OOM????????????
???????????OOM?????????????????????????????????????????????棬?????????kill??????????????????????mysql?????????????????OOM???
?????????????????????????治???????????????????64G
????# free -m
????total       used       free     shared    buffers     cached
????Mem:         64375      57821       6553          0        554      16369
????-/+ buffers/cache:      40897      23478
????Swap:        16383          5      16378
??????oom???????????????innodb_buffer_pool_size??С??????????
????141205 18:47:57 [Note] Plugin 'FEDERATED' is disabled.
????141205 18:47:57 InnoDB: The InnoDB memory heap is disabled
????141205 18:47:57 InnoDB: Mutexes and rw_locks use GCC atomic builtins
????141205 18:47:57 InnoDB: Compressed tables use zlib 1.2.3
????141205 18:47:57 InnoDB: Using Linux native AIO
????141205 18:47:57 InnoDB: Initializing buffer pool?? size = 58.0G
????141205 18:48:04 InnoDB: Completed initialization of buffer pool
????141205 18:48:04 InnoDB: highest supported file format is Barracuda.
??????????mysql?????????У??????????14??mysql????????innodb_buffer_pool_size???ó???58G??????OOM??innodb_buffer_pool_size????58G
??????????????64G?????????innodb_buffer_pool_size????????????е??
??????????????vm.swappiness??????
???????????????vm.swappiness?????0????RHEL/CentOS 6.4??????2.6.32-358????汾???swappiness??????????????
?????μ??????????vm.swappiness????1
????# uname -r
????2.6.32-431.el6.x86_64
?????????????????μ????
?????????????????????????innodb_buffer_pool_size??vm.swappiness?????????????????????OOM?е?????????????????OOM????????
???????????show engine innodb status???????mysql??????????
.....
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 63979913216; in additional pool allocated 0
Internal hash tables (constant factor + variable factor)
Adaptive hash index 7893457408      (7887918656 + 5538752)
Page hash           61625224 (buffer pool 0 only)
Dictionary cache    247241428       (246498992 + 742436)
File system         111712  (82672 + 29040)
Lock system         154077792       (154061624 + 16168)
Recovery system     0       (0 + 0)
Dictionary memory allocated 742436
Buffer pool size        3801087
Buffer pool size?? bytes 62277009408  --Buffer Pool??С
Free buffers            3686413  --Buffer Pool???ж????????
Database pages          112368   --Buffer Pool???????????
Old database pages      22365
........
??????????????Buffer pool?д????????Free??????mysql????δ??????58G????檔
???????sar -B???????????????SWAP???????????????????????????????С????????
10:00:01 AM  pgpgin/s pgpgout/s   fault/s  majflt/s  pgfree/s pgscank/s pgscand/s pgsteal/s    %vmeff
10:10:01 AM  24472.34  13779.62  10542.81      0.88   8986.53   1547.25     42.00   1556.45     97.94
10:20:01 AM     24.55  11989.73  10669.42      0.14   4369.46    138.54      0.11    138.64    100.00
10:30:01 AM      1.29   8991.32   9832.53      0.01   3596.49     20.53      0.55     21.08    100.00
10:40:01 AM  24522.56  17124.60  11295.04      0.75   9649.33   1710.20     51.21   1666.83     94.63
10:50:01 AM      4.68   8691.01  10355.18      0.08   3934.04     21.22      0.11     21.33    100.00
11:00:01 AM      3.71  10738.47  10384.87      0.09   4017.96     94.24      0.28     94.47     99.96
11:10:02 AM  24924.74  14603.99  11129.07      0.86   9504.08   1751.06     40.43   1642.30     91.67
11:20:01 AM     11.95   8548.50  10206.84      0.11   3819.67     48.74      0.11     48.85    100.00
Average:      8944.00  11658.11  10479.06      0.40   5958.60    687.73     18.04    668.62     94.74
????????С???SWAP??潻??????????????
????[root@tlbb3d_yd_mxy_120-132-43-203_sx ~]# crontab -l
????00 05 * * * /bin/bash /home/databak/scripts/xtrabackup.sh FULL_BACKUP
????*/30 * * * * /bin/bash /home/databak/scripts/xtrabackup.sh INCRE_BACKUP
????00 03 * * * /bin/bash /home/databak/dbbbak.sh xxx
???????crontab ??????????????????С????xtrabackup??mysql???????????
?????????????????????????賿5?????????е?????ζ?????????????????????????????
?????????????????????????ζ??????????????????????????????????????????
????# du -sh *
????2.4G    201602261030
????2.5G    201602261100
??????????????????????????????????????????????mysql??OOM
????1.??innodb_buffer_pool_size?????48G
????2.??vm.swappiness?????1
????3.???????????????????????????????????????????????????????????