No announcement yet.

HSPI_MyQ High Memory Usage

  • Filter
  • Time
  • Show
Clear All
new posts

  • HSPI_MyQ High Memory Usage

    I installed the MyQ plugin yesterday. I noticed today that it is consuming a large amount of memory. Currently, 1.3GB. I restarted HS3 which temporarily corrects the problem, but within a couple hours the excessive memory consumption returns. Why is the MyQ plugin consuming so much memory?

    Current Date/Time: 12/1/2017 12:14:27 PM
    HomeSeer Version: HS3 Standard Edition
    Operating System: Microsoft Windows 10 Pro - Work Station
    System Uptime: 0 Days 1 Hour 8 Minutes 0 Seconds
    IP Address:
    Number of Devices: 208
    Number of Events: 157
    Available Threads: 400

    Enabled Plug-Ins BLRF
    1.1.17325.308: MyQ Pushover 3P SDJ-Health Z-Wave

  • #2
    I'll take a look and see what I can find. If you would, go into the settings and click the submit debug data. I do not see this behavior on my local system right now when I profile the plugin.


    • #3
      Thank you for looking at this. I clicked the "Submit Debug Report" button but there was no feedback saying that it was successful, so I'm not sure if it did anything.


      • #4
        So, I want to correct my original statement. I just loaded up the latest version in Visual Studio and did a memory profile against it. It appears out of the gate it takes 1,112.60KB of RAM, which is what you're seeing as well.

        Out of the memory consumption only 16KB is from things I have control over, the rest is listed as things like SSL connections, DLL cache, etc.

        It doesn't appear to be growing uncontrollably which confirms there's not a memory leak. I'll let it run over night and keep taking memory snapshots to see if it grows.


        • #5
          Ahah... I found a memory leak! Let me get this corrected and I'll profile the code again to make sure there's no more before I push an update.


          • #6
            .309 posted, fixes the memory leak. It still uses a lot of memory, but it appears that's all just caching the DLLs in memory. I'll do some research to see if there's a way to cause this footprint to be reduced.


            It appears .net is designed this way to reserve lots of memory. It doesn't necessarily use it all. If asked to by the OS to free up some, the app will give some back. What you're seeing is normal from what I'm reading.

            "When a .NET application starts, it asks the OS for a chunk of memory which it then segments to become the managed heap, stack, and large object heap. It is this total chunk of memory that TaskManager is reporting, which may or may not be completely used by .NET. Once a .NET application is given a chunk of memory, it will not release it until asked by the OS, which will only happen with the OS determines a need for more memory resources"


            • #7
              So far so good. Earlier today, the memory usage would climb to 1.3GB in under two hours. Now after two hours the memory usage is only 20MB. Thank you for the quick fix!