💾 Archived View for the.teabag.ninja › akkoma › debian-vps-tweaks captured on 2024-02-05 at 09:36:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-09-08)

-=-=-=-=-=-=-

btop, backports, and swappiness

2023-01-02

A couple of things I tend to add to a Debian 11 VPS.

Install btop

screenshot of btop, showing ascii graphs of system resource usage

It is like htop (or top), just prettier. So why not. To get it, we have to add the backports repository.

Edit /etc/apt/sources.list as root and add these lines to the bottom:

#bullseye-backports
deb http://deb.debian.org/debian bullseye-backports main

then run

apt update
apt install btop

Then to run btop, you just run the following. It can be run as a user.

btop

Easy peasy!

Swappiness

I did note that Swap on my VPS filled and stayed filled - I don't like that as my Akkoma install would lag when that happened. I would rather it emptied as needed and it used memory to a more full capacity first (especially on the smaller VPS).

to check current swappiness, run:

cat /proc/sys/vm/swappiness

which will output something like `60`. Higher numbers mean it will favour swap more.

I want to have near the minimum, so will set it to 1.

We need to edit `/etc/sysctl.conf` and add to the bottom

vm.swappiness = 1

Then run the following to have it apply

sysctl -p

And that is it.