跳到主要內容

發表文章

精選

為什麼 free 很小,Linux 卻還能開程式?看懂 MemFree 與 MemAvailable / Why a Tiny free Column Does Not Mean Linux Cannot Start Programs

現象:free 很小,不代表開不了程式 / A tiny free column is not “cannot start” 假設你在 Linux 終端機打出 free,free 欄只剩幾十 MB,used 卻佔了一大半。很容易先想到「記憶體爆了,得重開或加 RAM」。先停一下:這個畫面常常不是實體記憶體已經沒了,而是把「完全沒被用到的頁」,當成「還能開新程式的空間」。 Suppose you run free in a Linux terminal and the free column is down to a few dozen megabytes, while used takes most of the row. It is easy to jump to “memory is exhausted; reboot or add RAM.” Pause first: that picture often does not mean physical memory is gone. It means idle pages have been mistaken for the space still available to start a new program. /proc/meminfo 的 MemFree,依 Linux 7.4-rc1 的 proc 文件,是目前的 free RAM;在 highmem 系統上,它是 LowFree 與 HighFree 的和。它變小,只表示幾乎沒有完全閒置的頁。核心會把讀過的檔案留在記憶體裡,這份快取叫 page cache,也就是頁快取。那些頁還佔著 RAM,所以 MemFree 下降,但它們不是某個程式私有、放不掉的佔用。[1] In Linux 7.4-rc1’s proc documentation, MemFree in /proc/meminfo is the current free RAM; on highmem systems it is the sum of LowFree and HighFree. A small value only means there are almost no completely idle pages. The kernel keeps files it has re...

最新文章

改了 DNS 記錄,為什麼還有人看到舊網站?看懂 TTL 與快取 / Why Your DNS Change Is Not Live Yet: TTL and Caching

Linux 刪了日誌,磁碟為什麼還是滿的?看懂開啟中的檔案 / Why Deleting a Linux Log May Not Free Disk Space

腳本裡 cd 成功,終端機卻沒移動?看懂 Bash 的工作目錄 / Why cd in a Script Does Not Move Your Terminal

Docker 容器為什麼不像一台完整電腦?從共用核心看懂隔離 / Why a Docker Container Is Not a Whole Computer

【實戰指南】NVIDIA GB10 (DGX Spark) 本地 AI Agent:vLLM + Qwen3.8-27B-NVFP4 + Hermes Agent 部署調優 (ZH/EN Guide)

從聊天機器人到工作夥伴:下一世代 AI Agent 的沙盒化與品質保證

別讓 AI Agent 把你的 Repo 搞崩:從『風險評估』導向的開發新範式 | Stop Letting AI Agents Wreck Your Repo: The Evaluation-First Development Paradigm

別再被 API Key 搞到肝指數爆表:用 ai-relay 打造你的 Serverless AI 流量調度中心 | Stop API Key Burnout: Building Your Serverless AI Traffic Hub with ai-relay