-
Notifications
You must be signed in to change notification settings - Fork 64
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory footprint #1378
Comments
Hi, what exactly you mean wit "grows very fast"? Does it stabilize at a certain point? Please provide more details and let it maybe also run for a day or such. |
Yes sorry, Yes it is stable, it not seem to have a memory leak, is the cost to add a device to the server, I don't know if it's possible to reduce, just an observation. I used the humidity temperature example, but bridging devices is more noticable. |
So yes I agree, and no we did not invested too much time into memory usage optimizations, also given that we are still not featurecomplete. I then did the onoff bridge with one device. 140MB initially ... then went down to 108MB
... was tested on a raspi 4 with nodejs 20 runnning |
Assuming you're looking at RSS, it's kind of tricky to assess what impact the reported value will have on the system as it will include shared pages and pages the OS can reclaim if necessary (like @Apollon77's example demonstrates). For reference, I loaded a device on my PC with three endpoints (root, on/off light and window covering). Running an adhoc I loaded another device with two endpoints (root + on/off light). A heap snapshot there reports ~150KB less for code than for the 3 endpoint device but actually about 200KB more for strings. My takeaway from this in the past was that resource consumption for additional endpoints is fairly trivial... Enough so that they can get lost in the noise if you look at heap usage. What you might do is load up a bridge (or just an endpoint with synthetic devices) with the maximum # of devices you think you must realistically support... Ideally put some load on it too but even a static test is a good start. If the system becomes unresponsive or the heap usage gets higher than you think you can support let us know your requirements and we can look into some optimization strategies for you. |
Thank you @Apollon77 and @lauckhart , I understand that this wasn't yet a focus for you, ok. This ticket was open to understand if optimization will be a focus to you or not, however I already open a ticket to the platform devs to expand this narrow limits where are more apps having this issue, so I hope they expand a little these limits. But thank you for you time, |
In fact yes, sure we plan to also work on memory footprint, but in my eyes this only makes sense when we are a bit more feature complete. So it is on the list, but not "next-ish", but later. What you could try is - check the examples package ... there we show how it could be "bundled" into an executable ... would be interesting (and yes I did not tried this if it makes any difference and my idea is just dumb!) if this has an effect - in general "when bundling just the needed things" which also could make sure only the needed things are loaded ..... |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello,
I am developing a matter bridge, (non profit project) the device where this will run have some memory restrictions and I noticed that only the server consume 60MB of RAM and when we add more devices it grows very fast 2x with 3, 4 devices.
This topic is something that will be checked later or is something that is already very optimised and it is nothing more todo?
Thank you for this project amazing, anyway.
The text was updated successfully, but these errors were encountered: