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

rss keeps rising when heapTotal does not #4349

Closed
hh768961735 opened this issue Feb 27, 2024 · 1 comment
Closed

rss keeps rising when heapTotal does not #4349

hh768961735 opened this issue Feb 27, 2024 · 1 comment

Comments

@hh768961735
Copy link

Details

  1. Phenomenon:
    image
    image
    image

The picture above shows the memory status of the business's nodejs process, which has been running for about 5 days. RSS has been on the rise, from 4-5GB at the beginning, to nearly 12GB. HeapTotal fluctuates between 4-5GB, and external has been on an upward trend. , appears to be linear.

I collect these data based on the process.memoryUsage() method and collect and summarize the data in each worker thread, because this method can only count the data in the current thread.

  1. First describe our business situation:
    (1). About 300 fixed number of working threads are opened in the main process, and there are other working threads that need to be dynamically created. The number is uncertain.
    (2) There are scenarios for interactive use with C++ addons. Each of the above 300 and worker threads will require this C++ addons to interact with other modules in the business.

I have been trying to solve this problem in recent months. According to my understanding, heapTotal should be the memory of the js part. I am not sure whether it is a memory leak problem or a high memory usage problem. Our internal testers conduct modular testing for this problem ( Including the js part and C++ addons), we have not found anything that can cause memory leaks, or there are deficiencies in our testing. Is it related to the nodejs version?

The startup command line is: --max-old-space-size=6000 --inspect

I need everyone's help. This phenomenon should be abnormal. How should we continue to analyze it?

Node.js version

v16.20.1

Example code

No response

Operating system

Linux,

Scope

runtime

Module and version

Not applicable.

@hh768961735 hh768961735 changed the title a high memory usage problem rss keeps rising whenheapTotal does not Feb 27, 2024
@hh768961735 hh768961735 changed the title rss keeps rising whenheapTotal does not rss keeps rising when heapTotal does not Feb 27, 2024
@hh768961735
Copy link
Author

#1518 Jemalloc is currently configured on the server and is being run and observed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant