Hacker News new | past | comments | ask | show | jobs | submit login

Wouldn't it make more sense to just include the RAM used for disk-caching when calculating free memory? After all, the whole reason it's being used for disk-caching in the first place is that it's free! The Linuxoids that know what this even means can always explicitly look for the line that says how much memory is being used for caching...



It costs time to zero pages; disk cache pages are not zeroed. Not having a source of zero pages will add latency to large memory allocation requests.

(The pages must be zeroed to avoid the security problem of snooping on data you might not have access to.)


Exactly the kind of thing users not familiar with the way Linux handles memory DON'T consider when they check how much free memory they have. If you're the sort of person concerned with the overhead of zeroing pages then you can look at more detailed memory-usage info to find the details you're looking for.


The Windows task manager has a separate field called "Available". Right now I have 8190 MB total, 3627 cached, 4151 Available, and 537 free (not sure if that adds up perfectly, it was changing while I typed it).


OSX's activity monitor does something similar, it has 4 statuses: Wired, Active, Inactive and Free.

Wired and Active are basically the RAM being used (Wired is a special activity status for stuff which can not be moved to disk), Inactive is the cache (generally programs which were used recently) and Free is… well, free.

When checking used/free, Inactive and Free count towards free, Wired and Active towards used (though that's not always consistent).

Also, I don't think you have 8TB RAM.



He probably has 8GB of RAM (8192MB); some may be lost to address space holes. I have 12GB, if you're finding that implausible.


> He probably has 8GB of RAM (8192MB)

Yes, I'd expect that, but at the time of my comment (before his stealth edit) all his units read "GB" not "MB". I wrote "8 TB" for a reason.

> I have 12GB, if you're finding that implausible.

I have 8GB RAM in my laptop, why would I find 12GB RAM implausible?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: