Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Directus
  3. How to balance with other apps?

How to balance with other apps?

Scheduled Pinned Locked Moved Directus
4 Posts 3 Posters 611 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rosanoR Offline
      rosanoR Offline
      rosano
      wrote on last edited by
      #1

      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:

      Screenshot 2023-05-24 at 05-44-26 Cloudron.png Screenshot 2023-05-24 at 05-45-13 Cloudron.png Screenshot 2023-05-24 at 05-45-14 Cloudron.png Screenshot 2023-05-24 at 05-45-15 Cloudron.png Screenshot 2023-05-24 at 05-45-16 Cloudron.png Screenshot 2023-05-24 at 05-45-17 Cloudron.png Screenshot 2023-05-24 at 05-45-18 Cloudron.png Screenshot 2023-05-24 at 05-45-19 Cloudron.png

      Seems also when it is running it has this memoryLimit 0 thing, again not sure what it means.

      Screenshot 2023-05-24 at 05-46-28 Cloudron.png

      I also don't see any large spikes in these server graphs:

      Screenshot 2023-05-25 at 07-08-17 Cloudron.png

      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.

      J 1 Reply Last reply
      0
      • rosanoR rosano

        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:

        Screenshot 2023-05-24 at 05-44-26 Cloudron.png Screenshot 2023-05-24 at 05-45-13 Cloudron.png Screenshot 2023-05-24 at 05-45-14 Cloudron.png Screenshot 2023-05-24 at 05-45-15 Cloudron.png Screenshot 2023-05-24 at 05-45-16 Cloudron.png Screenshot 2023-05-24 at 05-45-17 Cloudron.png Screenshot 2023-05-24 at 05-45-18 Cloudron.png Screenshot 2023-05-24 at 05-45-19 Cloudron.png

        Seems also when it is running it has this memoryLimit 0 thing, again not sure what it means.

        Screenshot 2023-05-24 at 05-46-28 Cloudron.png

        I also don't see any large spikes in these server graphs:

        Screenshot 2023-05-25 at 07-08-17 Cloudron.png

        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.

        J Offline
        J Offline
        jayonrails
        translator
        wrote on last edited by
        #2

        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
        Jay

        P.S.: Welcome to Cloudron!

        1 Reply Last reply
        2
        • rosanoR Offline
          rosanoR Offline
          rosano
          wrote on last edited by
          #3

          Thanks @jayonrails, I appreciate your help and I think this is quite useful actually. I guess free -h and swapon --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 🙏🏽

          1 Reply Last reply
          1
          • robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #4

            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.

            Conscious tech

            1 Reply Last reply
            2
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search