Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it normal to use 795 136 kbytes for the tomcat server?  RSS feed

 
Vadim titsi
Greenhorn
Posts: 14
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My project consists of a backend (tomkat=java EE, spring mvc, spring security....) and frontend (jsp=apache tags + html + bootstrap + jquery) + maven.

Is it normal 795 136 kbytes for the tomcat server? In my opinion the classes take up a lot of memory(RAM):
Current classes loaded: 12 368
Memory
Used:    165 832 kbytes
Committed: 795 136 kbytes

How do I look in the jconsole.exe\MBeans which classes are take up a lot of memory?
I can not use it on the server heroku, amazon, openshift, ... Because I'm available 1 GB(for free use).
Sorry for my English!
 
Tim Moores
Saloon Keeper
Posts: 3682
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat runs fine with a lot less than that (although overall memory needs depend on your web apps as well, obviously). How much memory is allocated to the JVM at startup? Can you change that amount?
 
Vadim titsi
Greenhorn
Posts: 14
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How much memory is allocated to the JVM at startup? 
800 768 kbytes

I would like to know what libraries take as much memory:
Used: 229 665 kbytes
 
Tim Moores
Saloon Keeper
Posts: 3682
78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't have to be libraries, it can also be objects that just haven't been garbage-collected yet. Try starting the JVM with 512 MB instead; my guess would be that it works just as well.
 
Tim Holloway
Bartender
Posts: 18608
68
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
800MB of RAM for a Tomcat server is not unusual, although it depends very much on what you are running for applications.

I've had people claim that Tomcat can operate in as little as 128MB of RAM, although I don't know what you could do with that, since the JVM itself was running about that size last I looked. And that was back around Tomcat 5 as well. A practical Tomcat server in my experience typically uses 512MB or more.

If this seems large, remember that Tomcat is a high-performance multi-user web application server. It has to maintain working storage for multiple online user sessions and often has things like cached database records in its memory as well. If you were to pull all of that apart into single-user desktop applications and count up all the resource used on each user's individual computer, the total would be a lot higher. And, of course, you have certain benefits of running from a centralized server that independent applications cannot have.
 
Vadim titsi
Greenhorn
Posts: 14
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores,Tim Holloway thanks you. Maybe I want too much in terms of resources :=)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!