经过几个小时的工作,我的共享内存和 buff/cache 内存已经用尽,我不知道为什么
murilo@murilo-Inspiron-7586:~$ free -h
total used free shared buff/cache available
Mem: 15G 2.8G 5.7G 5.9G 6.9G 6.4G
Swap: 0B 0B 0B
我尝试运行以下命令这这没有帮助:
sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches
sync; echo 3 > /proc/sys/vm/drop_caches
更多信息请见ipcs --human
:
murilo@murilo-Inspiron-7586:~$ ipcs --human
------ Message Queues --------
key msqid owner perms size messages
------ Shared Memory Segments --------
key shmid owner perms size nattch status
0x00000000 37683200 murilo 600 512K 2 dest
0x00000000 393218 murilo 600 512K 2 dest
0x00000000 425987 murilo 600 512K 2 dest
0x00000000 37027844 murilo 600 512K 2 dest
0x00000000 753670 murilo 600 512K 2 dest
0x00000000 37486599 murilo 600 512K 2 dest
0x00000000 29163536 murilo 600 512K 2 dest
------ Semaphore Arrays --------
key semid owner perms nsems
使用top
top - 17:48:36 up 8:31, 1 user, load average: 0.30, 0.63, 0.91
Tasks: 331 total, 1 running, 262 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.8 us, 0.9 sy, 0.0 ni, 96.0 id, 0.1 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem : 16106352 total, 6249628 free, 3129784 used, 6726940 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 6462552 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7798 murilo 20 0 5066228 4.434g 4.408g S 3.9 28.9 22:03.44 Xorg
7995 murilo 20 0 4047572 311012 47352 S 10.2 1.9 22:30.53 gnome-shell
8186 murilo 20 0 1439744 301692 9908 S 0.0 1.9 0:35.47 gsd-color
8170 murilo 20 0 790348 297284 7760 S 0.0 1.8 0:07.50 gsd-wacom
8136 murilo 20 0 1149152 297160 7220 S 0.0 1.8 0:08.60 gsd-power
19276 murilo 20 0 1235076 257776 145700 S 0.7 1.6 1:04.74 chrome
1230 mysql 20 0 1679796 207752 0 S 0.0 1.3 0:33.85 mysqld
8496 murilo 20 0 1215920 148452 10560 S 0.0 0.9 0:08.02 gnome-software
21307 murilo 20 0 852072 147412 79140 S 3.3 0.9 0:09.69 chrome
19637 murilo 20 0 823724 142936 80548 S 0.0 0.9 0:18.32 chrome
21098 murilo 20 0 808924 136076 80172 S 0.0 0.8 0:35.22 chrome
21290 murilo 20 0 782812 126160 77212 S 0.0 0.8 0:05.29 chrome
20446 murilo 20 0 779960 121392 79456 S 0.0 0.8 0:04.87 chrome
我关闭了几乎所有进程,但我的计算机仍然使用了一半的内存。太疯狂了。