RE: Tomcat 4.1 ignoring -Xmx params
Howdy, I've never had that problem, and I use (and test) -Xms and -Xmx with every tomcat release. However, I only test the platforms I care about -- Linux and Solaris -- and so I can't vouch for Windows... Yoav Shapira Millennium ChemInformatics -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows: to uninstall: - tomcat.exe -uninstall Apache Tomcat 4.1 to install: - tomcat -install Apache Tomcat 4.1 E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll -Xmx256m -Xms128m - Djava.class .path=D:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar -Dcatalina.home=D:\Program Files\Apache Group\Tomcat 4.1 -Djava.endorsed.dirs=D:\Program Files\Apache Group\Tomcat 4.1\common\endorsed -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out D:\Program Files\Apache Group\Tomcat 4.1\logs\stdout.log -err D:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log What we are seeing here is that everything seems to work just fine, but Tomcat does not seem to stop at the 256m max that we are requesting? Is this to be expected? Or are we doing something stupid? Thanks much, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1 ignoring -Xmx params
How did you find out it is ignoring -Xmx parameter. Initially when you start up tomcat, it would allocate only the minimum heap that you set in -Xms. Hari -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows: to uninstall: - tomcat.exe -uninstall Apache Tomcat 4.1 to install: - tomcat -install Apache Tomcat 4.1 E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll -Xmx256m -Xms128m - Djava.class .path=D:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar -Dcatalina.home=D:\Program Files\Apache Group\Tomcat 4.1 -Djava.endorsed.dirs=D:\Program Files\Apache Group\Tomcat 4.1\common\endorsed -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out D:\Program Files\Apache Group\Tomcat 4.1\logs\stdout.log -err D:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log What we are seeing here is that everything seems to work just fine, but Tomcat does not seem to stop at the 256m max that we are requesting? Is this to be expected? Or are we doing something stupid? Thanks much, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- 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]
RE: Tomcat 4.1 ignoring -Xmx params
What we are doing is running Tomcat as a service on a production server; we specify both -Xmx and -Xms values. What we are seeing is that after several days of use, Tomcat is well over the max, by a magnitude of 100+ MB. Our experience has been that when we run it manually it seems to stay within the bounds, but when running as a service it seems to go beyond them. So perhaps we're not installing the service correctly... Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:02 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params How did you find out it is ignoring -Xmx parameter. Initially when you start up tomcat, it would allocate only the minimum heap that you set in -Xms. Hari -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows: to uninstall: - tomcat.exe -uninstall Apache Tomcat 4.1 to install: - tomcat -install Apache Tomcat 4.1 E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll -Xmx256m -Xms128m - Djava.class .path=D:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar -Dcatalina.home=D:\Program Files\Apache Group\Tomcat 4.1 -Djava.endorsed.dirs=D:\Program Files\Apache Group\Tomcat 4.1\common\endorsed -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out D:\Program Files\Apache Group\Tomcat 4.1\logs\stdout.log -err D:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log What we are seeing here is that everything seems to work just fine, but Tomcat does not seem to stop at the 256m max that we are requesting? Is this to be expected? Or are we doing something stupid? Thanks much, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1 ignoring -Xmx params
Howdy, As an aside, and this applies for windows as well as linux/solaris: -Xms and -Xmx control the size of the JVM heap. That's not the total JVM size. There are other spaces, e.g. the stack, symbol tables, and OS process overhead, that contribute to the overall process size. How much they contribute depends on the OS version, JDK version, and other things, and is very difficult to predict precisely. You can measure it at any given point by comparing the output from an OS-level top (e.g. top on linux, or the task manager in windows) to the output of Runtime.getRuntime().totalMemory(). You will always see a difference. So if you're basing your assertion that -Xmx is ignored on the output of an OS-level tool, please rethink your assertion in light of the above. If you're basing it on the actual Runtime.totalMemory() output, then you are correct in saying you likely did not install tomcat correctly. Yoav Shapira Millennium ChemInformatics -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:10 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params What we are doing is running Tomcat as a service on a production server; we specify both -Xmx and -Xms values. What we are seeing is that after several days of use, Tomcat is well over the max, by a magnitude of 100+ MB. Our experience has been that when we run it manually it seems to stay within the bounds, but when running as a service it seems to go beyond them. So perhaps we're not installing the service correctly... Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:02 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params How did you find out it is ignoring -Xmx parameter. Initially when you start up tomcat, it would allocate only the minimum heap that you set in -Xms. Hari -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows: to uninstall: - tomcat.exe -uninstall Apache Tomcat 4.1 to install: - tomcat -install Apache Tomcat 4.1 E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll -Xmx256m -Xms128m - Djava.class .path=D:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar -Dcatalina.home=D:\Program Files\Apache Group\Tomcat 4.1 -Djava.endorsed.dirs=D:\Program Files\Apache Group\Tomcat 4.1\common\endorsed -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out D:\Program Files\Apache Group\Tomcat 4.1\logs\stdout.log -err D:\Program Files\Apache Group\Tomcat 4.1\logs\stderr.log What we are seeing here is that everything seems to work just fine, but Tomcat does not seem to stop at the 256m max that we are requesting? Is this to be expected? Or are we doing something stupid? Thanks much, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- 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] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1 ignoring -Xmx params
As an aside, and this applies for windows as well as linux/solaris: -Xms and -Xmx control the size of the JVM heap. That's not the total JVM size. There are other spaces, e.g. the stack, symbol tables, and OS process overhead, that contribute to the overall process size. How much they contribute depends on the OS version, JDK version, and other things, and is very difficult to predict precisely. You can measure it at any given point by comparing the output from an OS-level top (e.g. top on linux, or the task manager in windows) to the output of Runtime.getRuntime().totalMemory(). You will always see a difference. Excellent point, and one I had considered. So if you're basing your assertion that -Xmx is ignored on the output of an OS-level tool, please rethink your assertion in light of the above. Ok, so this _is_ what I'm basing it on (looking at MS's Task manager). BUT...it still doesn't seem reasonable that the actual memory used is 150 MB than the limit specified to the JVM. In other words, if I tell the JVM -Xmx512 and the OS Task Mgr is reporting that Tomcat is using 670 MB, doesn't this seem like more than just an overhead issue? I'm perfectly content if that is in fact the answer, I'm just trying to confirm whether or not we have a problem. Any suggestions? tia, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:21 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params Howdy, As an aside, and this applies for windows as well as linux/solaris: -Xms and -Xmx control the size of the JVM heap. That's not the total JVM size. There are other spaces, e.g. the stack, symbol tables, and OS process overhead, that contribute to the overall process size. How much they contribute depends on the OS version, JDK version, and other things, and is very difficult to predict precisely. You can measure it at any given point by comparing the output from an OS-level top (e.g. top on linux, or the task manager in windows) to the output of Runtime.getRuntime().totalMemory(). You will always see a difference. So if you're basing your assertion that -Xmx is ignored on the output of an OS-level tool, please rethink your assertion in light of the above. If you're basing it on the actual Runtime.totalMemory() output, then you are correct in saying you likely did not install tomcat correctly. Yoav Shapira Millennium ChemInformatics -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:10 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params What we are doing is running Tomcat as a service on a production server; we specify both -Xmx and -Xms values. What we are seeing is that after several days of use, Tomcat is well over the max, by a magnitude of 100+ MB. Our experience has been that when we run it manually it seems to stay within the bounds, but when running as a service it seems to go beyond them. So perhaps we're not installing the service correctly... Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:02 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params How did you find out it is ignoring -Xmx parameter. Initially when you start up tomcat, it would allocate only the minimum heap that you set in -Xms. Hari -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows: to uninstall: - tomcat.exe -uninstall Apache Tomcat 4.1 to install: - tomcat -install Apache Tomcat 4.1 E:\sun\j2sdk1.4.1_01\jre\bin\client\jvm.dll -Xmx256m -Xms128m - Djava.class .path=D:\Program Files\Apache Group\Tomcat 4.1\bin\bootstrap.jar -Dcatalina.home=D:\Program Files\Apache Group\Tomcat 4.1 -Djava.endorsed.dirs=D:\Program Files\Apache Group\Tomcat 4.1\common\endorsed -start org.apache.catalina.startup.BootstrapService -params start -stop org.apache.catalina.startup.BootstrapService -params stop -out D
RE: Tomcat 4.1 ignoring -Xmx params
Howdy, Ok, so this _is_ what I'm basing it on (looking at MS's Task manager). BUT...it still doesn't seem reasonable that the actual memory used is 150 MB than the limit specified to the JVM. In other words, if I tell the JVM -Xmx512 and the OS Task Mgr is reporting that Tomcat is using 670 MB, doesn't this seem like more than just an overhead issue? I'm perfectly content if that is in fact the answer, I'm just trying to confirm whether or not we have a problem. It's very difficult to say. When the JVM gets that big (500MB), one expects overhead percentage to go up, not down. This is true for Sun JDK 1.3, 1.4 as far as I've observed. On one of our biggest JVMs, which is configured with -Xmx1400m, the unix top tool shows ~1300MB as the size when the Runtime.totalMemory() method indicates ~1000MB total memory on the heap. That actually projects fairly consistently (percentage-wise) with your 670-512 difference. Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Tomcat 4.1 ignoring -Xmx params
Christian, I'm not sure about this at all but I believe that all services show up in registry. Did you check to see if the -Xms and -Xmx values are set there? I think they should be set as JVM option values. If they do show up then I'd guess that you've installed the service correctly. But as I said I could be completely wrong on this. I just think it's worth taking a look at. Ken -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:27 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params As an aside, and this applies for windows as well as linux/solaris: -Xms and -Xmx control the size of the JVM heap. That's not the total JVM size. There are other spaces, e.g. the stack, symbol tables, and OS process overhead, that contribute to the overall process size. How much they contribute depends on the OS version, JDK version, and other things, and is very difficult to predict precisely. You can measure it at any given point by comparing the output from an OS-level top (e.g. top on linux, or the task manager in windows) to the output of Runtime.getRuntime().totalMemory(). You will always see a difference. Excellent point, and one I had considered. So if you're basing your assertion that -Xmx is ignored on the output of an OS-level tool, please rethink your assertion in light of the above. Ok, so this _is_ what I'm basing it on (looking at MS's Task manager). BUT...it still doesn't seem reasonable that the actual memory used is 150 MB than the limit specified to the JVM. In other words, if I tell the JVM -Xmx512 and the OS Task Mgr is reporting that Tomcat is using 670 MB, doesn't this seem like more than just an overhead issue? I'm perfectly content if that is in fact the answer, I'm just trying to confirm whether or not we have a problem. Any suggestions? tia, Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:21 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params Howdy, As an aside, and this applies for windows as well as linux/solaris: -Xms and -Xmx control the size of the JVM heap. That's not the total JVM size. There are other spaces, e.g. the stack, symbol tables, and OS process overhead, that contribute to the overall process size. How much they contribute depends on the OS version, JDK version, and other things, and is very difficult to predict precisely. You can measure it at any given point by comparing the output from an OS-level top (e.g. top on linux, or the task manager in windows) to the output of Runtime.getRuntime().totalMemory(). You will always see a difference. So if you're basing your assertion that -Xmx is ignored on the output of an OS-level tool, please rethink your assertion in light of the above. If you're basing it on the actual Runtime.totalMemory() output, then you are correct in saying you likely did not install tomcat correctly. Yoav Shapira Millennium ChemInformatics -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 12:10 PM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params What we are doing is running Tomcat as a service on a production server; we specify both -Xmx and -Xms values. What we are seeing is that after several days of use, Tomcat is well over the max, by a magnitude of 100+ MB. Our experience has been that when we run it manually it seems to stay within the bounds, but when running as a service it seems to go beyond them. So perhaps we're not installing the service correctly... Christian -- Christian Cryder [[EMAIL PROTECTED]] Internet Architect, ATMReports.com Barracuda - http://barracudamvc.org -- Coffee? I could quit anytime, just not today -Original Message- From: Hari Venkatesan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 10:02 AM To: Tomcat Users List Subject: RE: Tomcat 4.1 ignoring -Xmx params How did you find out it is ignoring -Xmx parameter. Initially when you start up tomcat, it would allocate only the minimum heap that you set in -Xms. Hari -Original Message- From: Christian Cryder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 11:49 AM To: Tomcat-User Subject: Tomcat 4.1 ignoring -Xmx params Hey folks, has anyone observed scenarios where Tomcat appears to ignore the -Xmx param? We are running 4.1 as a service on Win 2000 Pro, and have manually uninstalled/reinstalled the tomcat service as follows
Re: Tomcat 4.1 ignoring -Xmx params
From: Christian Cryder [EMAIL PROTECTED] Sent: Tuesday, January 28, 2003 9:26 AM Subject: RE: Tomcat 4.1 ignoring -Xmx params Ok, so this _is_ what I'm basing it on (looking at MS's Task manager). BUT...it still doesn't seem reasonable that the actual memory used is 150 MB than the limit specified to the JVM. In other words, if I tell the JVM -Xmx512 and the OS Task Mgr is reporting that Tomcat is using 670 MB, doesn't this seem like more than just an overhead issue? I'm perfectly content if that is in fact the answer, I'm just trying to confirm whether or not we have a problem. Any suggestions? To be blunt, you don't have a problem, you have a discrepancy. The first point is that, simply, Tomcat can not ignore or override the -Xmx parameter simply because it's a parameter to the JVM over which Tomcat has no control. Barring abuse through the use of JNI libraries, Java programs simply don't have this kind of control of the JVM. Now, what you are seeing is a side effect of the how the JVM operates. Perhaps it's being used for garbage collection. Perhaps it's being used for I/O. Perhaps it's the OS allocating buffers to the process for some other reason. Who knows. Plus with modern virtual memory operating systems, simple, hard memory numbers are almost impossible to find. A simple example of that (though unrelated to this) is a question on BSD systems as to Why don't I have any free memory?. The answer is because the system allocated it to be used as disk buffers. So, while the system says you don't have any free memory, what it's not saying is that it's willing to immediately accomodate any user request for more memory by dipping into its self-manage file cache. The point is that with so much going on in the background of modern systems, memory comes and goes like the wind. So, while Xmx512 may limit the JVM heap, it does not necessarily limit the JVM process size. They are two different numbers. Now, one would like to hope that the process does not grow without bound. For example, if you use the new file mapping classes in the 1.4 JDK, you can expand the JVM process size far beyond the actual heap size. (At least I think so, I can't fathom why the JVM would create an actual heap object out of a mmap buffer...what would be the point?) I would consider the Xmx value to be an inspiration to the JVM to keep it in check, but not a hard and fast rule as to how the process will get. Regards, Will Hartung ([EMAIL PROTECTED]) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]