Java Spring Boot memory usage
Hello everyone!
I'm making some tests with Railway and my Java Spring Boot app. I want to subscribe to Hobby Plan but I want to know something about memory usage.
Memory usage in Railway's metrics is around 400MB, but it's always increasing. It only decrease when I restart a deployment, like few minutes ago.
But, when I check metrics with actuator, I found something like this:
JVM memory used: 189 MB.
JVM memory committed (amount of memory that is guaranteed to be available for use by the JVM, it includes memory used): 234 MB.
Maybe it's something I don't completely understand about Java memory usage or deployments. But if someone knows more about this, I would like to learn where can I find that 400 MB of memory explained.
Thank you in advice!!
9 Replies
Project ID:
eeab6790-3588-46f2-9c9d-b2f284705563
eeab6790-3588-46f2-9c9d-b2f284705563
sorry but this doesn’t really have to much do with railway, this is more so a general question about memory usage with java apps, and that has definitely been explained far better already on some blog or youtube video. I really dont mean to turn you away and id be happy to answer any railway related questions, but you can for sure find a far better answer to your question elsewhere
Sure, but I want to know if I'm missing something, because as I can see, Java says that memory used is lower than memory that Railway says. So I want to discard any Railway bug on information or something
JVM memory used 189 MB + JVM memory committed 234 MB = 423 MB
I thought that before, but JVM memory commited includes used.
like i said, someone on a blog or a youtube video could explain how memory with java works far better than i ever could.
i can assure you there is no issue with the memory metrics railway is giving you, its the total container memory.
Ok, I'll try to find the reason of that difference. Thanks!
sorry i couldnt have been more help on this, but please do open a new thread for any railway related questions you may have!