Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
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
  1. Home
  2. Controllers
  3. MyController.org
  4. Memory Consumption

Memory Consumption

Scheduled Pinned Locked Moved MyController.org
10 Posts 4 Posters 2.2k Views 4 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.
  • SoloamS Offline
    SoloamS Offline
    Soloam
    Hardware Contributor
    wrote on last edited by
    #1

    Hello, any one having problem with memory consumption of MyController? I don't know if its normal, but in my case the java process is consuming almost 2Gb of memory of my system. Is this normal? And if yes, is there any way to reduce this value?

    Thank You

    1 Reply Last reply
    0
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      Mine is running on a 20% mem usage on a 30 days uptime

      1 Reply Last reply
      0
      • SoloamS Offline
        SoloamS Offline
        Soloam
        Hardware Contributor
        wrote on last edited by
        #3

        I have 16Gb on my system, so 20% would be 3.2 Gb, I have 2Gb, and seems a bit high, I had a problem with memory today in my server, and was looking at the top memory users, and found MyController on the top of the list. I sill only installed My controller, nothing configured yet. Only assign the Gateway and it auto discovered the nodes. I even disabled the MQTT server, since I already have one running.

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by gohan
          #4

          sorry, on a raspberry Pi 3, but java is known to be a little resource hungry

          1 Reply Last reply
          0
          • SoloamS Offline
            SoloamS Offline
            Soloam
            Hardware Contributor
            wrote on last edited by
            #5

            So we are talking about 200Mb of consumption... If its the Rp3 (1Gb Ram)...

            1 Reply Last reply
            1
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #6

              I have no experience with MyController but the java virtual machine can be set to not expand memory usage above for example 256MB by setting Xmx256m. More info: https://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control

              The Xmx parameter is set in the MyController start script: https://github.com/mycontroller-org/mycontroller/blob/development/dist/src/main/package/bin/start.sh#L27

              But it looks like the default setting is 256MB so I don't understand why your instance is using 2GB. Could you check your start script?

              1 Reply Last reply
              0
              • SoloamS Offline
                SoloamS Offline
                Soloam
                Hardware Contributor
                wrote on last edited by
                #7

                Afther some googling I changed the start.sh

                From This

                #Java Heap settings
                HEAP_MIN=-Xms32m
                HEAP_MAX=-Xmx256m
                

                To this

                #Java Heap settings
                HEAP_MIN="-Xms32m -XX:PermSize=32m"
                HEAP_MAX="-Xmx256m -XX:MaxPermSize=256m -Xss1m"
                

                And now the max memory is respected...

                Some dev can pronounce him self if this can give any problems....

                Thank You all

                mfalkviddM 1 Reply Last reply
                2
                • SoloamS Offline
                  SoloamS Offline
                  Soloam
                  Hardware Contributor
                  wrote on last edited by
                  #8

                  I can mention that I run MyController in a FreeNas Jail (FreeBSD Jail) and is working well, I had to do some teweeking to make it work. If someone is interested I can Make a tutorial on how to adapt the MyController to work in FreeBSD

                  1 Reply Last reply
                  0
                  • SoloamS Soloam

                    Afther some googling I changed the start.sh

                    From This

                    #Java Heap settings
                    HEAP_MIN=-Xms32m
                    HEAP_MAX=-Xmx256m
                    

                    To this

                    #Java Heap settings
                    HEAP_MIN="-Xms32m -XX:PermSize=32m"
                    HEAP_MAX="-Xmx256m -XX:MaxPermSize=256m -Xss1m"
                    

                    And now the max memory is respected...

                    Some dev can pronounce him self if this can give any problems....

                    Thank You all

                    mfalkviddM Offline
                    mfalkviddM Offline
                    mfalkvidd
                    Mod
                    wrote on last edited by mfalkvidd
                    #9

                    @soloam great work.

                    Note: If you are able to upgrade to Java 8, you should no longer need to set XX:MaxPermSize

                    If you want to dig deeper into the memory usage, use the command jstat -gcutil to get access to a lot of information.

                    1 Reply Last reply
                    0
                    • skywatchS Offline
                      skywatchS Offline
                      skywatch
                      wrote on last edited by
                      #10

                      Mine usually tops out at about 30%.

                      What is the output of the following??

                      $ java -version
                      $ javac -version
                      
                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      23

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular