RE: how many tomcat in a machine?
Just on this point of multiple Tomcat Instances, how does the JVM fit into all of this. ie does Tomcat1 use JVM1 and Tomcat2 use JVM2. Or does Tomcat1 Tomcat2 use JVM1? Also if you had one Tomcat Instances and 3 apps would they all share the one instance of Log4j and its static methods or would there be three instances of Log4j?? Nicholas Orr -Original Message- From: Turner, John [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 November 2002 3:19 AM To: 'Tomcat Users List' Subject: RE: how many tomcat in a machine? OK, thanks for the tip. John -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 14, 2002 12:13 PM To: Tomcat Users List Subject: RE: how many tomcat in a machine? On Thu, 14 Nov 2002, Turner, John wrote: Date: Thu, 14 Nov 2002 08:27:56 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: how many tomcat in a machine? A key problem to using a single Tomcat instance with multiple web applications is that a problem with Tomcat or a problem with one single web app effects all the others. In a shared server environment (application service provider, for example) you would be better off having multiple instances of Tomcat so that you can manage each instance separately without effecting the others. The other side of the coin is that sharing a single Tomcat instance saves a ***lot*** of memory, because the system classes are shared. You can mitigate most, but not all, of the impacts apps can have on each other by using a security manager that is appropriately configured. Glenn Nielsen (a Tomcat developer) has posted quite a few helpful documents to TOMCAT-USER on how to set this up -- see the mailing list archives for details. And, if you're coming to Las Vegas for ApacheCon next week, his session on how to do this is a must attend for anyone contemplating setting up this sort of thing. John Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] ** The information contained in this e-mail is confidential and is intended only for the use of the addressee(s). If you receive this e-mail in error, any use, distribution or copying of this e-mail is not permitted. You are requested to forward unwanted e-mail and address any problems to the MIM Holdings Limited Support Centre. For general enquires: ++61 7 3833 8000 Support Centre e-mail: [EMAIL PROTECTED] Support Centre phone: Australia 1800500646 International ++61 7 38338042 ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how many tomcat in a machine?
On Mon, 18 Nov 2002, Nicholas Orr wrote: Date: Mon, 18 Nov 2002 09:13:35 +1000 From: Nicholas Orr [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: how many tomcat in a machine? Just on this point of multiple Tomcat Instances, how does the JVM fit into all of this. ie does Tomcat1 use JVM1 and Tomcat2 use JVM2. Or does Tomcat1 Tomcat2 use JVM1? Also if you had one Tomcat Instances and 3 apps would they all share the one instance of Log4j and its static methods or would there be three instances of Log4j?? When people talk about running mulitple Tomcat instances, they are talking about multiple JVMs, not one. Out of the box, Tomcat doesn't support multiple instances within a single JVM. Within a single JVM, whether things like LogJ are shared or not depends on where the classes are loaded from -- if they're inside the /WEB-INF/lib directories, each webapp will have their own; if they are loaded from some place like the common/lib directory, the classes will be shared. Howver, I understand that Log4J still supports per-webapp configuration of loggers in the shared case if you want it. See the Log4J docs for more info. For more background on class loading in Tomcat, see: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html Nicholas Orr Craig -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how many tomcat in a machine?
Also if you had one Tomcat Instances and 3 apps would they all share the one instance of Log4j and its static methods or would there be three instances of Log4j?? If you put Log4j in one of the parent classloaders that Tomcat makes available to webapps ( shared/lib, common/lib ) then That will be one instance of log4j serving many webapps. Actually, all webapps would use the same default logger repository or, hierarchy unless you do specifically create a new logger repository for each webapp using a custom logger repository selector. See the following doc on this: http://qos.ch/containers/sc.html I implemented a logger repository selector similar to the one described in that article called Log4jCRS. You can find it here: http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/log4j/ It is used in both a Log4jInit servlet and a servlet context listener called Log4jApplicationWatch to initialize and shutdown loggers and appenders, respectively. http://barracuda.enhydra.org/software/cvs/cvsweb.cgi/Projects/EnhydraOrg/toolsTech/Barracuda/src/org/enhydra/barracuda/webapp/log4j/ Log4jCRS needs to be in a classloader visible to log4j.jar. This means if Log4j.jar is in common/lib (where commons logging likes it to be) you can put Log4jCRS in shared/lib or common/lib. You can't put it in WEB-INF/lib of your app unless you also place a copy of log4j.jar there as well because Log4jCRS needs to talk to classes in Log4j.jar and vice-versa. Log4jInit and Log4jApplicationWatch *must* be in WEB-INF/lib. This is because the custom logger repositories are keyed on each unique webapp classloader and so must be loaded in the webapp classloader of each individual application in order to support that condition. You can store your log4j config file (properties or xml) in WEB-INF and provide something like the following to configure Log4jApplicationWatch and Log4jInit : !-- Shuts down all loggers and appenders at webapp shutdown -- listener listener-class org.enhydra.barracuda.webapp.log4j.Log4jApplicationWatch /listener-class /listener !-- == -- !-- Log4j declarations-- !-- == -- servlet servlet-namelog4j-init/servlet-name servlet-classorg.enhydra.barracuda.webapp.log4j.Log4jInit/servlet-class init-param !-- relative path to config file within current webapp -- param-namelog4j-config/param-name param-valueWEB-INF/log4j.xml/param-value /init-param init-param !-- config file re-reading specified in milliseconds... Note that if the webapp is served directly from the .war file, configureAndWatch() cannot be used because it requires a system file path. In that case, this param will be ignored. Set to 0 or don't specify this param to do a normal configure(). -- param-namelog4j-cron/param-name param-value5000/param-value /init-param !-- optional param for use with a File Appender. Specifies a path to be read from a log4j xml config file as a system property. The property name is dynamically generated and takes on the following pattern: [webapp name].log.home In Barracuda's case, it would be Barracuda.log.home. The path defaults to WEB-INF/logs directory, which is created if it doesn't exist, unless the webapp is running directly from a .war file. Note that, if specified, the value is an absolute path, not relative to the webapp. -- !-- init-param param-namelog4j-log-home/param-name param-value/usr/local/logs/tomcat/param-value /init-param -- load-on-startup1/load-on-startup /servlet And for logging to file, a system variable is automatically created by Log4jInit. The name is different for each webapp and predictable because it is based on the context name of the webapp. For instance, if I have a context with a path of /Barracuda, then in my log4j.xml I use the variable ${Barracuda.log.home} to specify my filepath for a file appender such as: appender name=A2 class=org.apache.log4j.FileAppender param name=File value=${Barracuda.log.home}/main.log / param name=Append value=false / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%-4r [%t] %-5p %c %x - %m%n/ /layout /appender As you can see above in the configuratin for Log4jInit, there is a param you can set called log4-log-home where you can set any
Re: how many tomcat in a machine?
It all depends on the workload they must support. In my single CPU (800MHz / 256Mb / IDE HD), I usually have two or three Tomcats for development, but that's because the workload in my machine is very low (only one client, me :-) In production, you should test how performance degrades when you add another Tomcat server. Without benchmarking it's imposible to know the answer to your question, as it all depends on your applications, and the use you make of them. Anyway, a single tomcat instance can be configured to serve multiple web applications from different ports, or virtual hosts if you prefer. And it will need less resources than multiple ones. You could consider it as an option. Hope it helps Rodrigo - Original Message - From: Jose Antonio Martinez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 14, 2002 9:49 AM Subject: how many tomcat in a machine? how many tomcat server do you think can i put in a big machine like this? : Memory: 2G 2*CPU: PIII 1100 Mhz (aprox) Disk: scasi raid ___ Yahoo! Messenger Nueva versión: Webcam, voz, y mucho más ¡Gratis! Descárgalo ya desde http://messenger.yahoo.es -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how many tomcat in a machine?
A key problem to using a single Tomcat instance with multiple web applications is that a problem with Tomcat or a problem with one single web app effects all the others. In a shared server environment (application service provider, for example) you would be better off having multiple instances of Tomcat so that you can manage each instance separately without effecting the others. John -Original Message- From: Rodrigo Ruiz [mailto:rruiz;gridsystems.com] Sent: Thursday, November 14, 2002 6:43 AM To: Tomcat Users List Subject: Re: how many tomcat in a machine? It all depends on the workload they must support. In my single CPU (800MHz / 256Mb / IDE HD), I usually have two or three Tomcats for development, but that's because the workload in my machine is very low (only one client, me :-) In production, you should test how performance degrades when you add another Tomcat server. Without benchmarking it's imposible to know the answer to your question, as it all depends on your applications, and the use you make of them. Anyway, a single tomcat instance can be configured to serve multiple web applications from different ports, or virtual hosts if you prefer. And it will need less resources than multiple ones. You could consider it as an option. Hope it helps Rodrigo - Original Message - From: Jose Antonio Martinez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 14, 2002 9:49 AM Subject: how many tomcat in a machine? how many tomcat server do you think can i put in a big machine like this? : Memory: 2G 2*CPU: PIII 1100 Mhz (aprox) Disk: scasi raid ___ Yahoo! Messenger Nueva versión: Webcam, voz, y mucho más ¡Gratis! Descárgalo ya desde http://messenger.yahoo.es -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how many tomcat in a machine?
At least 2 dozen. John -Original Message- From: Jose Antonio Martinez [mailto:lfbbes;yahoo.es] Sent: Thursday, November 14, 2002 3:49 AM To: [EMAIL PROTECTED] Subject: how many tomcat in a machine? how many tomcat server do you think can i put in a big machine like this? : Memory: 2G 2*CPU: PIII 1100 Mhz (aprox) Disk: scasi raid ___ Yahoo! Messenger Nueva versión: Webcam, voz, y mucho más ¡Gratis! Descárgalo ya desde http://messenger.yahoo.es -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how many tomcat in a machine?
On Thu, 14 Nov 2002, Turner, John wrote: Date: Thu, 14 Nov 2002 08:27:56 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: how many tomcat in a machine? A key problem to using a single Tomcat instance with multiple web applications is that a problem with Tomcat or a problem with one single web app effects all the others. In a shared server environment (application service provider, for example) you would be better off having multiple instances of Tomcat so that you can manage each instance separately without effecting the others. The other side of the coin is that sharing a single Tomcat instance saves a ***lot*** of memory, because the system classes are shared. You can mitigate most, but not all, of the impacts apps can have on each other by using a security manager that is appropriately configured. Glenn Nielsen (a Tomcat developer) has posted quite a few helpful documents to TOMCAT-USER on how to set this up -- see the mailing list archives for details. And, if you're coming to Las Vegas for ApacheCon next week, his session on how to do this is a must attend for anyone contemplating setting up this sort of thing. John Craig -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
RE: how many tomcat in a machine?
OK, thanks for the tip. John -Original Message- From: Craig R. McClanahan [mailto:craigmcc;apache.org] Sent: Thursday, November 14, 2002 12:13 PM To: Tomcat Users List Subject: RE: how many tomcat in a machine? On Thu, 14 Nov 2002, Turner, John wrote: Date: Thu, 14 Nov 2002 08:27:56 -0500 From: Turner, John [EMAIL PROTECTED] Reply-To: Tomcat Users List [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Subject: RE: how many tomcat in a machine? A key problem to using a single Tomcat instance with multiple web applications is that a problem with Tomcat or a problem with one single web app effects all the others. In a shared server environment (application service provider, for example) you would be better off having multiple instances of Tomcat so that you can manage each instance separately without effecting the others. The other side of the coin is that sharing a single Tomcat instance saves a ***lot*** of memory, because the system classes are shared. You can mitigate most, but not all, of the impacts apps can have on each other by using a security manager that is appropriately configured. Glenn Nielsen (a Tomcat developer) has posted quite a few helpful documents to TOMCAT-USER on how to set this up -- see the mailing list archives for details. And, if you're coming to Las Vegas for ApacheCon next week, his session on how to do this is a must attend for anyone contemplating setting up this sort of thing. John Craig -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org