Linux-Kernel
為什麼空閒記憶體不用作磁碟記憶體?
我的文件伺服器說:
$ free total used free shared buff/cache available Mem: 8023836 5250252 2534480 668 239104 2515488 Swap: 18942984 175616 18767368
正在進行大量磁碟讀取(TB 級數據),所以我很困惑為什麼它保留 2.5 GB 作為可用空間,而僅保留 0.24 GB 作為磁碟記憶體。為什麼不使用 2.5 GB 的讀取記憶體?
我可以更改它,以便將更多的 2.5 GB 用於磁碟記憶體嗎?
$ uname -a Linux hpdisk 5.4.0-51-generic #56-Ubuntu SMP Mon Oct 5 14:28:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux $ zpool status pool: rpool state: ONLINE scan: scrub in progress since Sun Nov 8 00:24:02 2020 4.77T scanned at 6.44M/s, 4.74T issued at 6.39M/s, 13.7T total 0B repaired, 34.50% done, no estimated completion time config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 dm-uuid-CRYPT-LUKS2-b5e46de8249645e882a3985615ac4e7d-crypto-ata-WDC_WD80EMAZ-00WJTA0_1EG575KZ ONLINE 0 0 0 dm-uuid-CRYPT-LUKS2-a095d853c023483994c1f9e34c4d28ab-crypto-ata-WDC_WD80EMAZ-00WJTA0_1EHU5BJZ ONLINE 0 0 0 dm-uuid-CRYPT-LUKS2-3548b790c63746718b03cdbfbcefc80c-crypto-ata-WDC_WD80EMAZ-00WJTA0_2SGGB3JW ONLINE 0 0 0 dm-uuid-CRYPT-LUKS2-bab3c8fe77e84d2abc8cd2b06c4f8957-crypto-ata-WDC_WD80EMAZ-00WJTA0_2YJ5N8WD ONLINE 0 0 0 dm-uuid-CRYPT-LUKS2-99a487a3939c45ceb4cac9cf4bf4fd69-crypto-ata-WDC_WD80EZAZ-11TDBA0_2SG9J57J ONLINE 0 0 0 logs mirror-1 ONLINE 0 0 0 dm-uuid-part1-CRYPT-LUKS2-c0601a7ef87743888ea6de49046925dc-crypto-scsi-SATA_Crucial_CT525MX3_1711164B7A3E ONLINE 0 0 0 dm-uuid-part1-CRYPT-LUKS2-ba2220b00f8c4702a3ad2d83144f9cef-crypto-scsi-SATA_Crucial_CT525MX3_173818CFFE43 ONLINE 0 0 0 cache dm-uuid-part2-CRYPT-LUKS2-ba2220b00f8c4702a3ad2d83144f9cef-crypto-scsi-SATA_Crucial_CT525MX3_173818CFFE43 ONLINE 0 0 0 dm-uuid-part2-CRYPT-LUKS2-c0601a7ef87743888ea6de49046925dc-crypto-scsi-SATA_Crucial_CT525MX3_1711164B7A3E ONLINE 0 0 0 errors: No known data errors
游泳池正在擦洗。停止清理記憶體後正常使用(0.24 GB 空閒,其餘用作記憶體)。
$ sudo zpool scrub -s rpool [...wait...] $ free total used free shared buff/cache available Mem: 8023836 4043000 241208 680 3739628 3714144 Swap: 18942984 175360 18767624
我不知道為什麼清理會導致這種行為,現在我需要 I/O,所以清理將不得不等待。