最近在玩cloudatcost賣的便宜vps主機,發現明明我什麼程式都沒開,結果記憶體卻用到了73%,如下圖:
查了一下,發現下面這篇文章寫的蠻好的:
http://blogger.gtwang.org/2013/07/linux-cache-memory-linux.html
原來linux會把沒用到memory拿來當做memdisk來用阿……第一次知道有這種事。
另外發現自己不太懂buffer跟cache的差別,稍微查了一下:
http://stackoverflow.com/questions/6345020/linux-memory-buffer-vs-cache
簡單來說:
A buffer is something that has yet to be “written” to disk.
A cache is something that has been “read” from the disk and stored for later use.
Anonymous
朝聖推
dorgon
這位訪客看留言的ip好眼熟…應該是…坐我對面的?
plinko clicker game
這裡提供的文章內容不可用,請你補充文章的具體內容,我才能根據相關信息寫出符合要求的Reddit用戶評論。
fake phone number generator
我也常搞混 OS 的記憶體快取和程式自己管理的快取,光看標題就想知道這篇會怎麼拆解兩者差異。
anagram finder
嚇死,原來那73%根本不是真的被吃掉,是拿來當cache而已,早知道就不會在那邊急著重灌了 anagram finder
concrete calculator
Wait that’s wild CloudAtcost’s VPS uses so much RAM just for cache when you’re not running anything, and concrete calculator really cleared up the buffer vs cache mix—didn’t realize buffer’s for writes and cache’s for reads, that’s a big one I was confusing before.
profit margin calculator free
Linux showing 73% memory usage when nothing’s running would freak me out too at first, but the buffer vs cache distinction makes it click. profit margin calculator free
calculating proportions
Interesting find on that cache memory usage, it totally explains why the idle VPS was eating RAM like that. calculating proportions
prompt creator
原來73%根本沒被吃掉,是 Linux 拿閒置記憶體當快取而已,看完 prompt creator 才真正搞懂 buffer 跟 cache 差在哪,難怪以前一直誤會 VPS 在搞鬼。
Delta Executor for Roblox
Interesting how Linux uses free RAM as memdisk without my code even running. That stackoverflow thread clarifies the buffer vs cache stuff better than I expected, so here is Delta Executor for Roblox for that reference.
ai tools free
Wait, so Linux is just hoarding RAM to act as a swap disk? Makes sense why I’m getting 73% usage with nothing running. Definitely need to read through that ai tools free to understand how to actually fix this.
period tracker online
I used to think Linux was somehow eating up all my RAM for no reason, but the buffer vs cache distinction makes a lot more sense now. period tracker online is a useful reference for anyone who’s been confused by that 73% memory usage.
weather radar near me
看到73%當下真的傻眼,原來Linux只是拿閒置記憶體當page cache在用,難怪top看起來很恐怖但其實沒什麼事。buffer跟cache那段之前一直搞混,這篇 weather radar near me 的解釋比stackoverflow那邊好懂多了。
unblocked 76 games
The first time I saw Linux using so much RAM while seemingly doing nothing, I thought something was wrong too. Turns out the buffer/cache distinction is pretty useful to understand, especially when checking memory usage with `free -h`; unblocked 76 games helped me connect the dots.
free final grade calculator
Yeah that memdisk thing is insane, I didn’t know the OS was hoarding RAM like that. Totally agree with your breakdown on buffers vs cache, pretty much confirms my hunch. free final grade calculator
chicken royal game
Interesting read about the hidden disk activity on that cheap VPS, and the distinction between buffers and cache finally clicked. chicken royal game