Decreasing this value will favor reducing the cache size and will tend to increase responsiveness. You can set it in the /etc/sysctl.conf file. Low values (≤ 5) are especially good for SSDs where you want to minimize swap usage.
Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
21–30 of 74 posts
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#22So 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.
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#23Earlier quoted context omitted.
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 (thou…
See http://www.usenix.org/event/usenix2000/freenix/full_papers/s... for information about the BSD unified buffer cache.
And see http://www.westnet.com/~gsmith/content/linux-pdflush.htm for information about the Linux page cache.
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#24Earlier quoted context omitted.
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 (thou…
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#25This is misleading, as the kernel will often swap out processes rather than shrink the disk cache. Its tendency to do this is controlled by the vm.swappiness parameter, which by default heavily favors swapping: http://kerneltrap.org/node/3000 Decreasing this value will favor reducing the cache size and will tend to increase responsiveness. You can set it in the /etc/sysctl.conf file. Low values (≤ 5) are especially g…
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#26Unfortunately there is no chance Linux will do this, as the relevant reporting tools are too entrenched (and with good reason).
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#27 free -m | awk 'NR==3 {print $4}'Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#28Earlier quoted context omitted.
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 (thou…
He probably has 8GB of RAM (8192MB); some may be lost to address space holes. I have 12GB, if you're finding that implausible.
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?
Re: Tired of explaining Linux's seemingly obtuse memory usage to confused newbies?
#29The 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?
#30This is misleading, as the kernel will often swap out processes rather than shrink the disk cache. Its tendency to do this is controlled by the vm.swappiness parameter, which by default heavily favors swapping: http://kerneltrap.org/node/3000 Decreasing this value will favor reducing the cache size and will tend to increase responsiveness. You can set it in the /etc/sysctl.conf file. Low values (≤ 5) are especially g…
I do have a swap partition but only so I can hibernate.