Hi,
I have tested with the following instruction given by Henning, and
compered the results with ofbiz release 4.0 and it seems that my application
is working fine locally,
But my problem persists online and in my online application i am having.
Application is running on linux i836
With 2gb of ram
And
my java consumes 30 to 40 % of memory normally and mySQL consumes 7.9 % of
memory.
Some times the CPU usage goes upto 150 % and hangs up the server and java
consumes more than 60% memory.
Can anybody tell me what might be the reason.?
i have compared with the same such kind of apps deployed on vps they
consumes 2 to 4 % of memory for MySQL but this apps consumes 7.9% of memory.
Might be it is the problem
If yes please, guide so that i can work on this.
Please...
With regards,
S K Pradeep kumar
On Sun, Jul 26, 2009 at 9:15 PM, Henning <[email protected]> wrote:
> Operating a Java Server on a VPS requires some tweaking. First of all
> you should check the current memory consumption in your scenario using,
> for example, jconsole (which is part of the JDK since 1.5). In order to
> connect to a running jconsole instance, you should some JMX system
> properties, e.g.
>
> -Dcom.sun.management.config.file=management.properties
>
> and put a management.properties file in your ofbiz folder (next to
> startofbiz.sh) that looks like this:
>
> com.sun.management.jmxremote=true
> com.sun.management.jmxremote.port=7777
> com.sun.management.jmxremote.ssl=false
> com.sun.management.jmxremote.authenticate=false
>
> (assuming you are using the SUN JDKs).
>
> Note: this should never be used in production as the JMX access is
> completely unsecured this way!
>
> With the config above, you can connect via
>
> jconsole localhost:7777
>
> Now run your load test or simulate your scenario and check the memory
> data in jconsole. Trigger a few GC's.
>
> Check the various memory regions by going to the "Memory" tab or
> directly to MBeans --> java.lang --> MemoryPool.
>
> In my experience in particular the CodeCache pool is very much oversized
> and the SUN JVM allocates rather large chunks of memory here. Which is
> normally not a problem, but VPS's tend to have very tight virtual memory
> quotas (which seems really unnecessary).
>
> Anyway, in order to redruce memory consumption, you should limit heap,
> perm space, code cache, using the VM settings
>
> -Xms<heap>M -Xmx<heap>M -XX:ReservedCodeCacheSize=<cc>m
> -XX:MaxPermSize=<perm>m
>
> where <heap>,<cc>,<perm> are placeholders for your settings.
>
> While <perm> and <cc> should not change dramatically after your scenario
> has run (so add a little on top of your measurements), the heap size
> will also have
> to reflect user session memory (so add some more. No idea how big a
> session in ofbiz gets in the end).
>
> Good luck,
> Henning
>
>
>
> Am Samstag, den 25.07.2009, 14:51 +0530 schrieb S K Pradeep Kumar:
>
> > Hi All,
> >
> > We have deployed the ofbiz with tomcat on VPS server.
> > It is creating too many dummy sessions and consuming loot of memory.
> > Could you please help in this.
> > What might be the reason?
> > How can we customize the application to reduce memory consumption?
> >
>
--
With regards,
S K Pradeep kumar