任何交换使用都会导致系统范围冻结,18.04

任何交换使用都会导致系统范围冻结,18.04

我的问题与任何交换的使用都会导致整个系统冻结,仅在 18.04 中。但没有人回答这个问题...
当我玩图形密集型游戏时,整个系统会在某个(可变的)短时间内冻结,甚至三指敬礼都不再起作用。
我编写了一个小 shell 脚本,它在循环中记录了内存使用情况...

logdump=/home/`whoami`/log/`date +"memory.%Y%m%d%H%M%s"`
date +"Memory log: %c" > $logdump
free -m >> $logdump
sleep 30
while ((1)); do
  date +"%T" >> $logdump
  free -m | tail -n 2 - >> $logdump
  sleep 30
done

输出是...

Memory log: ven. 02 nov. 2018 13:18:12 CET
              total        used        free      shared  buff/cache   available
Mem:           1993         831         160          10        1002         997
Swap:          3021           0        3021
13:18:42
Mem:           1993         847         137          10        1008         981
Swap:          3021           0        3021
13:19:12
Mem:           1993         845         140          10        1008         984
Swap:          3021           0        3021
...

在预期的崩溃之后......

...
13:49:44
Mem:           1993        1089          74          10         829         738
Swap:          3021           0        3021
13:50:14
Mem:           1993        1089          89          10         814         738
Swap:          3021           1        3020
13:50:44
Mem:           1993        1089          88          10         815         738
Swap:          3021           1        3020

巧合吗?我想不是。

$ uname -a
Linux harvey-System 4.15.0-38-generic #41-Ubuntu SMP Wed Oct 10 10:59:38 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ sudo lshw -class memory
  *-firmware
       description: BIOS
       vendor: Phoenix Technologies, LTD
       physical id: 0
       version: ASUS A8N-SLI Premium ACPI BIOS Revision 1009
       date: 10/21/2005
       size: 128KiB
       capacity: 448KiB
       capabilities: pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb ls120boot zipboot biosbootspecification
  *-cache:0
       description: L1 cache
       physical id: a
       slot: L1 Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back data
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: b
       slot: L2 Cache
       size: 512KiB
       capacity: 512KiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-memory:0
       description: System Memory
       physical id: 43
       slot: System board or motherboard
       size: 2GiB
     *-bank:0
          description: DIMMProject-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2012-02-05 00:26+0000Last-Translator: Andi Chandler <Unknown>Language-Team: English (United Kingdom) <[email protected]>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2018-07-12 13:19+0000X-Generator: Launchpad (build 18719) [empty]
          product: None
          vendor: None
          physical id: 0
          serial: None
          slot: A0
          width: 64 bits
     *-bank:1
          description: DIMMProject-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2012-02-05 00:26+0000Last-Translator: Andi Chandler <Unknown>Language-Team: English (United Kingdom) <[email protected]>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2018-07-12 13:19+0000X-Generator: Launchpad (build 18719) 400 MHz (2,5 ns)
          product: None
          vendor: None
          physical id: 1
          serial: None
          slot: A1
          size: 1GiB
          width: 64 bits
          clock: 400MHz (2.5ns)
     *-bank:2
          description: DIMMProject-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2012-02-05 00:26+0000Last-Translator: Andi Chandler <Unknown>Language-Team: English (United Kingdom) <[email protected]>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2018-07-12 13:19+0000X-Generator: Launchpad (build 18719) [empty]
          product: None
          vendor: None
          physical id: 2
          serial: None
          slot: A2
          width: 64 bits
     *-bank:3
          description: DIMMProject-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>PO-Revision-Date: 2012-02-05 00:26+0000Last-Translator: Andi Chandler <Unknown>Language-Team: English (United Kingdom) <[email protected]>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2018-07-12 13:19+0000X-Generator: Launchpad (build 18719) 400 MHz (2,5 ns)
          product: None
          vendor: None
          physical id: 3
          serial: None
          slot: A3
          size: 1GiB
          width: 64 bits
          clock: 400MHz (2.5ns)
  *-memory:1 UNCLAIMED
       description: Memory controller
       product: CK804 Memory Controller
       vendor: NVIDIA Corporation

       physical id: 4
       bus info: pci@0000:00:00.0
       version: a3
       width: 32 bits
       clock: 66MHz (15.2ns)
       capabilities: ht bus_master cap_list
       configuration: latency=0

$ lsmem
RANGE                                  SIZE  STATE REMOVABLE BLOCK
0x0000000000000000-0x0000000017ffffff  384M online        no   0-2
0x0000000018000000-0x000000001fffffff  128M online       yes     3
0x0000000020000000-0x0000000027ffffff  128M online        no     4
0x0000000028000000-0x000000002fffffff  128M online       yes     5
0x0000000030000000-0x000000003fffffff  256M online        no   6-7
0x0000000040000000-0x000000004fffffff  256M online       yes   8-9
0x0000000050000000-0x000000005fffffff  256M online        no 10-11
0x0000000060000000-0x000000006fffffff  256M online       yes 12-13
0x0000000070000000-0x000000007fffffff  256M online        no 14-15

Memory block size:       128M
Total online memory:       2G
Total offline memory:      0B

$ swapon --show
NAME      TYPE      SIZE USED PRIO
/dev/sda5 partition   3G  77M   -2

我不知道该怎么办,欢迎提出任何建议。

相关内容