Yarn vs NPM memory consumption

Viewed 560

I am seeing significant difference in the memory usage when I run the microservices using yarn vs npm. I thought that since Yarn is supposed to be just a package manager, it shouldn't (per my understanding) affect memory usage since both NPM and Yarn lead to the same "node something.js" commands. What could cause the difference in memory usage? Do they load the node_modules into memory differently?

docker stats results

The rows highlighted in green are the ones where there is no memory degradation, and they are all microservices which are pulled from a container registry. The microservices that show increased memory consumption were all built locally.

0 Answers
Related