Free Up RAM: Difference between revisions
Jump to navigation
Jump to search
(9 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
==🟠 Free Up » Dentries & Inodes== | ==🟠 Free Up » Dentries & Inodes== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo 'sync;echo 2>/proc/sys/vm/drop_caches'|sudo bash | echo 'sync;echo 2 >/proc/sys/vm/drop_caches'|sudo bash | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==🔴 Free Up » PageCache, Dentries & Inodes== | ==🔴 Free Up » PageCache, Dentries & Inodes== | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
echo 'sync;echo 3>/proc/sys/vm/drop_caches'|sudo bash | echo 'sync;echo 3 >/proc/sys/vm/drop_caches'|sudo bash | ||
echo 'sync;echo 3>/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash | echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Playground== | |||
{| | |||
| valign="top" colspan="2" | | |||
<syntaxhighlight lang="bash"> | |||
echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash | |||
free -th | |||
</syntaxhighlight> | |||
| valign="top" | | |||
<syntaxhighlight lang="bash"> | |||
echo 'apt update;apt list --upgradable;apt upgrade'|sudo bash | |||
bottom | |||
</syntaxhighlight> | |||
|- | |||
|colspan="3"| | |||
---- | |||
|- | |||
|valign="top"| | |||
<syntaxhighlight lang="bash"> | |||
docker network prune -f | |||
docker volume prune -f | |||
docker system prune -f | |||
docker image ls | |||
</syntaxhighlight> | |||
|valign="top"| | |||
<syntaxhighlight lang="bash"> | |||
cat <<'EXE' | bash | |||
for d in system network volume | |||
do docker ${d} prune -f;done | |||
EXE | |||
</syntaxhighlight> | |||
|valign="top"| | |||
<syntaxhighlight lang="bash"> | |||
cat <<'EXE' | ssh [email protected] | |||
for d in system network volume | |||
do docker ${d} prune -f;done | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
| colspan="3" | | |||
---- | |||
|- | |||
| valign="top" | | |||
| valign="top" | | |||
| valign="top" | | |||
|} | |||
== References == | == References == | ||
{| | {| | ||
| valign="top" | | | valign="top" | | ||
* [https://www.hostbillo.com/blog/clear-ram-memory-cache-buffer-and-swap-space-on-linux-hostbillo/ | * [https://www.hostbillo.com/blog/clear-ram-memory-cache-buffer-and-swap-space-on-linux-hostbillo/ Linux » Free up RAM, Cache, Buffer & Swap] | ||
* [https://unix.stackexchange.com/questions/706359/ <code>sync</code> » When & Why] | * [https://unix.stackexchange.com/questions/706359/ Linux » <code>sync</code> » When & Why] | ||
| valign="top" | | | valign="top" | | ||
Line 36: | Line 90: | ||
| valign="top" | | | valign="top" | | ||
* [https://serverfault.com/questions/283129/ SSH » Connection Hang Forever] | * [https://serverfault.com/questions/283129/ SSH » Connection Hang Forever] | ||
* [[ | * [[Disk Performance]] | ||
* [[Ruby on Rails]] | * [[Ruby on Rails]] | ||
* [[TensorFlow]] | * [[TensorFlow]] | ||
Line 44: | Line 98: | ||
* [[TMux]] | * [[TMux]] | ||
* [[CURL]] | * [[CURL]] | ||
* [[Tar]] | |||
| valign="top" | | | valign="top" | | ||
* [[Linux Kernel]] | |||
* [[Swap Space]] | |||
* [[BIOS Menu]] | |||
* [[7Zip]] | |||
| valign="top" | | | valign="top" | | ||
|} | |} |
Latest revision as of 18:32, 6 July 2024
🟢 Free Up » PageCache
echo 'sync;echo 1 >/proc/sys/vm/drop_caches'| sudo bash
🟡 Free Up » Swap Space
echo 'swapoff -a && swapon -a'|sudo bash
🟠 Free Up » Dentries & Inodes
echo 'sync;echo 2 >/proc/sys/vm/drop_caches'|sudo bash
🔴 Free Up » PageCache, Dentries & Inodes
echo 'sync;echo 3 >/proc/sys/vm/drop_caches'|sudo bash
echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash
Playground
echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash
free -th
|
echo 'apt update;apt list --upgradable;apt upgrade'|sudo bash
bottom
| |
| ||
docker network prune -f
docker volume prune -f
docker system prune -f
docker image ls
|
cat <<'EXE' | bash
for d in system network volume
do docker ${d} prune -f;done
EXE
|
cat <<'EXE' | ssh [email protected]
for d in system network volume
do docker ${d} prune -f;done
EXE
|
| ||
References
| ||