Hi Stefano, Thanks for replying.
1. I agree, the goal for using free was to show that after stopping James about 7GB was now available to the OS. The PS command showed James as using about 95% of the available memory. 2. I agree 3 and 4.: Based on your remark, I don't understand how Java gets access to so much memory. java version "1.5.0_15" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode) Would you recommend we move to JDK 6? We are using james-server.sh to keep James running and we are using the default -Xmx, how does one find out the default Xmx the JVM is using? 5. From the URL http://java.sun.com/developer/technicalArticles/Programming/HPROF.html It appears we should use javac -J-agentlib:hprof=heap=dump jamesClassName or javac -J-agentlib:hprof=heap=sites jamesClassName What james Class Name should we use in this command to do the dump or continual profiling? OR Do you recommend a better command to find the Heap details? 6. If one of our mailets throws exceptions that were not caught, could that cause the problem? Rgds >>Re: James uses up almost all the memory any suggestions Stefano Bagnara Thu, 21 Aug 2008 00:21:33 -0700 Hillel Bilman ha scritto: Hi, We are using james-2.3.1 on Linux 64 bit Redhat with 8GB of RAM. Using free: total used free shared buffers cached Mem: 8174276 8129120 45156 0 2696 42560 -/+ buffers/cache: 8083864 90412 Swap: 16386248 8255480 8130768 We stopped James and now there is 7856744 memory available. This means the server starts to go slowly. Using free: total used free shared buffers cached Mem: 8174276 374404 7799872 0 3500 53372 -/+ buffers/cache: 317532 7856744 Swap: 16386248 915912 15470336 If one of our mailets throws an exception could that cause it? Why does this happen? How can we prevent it? > 1st: memory consumption for a linux tool is not measured with "free". Free tells you the memory used by the operating system as a whole. Please check the memory with "ps", first and tell us what you see. 2nd: it is the normal behaviour for linux to use all of the memory you have because it uses the free memory as a cache when it understand it is not used by programs. 3rd: a java program will never use 8GB unless you configured java to use so much memory. The default Xmx (maximum heap size) for a java program depends on the JVM and the platform but I guess it never is more than 256MB, so if you didn't alter the Xmx manually it is impossible for james to use 8gb. 4th: whenever you set a larger -Xmx then java will be allowed to use more memory and in case it will need once the memory will be allocated by java and never returned to the OS. 5th: you can get an heap dump from the james jvm just before stopping it to understand what there is in the JVM memory ("jheap" if you are on a recent jvm). I guess there's a lot for you to think and reply before I go on with more points. Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
