Live data from Hacker News

Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

linuxatemyram.com

11–20 of 74 posts

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#11
post #4

So basically the same thing Vista was doing (prefetch, and admittedly it did a shitty job with >1GB ram), except since its Linux, Oh its all fine guys, we won't destroy the OS' reputation.

I dare say Vista did a plenty good job of destroying its reputation without anyone batting an eyelash at this.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#12
post #8

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...

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).

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#13
post #12
post #8

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...

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.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#14
post #10
post #4

So basically the same thing Vista was doing (prefetch, and admittedly it did a shitty job with >1GB ram), except since its Linux, Oh its all fine guys, we won't destroy the OS' reputation.

Linux has been doing this for a lot longer than Windows has. (Which I only actually know because there was so much FUD about Vista's pre-fetching when it came out.) edit: Sorry, getting prefetching and SuperFetch confused.

Unix has been doing it... You talk as if Linus personally invented the idea of caching.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#15
post #2

The title of the link (unlike the linked page) suggests that Linux is somehow to blame here... Why? Using RAM for disk caching is a good thing . Besides, this technique is employed by Windows as well. It's just that the average Windows user probably doesn't know how much free RAM his PC has (well, the really average user doesn't know how much total RAM it has). My Windows 7 box takes at least 2GB of memory to itself…

Windows started doing disk caching with Vista and users certainly noticed and complained in much the same way.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#16
post #10
post #4

So basically the same thing Vista was doing (prefetch, and admittedly it did a shitty job with >1GB ram), except since its Linux, Oh its all fine guys, we won't destroy the OS' reputation.

Linux has been doing this for a lot longer than Windows has. (Which I only actually know because there was so much FUD about Vista's pre-fetching when it came out.) edit: Sorry, getting prefetching and SuperFetch confused.

Doing what? Prefetching? It has been there since XP.It is not just simple caching. Windows probably was doing caching even before Linux existed.

What Vista does is SuperFetch and I don't think it's there in Linux even now, except that someone wrote a program that would do a similar thing but it's not really used that much.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#17
post #4

So basically the same thing Vista was doing (prefetch, and admittedly it did a shitty job with >1GB ram), except since its Linux, Oh its all fine guys, we won't destroy the OS' reputation.

Prefetching is not the same as caching. Vista's SuperFetch is even more different.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#18
post #6
post #4

So basically the same thing Vista was doing (prefetch, and admittedly it did a shitty job with >1GB ram), except since its Linux, Oh its all fine guys, we won't destroy the OS' reputation.

Right, the only thing wrong with Windows Vista was its RAM caching strategy.

Maybe not, but there were a lot of people needlessly going bonkers over the disk light blinking (SuperFetch) and free memory numbers in the task manager(exactly the same problem that the referenced site is trying to explain).

See http://www.codinghorror.com/blog/2006/09/why-does-vista-use-...

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#19
post #15
post #2

The title of the link (unlike the linked page) suggests that Linux is somehow to blame here... Why? Using RAM for disk caching is a good thing . Besides, this technique is employed by Windows as well. It's just that the average Windows user probably doesn't know how much free RAM his PC has (well, the really average user doesn't know how much total RAM it has). My Windows 7 box takes at least 2GB of memory to itself…

Windows started doing disk caching with Vista and users certainly noticed and complained in much the same way.

Windows didn't start doing disk caching with Vista. Perhaps it used memory more aggressively, or changed the way it did the accounting, but it certainly didn't start doing disk caching just with Vista, as anyone who remembers the difference in performance of DOS before and after running SMARTDRV will attest.

Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?

#20
post #8

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.)

Post reply on HN