Jeremy's Wiki

everything but the kitchen sink

User Tools

Site Tools


Linux VPS

Increase swap to 1-2x RAM

====== get current swap size ======
du --apparent-size --block-size=1 /var/swap.img -h

====== create 8GB swap ======
swapoff /var/swap.img dd if=/dev/zero of=/var/swap.img bs=1024k count=8000 mkswap /var/swap.img swapon /var/swap.img 

Optimisation for web server workload:


Tail log:

journalctl -xefu service-name

= Clean up save disk space

Clean up CapRover / Docker

Explore disk usage

ncdu --exclude /var/lib/docker/overlay2

Press d to delete selected

Clean up packages

sudo apt-get autoclean to clean up outdated package deb files

sudo apt-get autoremove to remove any unused dependencies

sudo apt-get clean to clean up apt cache

Set max log size


SystemMaxUse=100M, SystemMaxUse=1G etc

sudo service systemd-journald restart then applies changes and vacuums

linux_vps.txt · Last modified: 2024/02/24 12:52 by superuser

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki