简体   繁体   English

Debian“无法分配内存”

[英]Debian “unable to allocate memory”

I have Debian jessie installed. 我安装了Debian jessie。

kernel version: 内核版本:

Linux srv1 3.16-3-amd64 #1 SMP Debian 3.16.5-1 (2014-10-10) x86_64 GNU/Linux Linux srv1 3.16-3-amd64#1 SMP Debian 3.16.5-1(2014-10-10)x86_64 GNU / Linux

It has 32Gb memory installed. 它已安装32Gb内存。 It seems more then enough for my task. 这似乎足以满足我的任务。 Heavy utilized asterisk process leak a lot of memory and produce a lot of troubles. 大量使用的星号进程会泄漏大量内存并产生许多麻烦。

Asterisk itself and bash from time to time reports "unable to allocate memory". 星号本身和bash有时会报告“无法分配内存”。

At the same time based on attached top report server has 7 Gb unused memory. 同时基于附加的顶级报表服务器具有7 Gb的未使用内存。

It will be great if someone will help to figure out what is wrong: - what kind of resources were exhausted - what need to be tuned for 100% server resources utilization. 如果有人可以帮助您找出问题所在,那将是非常不错的:-耗尽了哪种资源-需要为100%的服务器资源利用率进行调整。

Top: 最佳:

Tasks: 130 total, 1 running, 129 sleeping, 0 stopped, 0 zombie 任务:总共130个,跑步1个,睡眠129个,停止0个,丧尸0个
%Cpu0 : 6,0 us, 1,3 sy, 0,0 ni, 21,5 id, 70,8 wa, 0,0 hi, 0,3 si, 0,0 st %Cpu0:6,0 us,1,3 sy,0,0 ni,21,5 id,70,8 wa,0,0 hi,0,3 si,0,0 st
%Cpu1 : 70,2 us, 0,3 sy, 0,0 ni, 24,8 id, 4,6 wa, 0,0 hi, 0,0 si, 0,0 st %Cpu1:70,2 us,0,3 sy,0,0 ni,24,8 id,4,6 wa,0,0 hi,0,0 si,0,0 st
%Cpu2 : 3,0 us, 0,7 sy, 0,0 ni, 84,6 id, 11,7 wa, 0,0 hi, 0,0 si, 0,0 st %Cpu2:3,0 us,0,7 sy,0,0 ni,84,6 id,11,7 wa,0,0 hi,0,0 si,0,0 st
%Cpu3 : 6,9 us, 0,7 sy, 0,0 ni, 78,2 id, 14,2 wa, 0,0 hi, 0,0 si, 0,0 st %Cpu3:6,9 us,0,7 sy,0,0 ni,78,2 id,14,2 wa,0,0 hi,0,0 si,0,0 st
%Cpu4 : 3,3 us, 0,7 sy, 0,0 ni, 84,3 id, 11,7 wa, 0,0 hi, 0,0 si, 0,0 st %Cpu4:3,3 us,0,7 sy,0,0 ni,84,3 id,11,7 wa,0,0 hi,0,0 si,0,0 st
%Cpu5 : 4,0 us, 0,7 sy, 0,0 ni, 90,1 id, 5,3 wa, 0,0 hi, 0,0 si, 0,0 st %Cpu5:4,0 us,0,7 sy,0,0 ni,90,1 id,5,3 wa,0,0 hi,0,0 si,0,0 st

KiB Mem: 32985292 total, 25834636 used, 7150656 free, 38312 buffers KiB内存:总数32985292,已使用25834636,免费7150656,缓冲区38312
KiB Swap: 58592252 total, 1767420 used, 56824832 free. KiB交换:总计58592252,已使用1767420,免费56824832。 37988 cached Mem 37988快取记忆体

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND PID用户PR NI VIRT RES SHR S%CPU%MEM TIME +命令

7615 asterisk 20 0 3147628 2,813g 1820 S 69,8 8,9 5:35.84 php 7615星号20 0 3147628 2,813g 1820 S 69,8 8,9 5:35.84 php
2389 asterisk 20 0 20,150g 1,207g 2176 S 28,5 3,8 247:42.19 asterisk 2389星号20 0 20,150g 1,207g 2176 S 28,5 3,8 247:42.19 星号
976 mysql 20 0 1411844 19392 2624 S 1,3 0,1 15:13.28 mysqld 976 mysql 20 0 1411844 19392 2624 S 1,3 0,1 15:13.28 mysqld
21651 root 20 0 24876 2824 2316 R 0,7 0,0 0:02.08 top 21651根20 0 24876 2824 2316 R 0,7 0,0 0:02.08顶部
... ...

Your server is using the memory solely for application data. 您的服务器仅将内存用于应用程序数据。 In your top excerpt the buffers and cached are very low. 在您的摘录中,缓冲区和缓存非常低。 Since asterisk is probably not very disk intensive, that seems fine. 由于星号可能不是很占用磁盘,因此看起来不错。 But your swap is also being used. 但是您的交换也正在被使用。 This contradicts your assumption that 32GB memory seems enough. 这与您认为32GB内存似乎足够的假设相矛盾。

It would be a good idea to install the sysstat package to monitor your system on what is really going on. 最好安装sysstat软件包以监视系统的实际运行情况。 Top shows only the current memory and process information. Top仅显示当前的内存和进程信息。 sysstat with the included sar command records system information every few minutes to retrieve it later for analysis. 带有随附的sar命令的sysstat每隔几分钟记录一次系统信息,以供日后检索以进行分析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM