nodejs / help

:sparkles: Need help with Node.js? File an Issue here. :rocket:
1.47k stars 282 forks source link

Different RssFile in two linux instance. #4166

Closed itachaaa closed 4 months ago

itachaaa commented 1 year ago

Details

image We run the node process in two Linux environments. At the beginning, the memory usage of the node process is pmap -x pid, as shown in the right figure. However, after a period of time, the file mapping corresponding to the node process in environment 1 is reduced to 10256 KB. The difference between the two environments lies in that the swap partition used by the current process is 10476 KB. Run the cat /proc/pid/status command to check the status, as shown in the following figure. image

It looks like the RssFile is reduced, and it looks like the code snippet in the node code + shared library mapping memory, and I want to know when the RssFile of the node process will reduced, and what is this part?

Node.js version

v18.14.1

Example code

Run the node to access the console.

Operating system

Linux version 4.18.0-147.5.1.9.h499.eulerosv2r10.x86_64

Scope

runtime

Module and version

Not applicable.

preveen-stack commented 1 year ago

Guess RSS is controlled by operating system rather than the process. Are your linux instances are completely identical? is there any difference in other processes running on the system?

itachaaa commented 1 year ago

Guess RSS is controlled by operating system rather than the process. Are your linux instances are completely identical? is there any difference in other processes running on the system?

The Linux environment is the same, and the resource usage varies slightly. The swap partition in the low-occupation environment uses dozens of KB.

github-actions[bot] commented 5 months ago

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.

github-actions[bot] commented 4 months ago

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.