Skip to content
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

Does not track swap memory #168

Closed
zamiang opened this issue Jul 28, 2014 · 1 comment
Closed

Does not track swap memory #168

zamiang opened this issue Jul 28, 2014 · 1 comment

Comments

@zamiang
Copy link

zamiang commented Jul 28, 2014

I've been investigating a memory leak potentially related to #134 but stumbled on another issue.

Many comments on #134 note that memory 'levels out' after a certain time. By comparing our memory usage from newrelic with that of heroku, we have noticed that memory does not flatten out - newrelic-node just doesn't track swap memory. In the graph below, we compare newrelic's memory monitoring with heroku's at https://dashboard-next.heroku.com/apps/#{app-name}/metrics/web

newrelic
Memory drops are from deploying / restarting the app.

For some context, this node app is running express 3.4.7 on Heroku. Our app places a significant number of external http(s) requests before rendering a page. We are https only and use 2 2x dynos with 1gb of ram each. Newrelic log level is 'info'.

Please let me know if I can add anymore info. Will followup with a graph w/o newrelic-node install in a day or so.

@zamiang zamiang changed the title Newrelic does not track swap memory Does not track swap memory Jul 28, 2014
@txase
Copy link

txase commented Jul 29, 2014

@zamiang I believe the chart you are looking at is in the "instances" dashboard. For further context of others who may be interested in knowing where this dashboard exists, this is only available for Heroku customers due to some extra integration we have with them.

You're right that we don't report memory in the same way as Heroku does. We can only report what the Node.js runtime tells us: http://nodejs.org/api/process.html#process_process_memoryusage. We use the value of the "rss" size. The rss size refers to the amount of physical memory used by the process, but it does not include the amount of swap memory used by the process. The other available values, related to the V8 heap size, are useful in their own ways, but do not provide the total memory usage either.

In the end, we are hamstrung by what the Node.js runtime can tell us. However, we should be more clear in the title of the graph that the chart only refers to physical memory rather than total memory used by the process. We will open an internal issue to resolve this discrepancy.

As an aside, we also have a server monitoring product that provides much more detailed insight on the memory used by applications running on each server. This is what some customers on ticket #134 were using when providing screenshots. Unfortunately, this product is incompatible with Heroku, so you will need to rely on Heroku's own monitoring.

If you would like further help with this issue, please contact http://support.newrelic.com. We are winding down our Github issues support, and we can provide a better experience through our dedicated support channel. We thank you for your understanding as we undergo this transition.

@txase txase closed this as completed Jul 29, 2014
@newrelic newrelic locked and limited conversation to collaborators Jul 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants