Swap Space: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Swap Calculation== | |||
{| class="wikitable defaultright" | |||
|- | |||
!scope="col"| RAM Size !!scope="col"| Swap Size !!scope="col"| (Swap + Hibernate) Size | |||
|rowspan="9"| | |||
!scope="col"| RAM Size !!scope="col"| Swap Size !!scope="col"| (Swap + Hibernate) Size | |||
|- | |||
| 256MB || 256MB || 512MB || 512MB || 512MB || 1GB | |||
|- | |||
| 1GB || 1GB || 2GB || 2GB || 1GB || 3GB | |||
|- | |||
| 3GB || 2GB || 5GB || 4GB || 2GB || 6GB | |||
|- | |||
| 6GB || 2GB || 8GB || 8GB || 3GB || 11GB | |||
|- | |||
| 12GB || 3GB || 15GB || 16GB || 4GB || 20GB | |||
|- | |||
| 24GB || 5GB || 29GB || 32GB || 6GB || 38GB | |||
|- | |||
| 64GB || 8GB || 72GB || 96GB || 10GB || 106GB | |||
|- | |||
| 128GB || 11GB || 139GB || || || | |||
|} | |||
==Update » Ubuntu » 24.04== | ==Update » Ubuntu » 24.04== | ||
<syntaxhighlight lang="bash" highlight="8-11" line> | <syntaxhighlight lang="bash" highlight="8-11" line> |
Revision as of 19:34, 6 July 2024
Swap Calculation
RAM Size | Swap Size | (Swap + Hibernate) Size | RAM Size | Swap Size | (Swap + Hibernate) Size | |
---|---|---|---|---|---|---|
256MB | 256MB | 512MB | 512MB | 512MB | 1GB | |
1GB | 1GB | 2GB | 2GB | 1GB | 3GB | |
3GB | 2GB | 5GB | 4GB | 2GB | 6GB | |
6GB | 2GB | 8GB | 8GB | 3GB | 11GB | |
12GB | 3GB | 15GB | 16GB | 4GB | 20GB | |
24GB | 5GB | 29GB | 32GB | 6GB | 38GB | |
64GB | 8GB | 72GB | 96GB | 10GB | 106GB | |
128GB | 11GB | 139GB |
Update » Ubuntu » 24.04
echo 'swapon --show'|sudo bash
:'
NAME TYPE SIZE USED PRIO
/swap.img file 8G 0B -2
'
cat <<'EXE' | sudo bash
swapoff /swap.img
fallocate -l 12G /swap.img
ls -lh /swap.img && mkswap /swap.img
swapon /swap.img && swapon --show && free -th
EXE
Update » Raspberry Pi 4
cat <<'EXE' | sudo bash
printf '\nbefore:\n';free -th
sed -i 's|CONF_SWAPSIZE=100|CONF_SWAPSIZE=2048|' /etc/dphys-swapfile
service dphys-swapfile restart
printf '\nupdate:\n';free -th
EXE
Playground
echo 'sync;echo 3 >/proc/sys/vm/drop_caches && swapoff -a && swapon -a'|sudo bash
free -th
|
sudo swapon --show
cat /etc/fstab
| |
| ||
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
| ||