this post was submitted on 07 Apr 2025
56 points (95.2% liked)

Selfhosted

50582 readers
330 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

This is an old desktop I use for some small self hosting services. I never use all my RAM and I don't see any RAM spikes other than when I install/compile things which I haven't done in months. I restarted the machine a couple of times, but the SWAP will eventually go right back up to 100%.

I have an Ubuntu server/yunohost setup and found: https://askubuntu.com/questions/157793/why-is-swap-being-used-even-though-i-have-plenty-of-free-ram

My cat /proc/sys/vm/swappiness value is indeed 60. Im not sure what would reduce the SWAP space usage.

Would changing this swappiness value help? Anyone come across this issue before?

EDIT: Found out what it is, its the matrix server that is running on the system. Its taking up a significant amount of swap. Found out via:

smem -s swap -r -p

turning that off, the system is now using 90% less SWAP. /opt/yunohost/matrix-synaps was the process.

you are viewing a single comment's thread
view the rest of the comments
[–] Coelacanthus@infosec.pub 1 points 23 hours ago* (last edited 22 hours ago)

I think that most of usefulness of swap has passed now that we have systems with noodles of ram.

Please read this article authored by maintainer of Linux kernel memory management subsystem and cgroup subsystem, Chris Down.

https://chrisdown.name/2018/01/02/in-defence-of-swap.html

And there is another article with some additional informations about swap authored by @farseerfc@sn.angry.im who tranlated the article above to Chinese.

https://farseerfc.me/followup-about-swap.html (only Chinese version available)