Thomas, excellent, informative. So, given that a running 32-bit JVM on Linux will require at least 1GB RAM, total memory usage will not be JVM footprint * num instances, but rather, JVM footprint + num instances?
The use case is transferring 20 client sites from LAMP stack to JVM + Tomcat 7 + MySQL + a Groovy.lang web framework I developed. Ideally I would separate client sites into tomcat instances, so as to isolate them from each other (i.e. redeploy/restart without affecting other instances), but that hinges entirely on the memory footprint. I have 16GB RAM available but was only planning on allocating 4-6GB RAM for this project. Only a couple of the sites in question do significant load (read: have been running on LAMP stack with 2GB RAM for several years without issue) -- --Noah Noah Cutler Web/Mobile Applications New Mind Development ad...@newminddevelopment.com http:://newminddevelopment.com On Tue, 2011-03-15 at 07:43 +0100, Thomas Freitag wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Noah, > > On 03/15/2011 06:25 AM, Noah Cutler wrote: > > can find nothing on the net re: this apparently basic question. > > > > Given a simple hello world "app", what is the @memory footprint per > > instance in Tomcat 7? > > > > Just trying to assess options visa vi single instance + multiple virtual > > hosts vs. multiple instance single host (preferred option as each client > > app is isolated from the other). > > There is a simple answer from the Java Heap point of view, a stock > Apache Tomcat 7.0.11 (running in Oracle JVM 1.6.0_24) around 3.5MB in > Heap, 11MB in Permanent Generation after startup (see garbage collection > log): > > Heap after GC invocations=5 (full 2): > PSYoungGen total 18752K, used 0K [0x9ea50000, 0x9ff30000, 0xb38f0000) > eden space 16128K, 0% used [0x9ea50000,0x9ea50000,0x9fa10000) > from space 2624K, 0% used [0x9fa10000,0x9fa10000,0x9fca0000) > to space 2624K, 0% used [0x9fca0000,0x9fca0000,0x9ff30000) > PSOldGen total 42880K, used 3417K [0x74cf0000, 0x776d0000, > 0x9ea50000) > object space 42880K, 7% used [0x74cf0000,0x75046520,0x776d0000) > PSPermGen total 18176K, used 10916K [0x70cf0000, 0x71eb0000, > 0x74cf0000) > object space 18176K, 60% used [0x70cf0000,0x71799068,0x71eb0000) > > - From the system (32bit Linux in my test case) point of view, my test > with pmap gave me a total of 1191428K (~ 1.1GB). This includes shared > libraries, Heap, Perm, code cache and other native memory (stacks, > buffers etc), thus some of this can be used by other JVM instances... > > To cut it short: Tomcats memory footprint is very small, that shouldn't > be a problem for you. The JVM memory footprint depends on JVM version, > operating system and might be a problem if you run many JVM instances. > Test it in your system... > > Regards, > - -- > Thomas Freitag > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAk1/CqkACgkQGE5pHr3PKuWldQCfag8Uy0K445QX6uMhyJLjRtzL > Et8AnjSva8LzilB3gp7Zobc1TdRr0J/S > =/Zul > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org