Re: Checking Tomcat's Memory
Kris is right. These parameters ought to be tweaked for servers with decent amounts of memory installed. On another project our company is working on, we had a machine with 8G (a Sun 4-way server). We were able to set up to 3G on JDK1.3.1. To documentation I found indicated using ISM, about 3.8 was achievable We did have problems and switching to 2G max heap worked. So, I'd caution those trying to use anything higher than 2G on 1.3.1. Perhaps 1.4 has fixed this. I know the documentation says the special memory settings (NewRatio, etc...) are used a little differently. Follow this link for more details; http://java.sun.com/docs/hotspot/index.html David Kris Schneider wrote: Sun's 1.4 server (not client) JVM can use a 4GB heap on a 64-bit SPARC box. Otherwise, I think you're pretty much stuck at 2GB. How much physical memory and swap space is installed? How much is actually available for allocation to the JVM when Tomcat gets kicked off? I also tend to adjust some of the other options. Something typical (for 1.3, some things have changed for 1.4) might be: -Xms512m -Xmx512m -XX:MaxPermSize=96m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 I certainly don't claim that those numbers are generally optimal, but changing them from their defaults can provide dramatic results. A certain commercial app server I've used would just up die until things were tweaked out a bit - YMMV. This might also be of interest (for Sun JVMs anyway): http://java.sun.com/docs/hotspot/index.html Sexton, George wrote: I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s
RE: Checking Tomcat's Memory
That's true, the adress space for each Win32 process is limited to 2GB (same on Linux? I would assume yes for the same processor architecture, but i do not know it). Another hint: If your applications are compatible with jdk 1.3, try out the IBM jdk. For me it works more stable and performant than the Sun jdks in a server environment both on Windows and Linux. For example the GC does not stop the whole JVM from time to time as with the Sun jdk. Regards, Jens Stutte Sexton, George To: Tomcat Users List gsexton@mhsof[EMAIL PROTECTED] tware.comcc: Subject: RE: Checking Tomcat's Memory 16/08/2002 01.01 Please respond to Tomcat Users List I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName \Parameter s -- 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: Checking Tomcat's Memory
The box has 4GB of memory, and we can vary the swap space. Tomcat essentially can get as much memory as it wants, but the highest I've been able to set the JVM is -Xmx1600m, anything higher and it complains (error message was in a previous e-mail). Although I think you are correct, on Win32, 2GB is as high as we can go (unless someone can inform me otherwise). -Original Message- From: Kris Schneider [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 6:13 PM To: Tomcat Users List Subject: Re: Checking Tomcat's Memory Sun's 1.4 server (not client) JVM can use a 4GB heap on a 64-bit SPARC box. Otherwise, I think you're pretty much stuck at 2GB. How much physical memory and swap space is installed? How much is actually available for allocation to the JVM when Tomcat gets kicked off? I also tend to adjust some of the other options. Something typical (for 1.3, some things have changed for 1.4) might be: -Xms512m -Xmx512m -XX:MaxPermSize=96m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 I certainly don't claim that those numbers are generally optimal, but changing them from their defaults can provide dramatic results. A certain commercial app server I've used would just up die until things were tweaked out a bit - YMMV. This might also be of interest (for Sun JVMs anyway): http://java.sun.com/docs/hotspot/index.html Sexton, George wrote: I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking Tomcat's Memory
Hi, CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? That's the correct way to set them. Here's a simple way to verify things, as I inherently distrust Windows performance monitoring tools: - Write a very simple app that would allocate roughly 1 GB of RAM. For example, by creating a 100 * 1000 array of Integer objects. Integer[][] hugeArray = new Integer[100][1000]; for(l = 0; l 100; l++) { for(l2 = 0; l2 1000; l2++) { hugeArray[l][l2] = new Integer(l2); } } - Start the server with this app running, but not your other apps. (Assuming ROOT, examples, tomcat-docs etc take very little runtime memory). Make sure you trigger the above code, and see that it runs without an OutOfMemoryError. You've just verified the minimum setting. - Modify the above code to 300 * 1000, again run it, verify that it *does* generate an OutOfMemoryError. Then you will have verified the -Xmx setting. - Obviously, I used perfectly nice round numbers in the above code. Due to internal tomcat stuff, other webapps, runtime overhead, JVM overhead, etc, the actual numbers will be lower. - You can also verify within the program how much RAM hugeArray took up by trying something like: System.gc(); long memBefore = Runtime.getRuntime().totalMemory(); hugeArray = null; System.gc(); long memAfter = Runtime.getRuntime().totalMemory(); long hugeArrayMemory = memAfter - memBefore; - As always, stuff like the above should be run several times and averaged, for a more reliable predictor. System.gc() is not guaranteed to run, much less do a full GC, etc etc I assume you already know all about that. Maybe this will help ;) You can also try MemoryMonitor from these guys: http://www.spywindows.com/PAGE1/SOFTWARE.HTM I've used it in the past, it's decent. But I trust the above approach more. Yoav Shapira Millennium ChemInformatics I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking Tomcat's Memory
So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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: Checking Tomcat's Memory
Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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: Checking Tomcat's Memory
Hi, I've been following your thread a bit loosely, so I may have misunderstood something. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. All else aside, you expect that for a given server CPU usage will *not* increase with the number of simultaneous requests to the server??? Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking Tomcat's Memory
g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking Tomcat's Memory
I was using requests as in total requests. I'm not talking about requests per second or transactions per second (TPS), I'm talking about the total number of requests over time (such as 20,000 requests, at any speed really). -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:47 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, I've been following your thread a bit loosely, so I may have misunderstood something. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. All else aside, you expect that for a given server CPU usage will *not* increase with the number of simultaneous requests to the server??? Yoav Shapira Millennium ChemInformatics -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checking Tomcat's Memory
You might also want to try the -Xincgc Enable the incremental garbage collector. The incremental garbage collector, which is off by default, will eliminate occasional garbage-collection pauses during program execution. However, it can lead to a roughly 10% decrease in overall GC performance. switch. The complete docs for the non-standared switches are at: http://java.sun.com/j2se/1.4/docs/tooldocs/windows/java.html -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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: Checking Tomcat's Memory
g isn't valid!?!? Grr... I got that information off of this mailing list, someone was using a similar configuration option that had g for gigabytes... Anyways, thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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] -- 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: Checking Tomcat's Memory
Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- 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] -- 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: Checking Tomcat's Memory
Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject: Checking Tomcat's Memory Greetings! I'm running Tomcat 4.0.4 (w/ JDK 1.4, WinNT/2K) and would like to know how to check Tomcat's memory settings. I've defined an environment variable (in Windows) like so: CATALINA_OPTS=-server -Xms1g -Xmx3g and from reading previous e-mails on this list, this should set the JVM min and max heap size, yet how can I verify this? I'm currently testing a program that takes a considerable amount of memory, and after getting so many thousand requests (and storing a considerable amount of data in memory), the performance becomes horrible (3 to 4 times CPU usage, possibly due to gc looking for more memory?). I suspect the memory settings because when the CPU usage starts to spike, the memory usage tops off and does not appear to go up at all (when it most likely should continue to go up). Suggestions appreciated! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED
RE: Checking Tomcat's Memory
Hi, if you are using jk_nt_service.exe try to modify this property in %CATALINA_HOME%\conf\jk\wrapper.properties: wrapper.cmd_line=$(wrapper.javabin) -Xrs -Djava.security.policy==$(wrapper.tomcat_policy) -Dtomcat.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Then you have to restart the service... HTH Ingo -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 21:08 To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm running Tomcat as a service. I've done echo %CATALINA_OPTS% and set just to make sure the variable is showing up. I'll try putting it in catalina.bat. Not sure why defining it as an environment variable does not work... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 11:57 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still the same, after so many requests (and thus some amount of information stored in memory), Tomcat starts to use up a whole lot of CPU time. I think I hit the memory limit (as I get out of memory errors), so I'm trying to increase the memory Tomcat has, without much luck. I set the environment variable (as I mentioned before), but it does not appear to be working. I stopped and restarted Tomcat after doing this (although I have not restarted Windows) and the results were the same, no change in memory I'm still working on it though, still have a couple more things to try, if anyone has a good suggestions, feel free to chime in! Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:34 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory So, did you get past to your 200 TPS limit goal? -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 10:49 AM To: Tomcat Users List Subject
RE: Checking Tomcat's Memory
Disclaimer: I am not running Tomcat as a service, so I can't confirm that this works. From the mailing list archive at: http://mikal.org/interests/java/tomcat/archive/view?mesg=57410 quote For Tomcat on NT as a service, you can set the -Xms and -Xmx in the registry. Its HKEY_LOCAL_MACHINE\Service\CurrentControlSet\Name of Service\Configuration. You can add new JVM Option Number X (and make sure to increment the JVM Option Count key) to contain the additional parameters. /quote Hope this helps. Shannon Hardt -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:40 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm not using jk_nt_service, although maybe I should if the service Tomcat installs cannot be configured. -Original Message- From: Etienne, Ingo (Goetzfried AG) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:30 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Hi, if you are using jk_nt_service.exe try to modify this property in %CATALINA_HOME%\conf\jk\wrapper.properties: wrapper.cmd_line=$(wrapper.javabin) -Xrs -Djava.security.policy==$(wrapper.tomcat_policy) -Dtomcat.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Then you have to restart the service... HTH Ingo -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 21:08 To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm running Tomcat as a service. I've done echo %CATALINA_OPTS% and set just to make sure the variable is showing up. I'll try putting it in catalina.bat. Not sure why defining it as an environment variable does not work... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 11:57 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think this memory problem is giving me trouble after that. I thought it was a connections problem (I was getting connection errors from the tool), then I thought I had screwed something up in my code (and I've tried different versions, nothing seems to affect performance), then I noticed the memory never went above ~154 MB, so now I'm examining memory issues. My problem is still
RE: Checking Tomcat's Memory
Thanks for the idea, but there isn't a key/directory for HKEY_LOCAL_MACHINE\Service in either WinNT4 or Win2K registry. Not sure what the guy was talking about given the registry path does not exist... -Original Message- From: Hardt, Shannon [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:48 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Disclaimer: I am not running Tomcat as a service, so I can't confirm that this works. From the mailing list archive at: http://mikal.org/interests/java/tomcat/archive/view?mesg=57410 quote For Tomcat on NT as a service, you can set the -Xms and -Xmx in the registry. Its HKEY_LOCAL_MACHINE\Service\CurrentControlSet\Name of Service\Configuration. You can add new JVM Option Number X (and make sure to increment the JVM Option Count key) to contain the additional parameters. /quote Hope this helps. Shannon Hardt -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:40 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm not using jk_nt_service, although maybe I should if the service Tomcat installs cannot be configured. -Original Message- From: Etienne, Ingo (Goetzfried AG) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:30 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Hi, if you are using jk_nt_service.exe try to modify this property in %CATALINA_HOME%\conf\jk\wrapper.properties: wrapper.cmd_line=$(wrapper.javabin) -Xrs -Djava.security.policy==$(wrapper.tomcat_policy) -Dtomcat.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Then you have to restart the service... HTH Ingo -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 21:08 To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm running Tomcat as a service. I've done echo %CATALINA_OPTS% and set just to make sure the variable is showing up. I'll try putting it in catalina.bat. Not sure why defining it as an environment variable does not work... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 11:57 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 11:44 AM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Heh, the answer to that is kind of. I can actually do roughly 250 TPS (at least according to a tool I'm using) for about 10-20 thousand requests, but I think
RE: Checking Tomcat's Memory
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 1:59 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Thanks for the idea, but there isn't a key/directory for HKEY_LOCAL_MACHINE\Service in either WinNT4 or Win2K registry. Not sure what the guy was talking about given the registry path does not exist... -Original Message- From: Hardt, Shannon [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:48 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Disclaimer: I am not running Tomcat as a service, so I can't confirm that this works. From the mailing list archive at: http://mikal.org/interests/java/tomcat/archive/view?mesg=57410 quote For Tomcat on NT as a service, you can set the -Xms and -Xmx in the registry. Its HKEY_LOCAL_MACHINE\Service\CurrentControlSet\Name of Service\Configuration. You can add new JVM Option Number X (and make sure to increment the JVM Option Count key) to contain the additional parameters. /quote Hope this helps. Shannon Hardt -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:40 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm not using jk_nt_service, although maybe I should if the service Tomcat installs cannot be configured. -Original Message- From: Etienne, Ingo (Goetzfried AG) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:30 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Hi, if you are using jk_nt_service.exe try to modify this property in %CATALINA_HOME%\conf\jk\wrapper.properties: wrapper.cmd_line=$(wrapper.javabin) -Xrs -Djava.security.policy==$(wrapper.tomcat_policy) -Dtomcat.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Then you have to restart the service... HTH Ingo -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 21:08 To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm running Tomcat as a service. I've done echo %CATALINA_OPTS% and set just to make sure the variable is showing up. I'll try putting it in catalina.bat. Not sure why defining it as an environment variable does not work... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 11:57 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid memory increment. From the sun web site: -Xmsn Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 2MB. Examples: -Xms6291456 -Xms6144k -Xms6m -Xmxn Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. Examples: -Xmx83886080 -Xmx81920k -Xmx80m -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15
RE: Checking Tomcat's Memory
Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 1:59 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Thanks for the idea, but there isn't a key/directory for HKEY_LOCAL_MACHINE\Service in either WinNT4 or Win2K registry. Not sure what the guy was talking about given the registry path does not exist... -Original Message- From: Hardt, Shannon [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:48 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Disclaimer: I am not running Tomcat as a service, so I can't confirm that this works. From the mailing list archive at: http://mikal.org/interests/java/tomcat/archive/view?mesg=57410 quote For Tomcat on NT as a service, you can set the -Xms and -Xmx in the registry. Its HKEY_LOCAL_MACHINE\Service\CurrentControlSet\Name of Service\Configuration. You can add new JVM Option Number X (and make sure to increment the JVM Option Count key) to contain the additional parameters. /quote Hope this helps. Shannon Hardt -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:40 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm not using jk_nt_service, although maybe I should if the service Tomcat installs cannot be configured. -Original Message- From: Etienne, Ingo (Goetzfried AG) [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:30 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Hi, if you are using jk_nt_service.exe try to modify this property in %CATALINA_HOME%\conf\jk\wrapper.properties: wrapper.cmd_line=$(wrapper.javabin) -Xrs -Djava.security.policy==$(wrapper.tomcat_policy) -Dtomcat.home=$(wrapper.tomcat_home) -classpath $(wrapper.class_path) $(wrapper.startup_class) -config $(wrapper.server_xml) start Then you have to restart the service... HTH Ingo -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 15. August 2002 21:08 To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory I'm running Tomcat as a service. I've done echo %CATALINA_OPTS% and set just to make sure the variable is showing up. I'll try putting it in catalina.bat. Not sure why defining it as an environment variable does not work... -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 11:57 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory Hi, On unix, we put our CATALINA_OPTS settings in $CATALINA_HOME/bin/catalina.sh. Are you running tomcat as a service on NT or from the command line? If you're running from the command line, can you do echo %CATALINA_OPTS% before starting tomcat and verify the values are set correctly? Regardless of the above, I would try putting CATALINA_OPTS in catalina.bat. Can't hurt ;) Yoav Shapira Millennium ChemInformatics -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 2:49 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Alright, new environment variable... CATALINA_OPTS=-server -Xms1024m -Xmx3072m Should give me a range of 1-3 gigs. When I restart Tomcat, however, this doesn't appear to affect anything. I'm running a simple memory servlet, as suggested by Yoav Shapira, to simply create a whole bunch of memory, but it still caps out as if it were using the defaults. Couple questions: 1) Must I restart the machine for the CATALINA_OPTS to take effect (or, what is wrong with my environment variable)? In my experience this has not been necessary, only restart the application/process. (Maybe this is a WinNT4 quirk or something similar). 2) Tomcat's configuration files most likely support what I'm trying to do. Is there an appropriate/recommended place I define this envirnoment variable? Quick config rundown: JDK 1.4, WinNT4 (or 2K), Tomcat 4.0.4. Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:51 AM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory g doesn't seem to be a valid
RE: Checking Tomcat's Memory
I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Checking Tomcat's Memory
Sun's 1.4 server (not client) JVM can use a 4GB heap on a 64-bit SPARC box. Otherwise, I think you're pretty much stuck at 2GB. How much physical memory and swap space is installed? How much is actually available for allocation to the JVM when Tomcat gets kicked off? I also tend to adjust some of the other options. Something typical (for 1.3, some things have changed for 1.4) might be: -Xms512m -Xmx512m -XX:MaxPermSize=96m -XX:NewSize=128m -XX:MaxNewSize=128m -XX:SurvivorRatio=8 I certainly don't claim that those numbers are generally optimal, but changing them from their defaults can provide dramatic results. A certain commercial app server I've used would just up die until things were tweaked out a bit - YMMV. This might also be of interest (for Sun JVMs anyway): http://java.sun.com/docs/hotspot/index.html Sexton, George wrote: I really doubt it. I seem to recall that for Windows 32 bit applications the maximum address space of an application is 2GB. I would try reducing the second parameter to below 2GB and see what happens. I'm sure Sun has some boxes that could do this... -Original Message- From: Marinko, Jeff [mailto:[EMAIL PROTECTED]] Sent: 15 August, 2002 3:28 PM To: 'Tomcat Users List' Subject: RE: Checking Tomcat's Memory Ah, there it is! So I would add additional JVM Option Number X with the -server, -Xms, -Xmx parameters and change JVM Option Count to account for this. I've managed to change the VM heap size through editing the catalina.bat script, however I get the following: Error occurred during initialization of VM Could not reserve enough space for object heap when I try to set my parameters at -Xms1024m -Xmx3072m (currently running at 128m and 1024m). Are there any VMs out there that can handle this kind of memory (1+ gigs to start)? Thanks! -Original Message- From: Sexton, George [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 1:20 PM To: Tomcat Users List Subject: RE: Checking Tomcat's Memory HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName\Parameter s -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ smime.p7s Description: S/MIME Cryptographic Signature