[mdlug] Avail
Ingles, Raymond
Raymond.Ingles at compuware.com
Thu Sep 26 13:17:18 EDT 2013
> From: Garry Stahl
> On the old Amiga CLI there is a command "avail" that told you how much memory you where using.
> Now it also had a switch "flush" that freed up any memory registers that had been allocated that were no longer in use.
> Does the Linux CLI have a similar command?
As noted, 'free' reports overall memory usage, like so:
----
$ free
total used free shared buffers cached
Mem: 3882904 3387420 495484 0 273668 1480880
-/+ buffers/cache: 1632872 2250032
Swap: 8219644 167816 8051828
----
Of ~4GB, the top line claims I have less than 500MB free. But on Linux, any RAM that isn't being used by the kernel or a process gets used as a disk cache. So the second line shows that the amount of RAM *actually* available for applications is over 2GB. And I'm only using about 160-odd MB of swap space.
Also as noted, there's no need for any kind of 'flush' operation, as Linux itself will, so to speak, 'auto-flush' RAM when needed. You can adjust some of the parameters of the rules it uses, for example how aggressive it is about swapping processes out to disk. (http://linux.cloudibee.com/2007/11/linux-performance-tuning-vm-swappiness/) But that's rarely necessary, and only for fairly specialized workloads. If you really feel the need to poke around, you could take a look at this: https://www.kernel.org/doc/Documentation/sysctl/vm.txt
More information about the mdlug
mailing list