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
  • Brite
  • 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 - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. Cloudron and Swap File Use

Cloudron and Swap File Use

Scheduled Pinned Locked Moved Discuss
14 Posts 7 Posters 1.2k Views 8 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.
  • C Offline
    C Offline
    crazybrad
    wrote on last edited by crazybrad
    #3

    @nebulon At times I see that the Cloudron is not responsive (browser timeouts, which could be something other than a busy Cloudron server). I am also having an issue when using external monitors to check the health of my Cloudron (Uptime Robot, BetterStack). Attempts to use the API health check to return Cloudron version sometimes fails (causing Uptime or BetterStack to issue an alert). The same problem happens using the appid API call to check my Kuma instance. Again, I am not sure why this is happening or if it relates to the swapfile and performance. The GET failures are intermittent, but frequent enough to cause me to disable these alerts.

    Given the CPU/RAM/Disk of this server, I would not expect any of this to be an issue. I am not seeing anything in the box log that might suggest a problem. An article I was reading prompted me to look at the swapfile and utilization. Inside Cloudron, the monitoring chart seems to show a 50/50 split between RAM and swapfile. Ideally, Cloudron would use close to 100% RAM, but if subsystems dictate a 50/50 split, then perhaps I should increase from an 8GB swapfile to something much larger (I have enough disk to accommodate this easily).

    Theoretically, suppose I allocate 1GB to /apps.swap? How would that impact Cloudron performance? Would applications crash? Wait for available swapfile RAM? Just trying to figure out how to best allocate extra resources to get better performance.

    1 Reply Last reply
    0
    • jamesJ james marked this topic as a regular topic on
    • jamesJ james moved this topic from Support on
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #4

      I think we would have to separate some issues here. Cloudron's main service (box process) is not setting up anything special regarding swap, so since you say you get response issues on the Cloudron API itself and system RAM is not the issue here from your perspective, I guess something else is at play causing this. So maybe before going into apps, first try to figure out what is happening on those API calls.

      For a start check the /home/yellowtent/platformdata/logs/box.log during the time when the API calls fail. This should show some error to work with.

      If this is some virtual server, it could also mean that CPU or disk becomes very slow if you share the same hardware resources with other virtual servers. Such usage is usually not visible in your system stats but can have a real impact.

      Also keep vmstat 1 via SSH running for some time and look at the si (swap in) and so (swap out) numbers, to get a sense of how the system is loading and offloading memory pages live.

      1 Reply Last reply
      1
      • C Offline
        C Offline
        crazybrad
        wrote on last edited by
        #5

        @nebulon Great point about the VPS. I am going to try "monitoring" two different Cloudrons at different VPS providers. Let's see if there is a similar pattern (perhaps something related to Clourdon) or if one Cloudron is having API issues, then that would suggest a VPS provider issue. In any case and on all Cloudrons, I will check the box.log to see if there is something happening on the Cloudron when API issues appear.

        Independent of the API/heartbeat issues, what is your recommendation on managing the swap file and it's size?

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #6

          The rough rule here would be, that if the server has limited RAM, then use a larger swap file. If you have plenty of RAM a smaller say 4GB swap for edge cases to increase stability is good.

          What limited RAM means kinda depends on how much apps and which apps you have installed. So this is really hard to say.

          Overall unless you are sure the swapping is the actual bottleneck, I would not dive too much into that and first check other things.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            crazybrad
            wrote on last edited by
            #7

            @nebulon Let me use "vmstat 1" as you suggested and see what is really going on.

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

              @Jamie_Casper can you give us an example that's more specific?

              Conscious tech

              jdaviescoatesJ 1 Reply Last reply
              0
              • robiR robi

                @Jamie_Casper can you give us an example that's more specific?

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #9

                @robi I'm pretty sure @jamie_casper is an AI spam bot - as @girish just spotted, all of their posts are innocent enough looking summaries of posts which don't really add anything. IMHO clearly fishing for upvotes so they can come back and post spam links.

                I use Cloudron with Gandi & Hetzner

                robiR 1 Reply Last reply
                0
                • jdaviescoatesJ jdaviescoates

                  @robi I'm pretty sure @jamie_casper is an AI spam bot - as @girish just spotted, all of their posts are innocent enough looking summaries of posts which don't really add anything. IMHO clearly fishing for upvotes so they can come back and post spam links.

                  robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #10

                  @jdaviescoates All good, clearly it can't be more specific ;-]

                  Banhammer time

                  Conscious tech

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    joseph
                    Staff
                    wrote on last edited by
                    #11

                    @robi @jdaviescoates i deleted the user

                    1 Reply Last reply
                    2
                    • sponchS Offline
                      sponchS Offline
                      sponch
                      wrote last edited by
                      #12

                      mh...my server has 32GB of RAM and 4GB Swap.
                      While only 16 GB of RAM are used the swap file is almost at 4GB. Is this expected behavior? DOn't have any problems with performance btw.

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        crazybrad
                        wrote last edited by
                        #13

                        @sponch I noticed the same on my Cloudron, but I would let the experts weigh in on your question.

                        1 Reply Last reply
                        0
                        • jamesJ Offline
                          jamesJ Offline
                          james
                          Staff
                          wrote last edited by james
                          #14

                          Hello @sponch
                          It depends on your provider how he initializes the Ubuntu system.
                          A good guide is https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/8/html/managing_storage_devices/getting-started-with-swap_managing-storage-devices#recommended-system-swap-space_getting-started-with-swap
                          According to the Red Hat guide, 4GB SWAP for a 32GB RAM system is the minimal recommended.

                          1 Reply Last reply
                          0

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          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