|
之前就有朋友在这论坛上问(好像还是位港澳台的朋友),cc-a80怎么只有1.6G内存
现在我也同问,还有约0.4G内存哪去了??
最近玩minecraft
刚开始,用pi2做服务器,一直玩得好好的,但怕服务器配置不够,启用了闲置了好久的cc-a80——有线连接
按介绍,cc-a80有2G内存,但数据表明,只有1.6
minecraft_server的参数为:-Xmx1024M -Xms512M。最大1G内存
在用cc-a80做服务器的过程中,多次出现内存溢出。
今晚这次最严重,游戏掉线后,无法ssh连接服务器。等了几分钟才恢复。
再通过ssh连接上去,检查系统,发现一个irqbalance的进程占用了大量资源——特别是内存资源
下面的top数据,是关闭minecraft_server后复制,其cpu使用率29%,内存使用率60%
Google了一下,irqbalance为一个优化服务。但这也优化得太好了吧?系统都宕掉了。
固件:linaro-server 2.0 emmc版
top输出:
Tasks: 119 total, 1 running, 118 sleeping, 0 stopped, 0 zombie
%Cpu(s): 3.7 us, 0.2 sy, 0.0 ni, 96.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 1665896 total, 1158432 used, 507464 free, 4728 buffers
KiB Swap: 0 total, 0 used, 0 free. 77800 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2269 root 20 0 1011860 984.5m 252 S 29.0 60.5 214:18.33 irqbalance
/proc/meminfo信息:
MemTotal: 1665896 kB
MemFree: 506884 kB
Buffers: 4784 kB
Cached: 77800 kB
SwapCached: 0 kB
Active: 1060040 kB
Inactive: 58584 kB
Active(anon): 1036152 kB
Inactive(anon): 252 kB
Active(file): 23888 kB
Inactive(file): 58332 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 925692 kB
HighFree: 451596 kB
LowTotal: 740204 kB
LowFree: 55288 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 1035932 kB
Mapped: 5180 kB
Shmem: 364 kB
Slab: 16180 kB
SReclaimable: 4980 kB
SUnreclaim: 11200 kB
KernelStack: 1024 kB
PageTables: 2568 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 832948 kB
Committed_AS: 988732 kB
VmallocTotal: 245760 kB
VmallocUsed: 29712 kB
VmallocChunk: 113504 kB
minecraft_server的日志:
[20:39:43] [Netty Server IO #2/ERROR]: java.lang.OutOfMemoryError
[20:39:43] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 14438ms behind, skipping 288 tick(s)
[20:39:43] [Server thread/INFO]: wencan lost connection: TranslatableComponent{key='disconnect.genericReason', args=[Internal Exception: java.io.IOException: Connection reset by peer], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
[20:39:43] [Server thread/INFO]: wencan left the game
Java HotSpot(TM) Client VM warning: INFO: os::commit_memory(0x6efb0000, 12288, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /opt/minecraft_server/hs_err_pid9722.log
[20:44:05] [Server thread/INFO]: Starting minecraft server version 1.8.5
|
|