[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Memory usage Debian Jessie (stable)

You can drop the cache with this command:

sync; echo 3 > /proc/sys/vm/drop_caches

See what it does at my laptop:

root@laptop:~# free -m
                   total       used       free     shared    buffers     cached
Mem:          7439       3029       4409        201         91       1368
-/+ buffers/cache:       1569       5870
Swap:         1906          0       1906

root@laptop:~# sync; echo 3 > /proc/sys/vm/drop_caches

root@laptop:~# free -m
                   total       used       free     shared    buffers     cached
Mem:          7439       2001       5437        194          2        480
-/+ buffers/cache:       1518       5920
Swap:         1906          0       1906

As you can see, the cache was reduced from 1368 to 480, "freeing" more than 1GB, but on the second line the free ammount remains the same because, as Dan said, it ignores the cache.

2015-05-11 11:50 GMT-03:00 Dan Christensen <jdc@uwo.ca>:
Jan-Rens Reitsma <jan.rens.reitsma@gmail.com> writes:

> $ free -h
>              total       used       free     shared    buffers     cached
> Mem:          3.7G       3.5G       182M       153M       363M       2.1G
> -/+ buffers/cache:       1.0G       2.7G
> Swap:         7.6G         0B       7.6G
> 3.5 GB used of 3.7 GB available memory,
> with 2.1 GB available for caching and 182 MB free,
> 1.0 GB of the available cache and memory is used,
> no swap space used.

That's not a correct interpretation of the output of "free".  What that
output says is that 3.5GB is used, but of that, 363MB + 2.1GB = 2.5GB is
currently being used for buffers and cache.  The memory used for buffers
and cache can be made available very quickly, so the second line shows
how much is used (1.0GB) and free (2.7GB) with the buffer and cache
usage ignored.  So the real thing to take away from the above is in
the second line:  only 1.0GB is used and 2.7GB is free.  See



To UNSUBSCRIBE, email to debian-laptop-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 877fsff9rx.fsf@uwo.ca" target="_blank">https://lists.debian.org/[🔎] 877fsff9rx.fsf@uwo.ca

Reply to: