vtop icon indicating copy to clipboard operation
vtop copied to clipboard

Memory appears to be almost always at 100% (OS X 10.9)

Open mseymour opened this issue 11 years ago • 8 comments

At least under OS X 10.9.3, memory seems to be constantly at around 98–100%.

This is probably due to how Mavericks works with RAM, although I could be wrong.

screen shot 2014-06-09 at 1 48 19 pm

mseymour avatar Jun 09 '14 16:06 mseymour

Yeah this is a tricky one to tackle. Activity monitor reports memory used as 3.92GB there, so 3.92GB/4GB would be 98%.

I'm going to look at a few different options. Something more like Apple's memory pressure calculation would be useful.

MrRio avatar Jun 10 '14 11:06 MrRio

I would find it useful to change the memory usage color or saturation based upon the type. App memory could be the brightest, followed by wired memory, then file cache and compressed. OSX 10.8 had this feature with it's activity monitor, but they took it away with 10.9

danthegoodman avatar Jun 10 '14 14:06 danthegoodman

I'm experiencing this on Linux as well. I think it's accurate, though; it's just that a good chunk of memory is being used by filesystem buffers. A better metric might be to subtract the amount of memory used by these.

hoelzro avatar Jun 10 '14 16:06 hoelzro

Confirmed as issue on linux. If filesystem buffers are included it will always be near 100% because that cache is designed to consume all the remaining ram.

Reading the source code for htop I see they are just reading the /proc/meminfo file. They grab totalMem and freeMem and then usedMem = totalMem - freeMem.

Here is the relevant file.

https://github.com/hishamhm/htop/blob/f0e2a0e77157104dfc36d0c753fba67d0986f071/ProcessList.c

jvonmitchell avatar Jul 19 '14 07:07 jvonmitchell

I'm having the same issue with vtop 0.5.5 on Mac OS X El Capitan 10.11.3.

Here are two screenshots showing RAM usage in vtop, Activity Monitor and iStat Menus. Activity Monitor and iStat Menus show consistent stats.

It looks like vtop does not consider the memory file cache as free. See the following calculation based on numbers from the Activity Monitor screenshot.

> (11.78 + 3.59) / 16 * 100
96.0625

vtop: screen shot 2016-01-31 at 23 33 01

Activity Monitor: screen shot 2016-01-31 at 23 33 08

iStat Menus: screen shot 2016-01-31 at 23 34 17

kriskhaira avatar Jan 31 '16 15:01 kriskhaira

Getting this issue on Ubuntu 14.04.3 as well making the memory graph pretty much useless. Would be cool to see color coding and more useful percentage. htop handles this well. Comparison of vtop and htop running at the same time:

vtop v.s. htop

donut avatar Feb 12 '16 16:02 donut

Arch Linux is affected too: unbenannt

Would be cool to see color coding

true but it would look awkward since you cannot overlay characters in any terminal i know of.

GottZ avatar Mar 04 '16 10:03 GottZ

#11

wyw avatar Jun 14 '17 07:06 wyw