24 days ago
How is RAM usage calculated? My node process reports 121MB RSS via process.memoryUsage(), but Railway reports and I believe bills me for ~230 MB.
What is taken into account here? Also whenever I deploy, I get a large spike to 450MB and in some cases, it can be much higher, in the GBs: https://github.com/railwayapp/railpack/issues/616
I use Railpack to build my docker image.
1 Replies
24 days ago
We measure memory at the container (cgroup) level, not at the individual process level. That figure includes everything inside the container: your Node process RSS, file page cache, shared libraries, kernel data structures, and any child processes. It will always be higher than what process.memoryUsage().rss reports because Node only sees its own heap and resident pages. The deploy-time spike is the build step running inside the container before the final image is ready, which can pull in significantly more memory temporarily. The Railpack issue you linked is the right place to track that.
Status changed to Awaiting User Response Railway • 24 days ago
Status changed to Solved guillaume-docquier • 23 days ago