Here's a better suggestion. Why don't you see if you can find out what's causing the issue? It sounds a like a problem occurring in userspace. Try running htop
Selfhosted
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:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
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.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
You know you are right, and I've tried. I can manually monitor but it doesn't happen just then. I don't know yet what causes it, I can only assume it's one of the Docker containers because the machine is doing nothing else.
I am doing this to find out how often it happens, how quickly it happens, and what's at the top when it happens.
I can manually monitor but it doesn’t happen just then
Setup proper monitoring with history. That way yo don't have to babysit the server, you can just look at the charts after a crash. I usually go with netdata
Just as a side note, the load factor can also mean that processes are limited by IO:
Unix systems traditionally just counted processes waiting for the CPU, but Linux also counts processes waiting for other resources -- for example, processes waiting to read from or write to the disk.
Have you tried turning your swap off?
Nope, haven't. It says I have 2 GB of swap on a 16 GB RAM system, and that seems reasonable.
Why would you recommend turning swap off?
To check if your problem is caused by excessive memory usage requiring constant swapping. If it is, turning swap off will make some process be killed instead of slowing the computer down.