How to balance with other apps?
-
I have 7 running apps (not including Directus) on a 2GB memory server. It seems that when I activate Directus it makes other apps slow or non-responsive, and often takes down the entire server. Sometimes it does run quickly without seeming to impact other apps.
Not sure if I'm reading these graphs correctly but they all seem to use comfortably under 250mb memory:
Seems also when it is running it has this
memoryLimit
0 thing, again not sure what it means.I also don't see any large spikes in these server graphs:
Anyway am I pushing the server too much? Is there something I can do other than doubling the RAM? I think I did something to increase 'swap' memory once on the DigitalOcean box, but not sure how to verify that.
-
Although I cannot assist with the original situation, I can explain the swap things:
@rosano said in How to balance with other apps?:
I think I did something to increase 'swap' memory once on the DigitalOcean box, but not sure how to verify that.
Easiest to check is:
root@my:~# free -h total used free shared buff/cache available Mem: 7.8Gi 2.9Gi 357Mi 167Mi 4.5Gi 4.4Gi Swap: 4.0Gi 114Mi 3.9Gi
This shows the size of swap.
root@my:~# swapon --show NAME TYPE SIZE USED PRIO /apps.swap file 4G 114.1M -2
Shows the usage of swap ("USED")
Swappiness is also a thing you might want to take a look into, I thnk those two pages are helpful for you:
https://www.howtogeek.com/449691/what-is-swapiness-on-linux-and-how-to-change-it/
https://askubuntu.com/questions/103915/how-do-i-configure-swappiness
Regarding the Cloudron apps usage, it might be helpful to list all the apps you are running and also some more general facts (amount of users, intensity of usage, domains, e-mails, etc.) to get to kniow your usaecase and get a better feeling if this machine is the right one for what you're doing or might need an upgrade.
Best
JayP.S.: Welcome to Cloudron!
-
Thanks @jayonrails, I appreciate your help and I think this is quite useful actually. I guess
free -h
andswapon --show
say that the swap is completely used:total used free shared buff/cache available Mem: 1.9Gi 1.4Gi 78Mi 17Mi 423Mi 314Mi Swap: 980Mi 980Mi 0.0Ki
NAME TYPE SIZE USED PRIO /apps.swap file 981M 980.9M -2
And the available memory from the former seems quite low and perhaps close to what might cause issues.
In total I'm running:
- 1 x YOURLS (256 MiB limit)
- 3 x Ghost (300 MiB limit)
- 1 x n8n (1 GiB limit)
- 1 x Surfer (256 MiB limit)
- 1 x Tiny RSS (256 MiB limit)
- 1 App proxy
I guess the apps capped at 2668 MiB on a machine with 2 GB plus 1 GB swap is cutting things close. I was avoiding doubling my server costs but maybe I'll have to see what options I have. Thanks for sharing all the info
-
Those are only container upper limits, not what the apps will use.
You can significantly increase the size of the swap file for more headroom, but things will slow down while swapping. You'll want more RAM as certain apps will use a lot more when you start heavier use.
Cost wise, there are server providers that max RAM such as Contabo and SSDNodes at a decent price.