You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Dmitrijs Litajevs <dm...@balticom.eu> on 2013/06/17 10:12:01 UTC

Memory managment

Hello.
I have a long running statefull bean.
It does a lot of calculaton and database interaction via JPA.
The problem is that the server does not use all available memory.
Is it a configuration problem ?

Tomee version apache-tomee-1.6.0-20130604.041138-90-plus

my setenv.bat:
set JRE_HOME=d:\tools\jre6u43
set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
-Dcom.sun.management.jmxremote.port=8086
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

[image: Inline image 2]

[image: Inline image 3]

Re: Memory managment

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
Looks like it is a eclipse link problem again.
I reved shared cache.
Added  @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) to
select queries.
And called manager.clear(); on the end of every select query.

Then the processes started working as fast as it was before.



On Mon, Jun 17, 2013 at 11:57 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> hmm, weird, can you share more details or even a project?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > No I don't get an OutOfMemory error.
> > I don't think that it does not need any more memory. I use the same code
> on
> > glassfish and my process is running in 5 to 15 minutes. But on tomee It
> > takes up to 12 - 15 hours.
> > Because I am stuck in garbage collection.
> >
> >
> > On Mon, Jun 17, 2013 at 11:44 AM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > Hmm, do you get an OutOfMemory or any error?
> > >
> > > Maybe you just don't need more memory?
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> > >
> > > > Maybe there are some per thread limitations that can be changed ?
> > > >
> > > > http://imgur.com/a/NGlEq
> > > >
> > > >
> > > > On Mon, Jun 17, 2013 at 11:27 AM, Romain Manni-Bucau
> > > > <rm...@gmail.com>wrote:
> > > >
> > > > > Hi
> > > > >
> > > > > i can't see your picts, maybe upload them somewhere else
> > > > >
> > > > > btw there is nothing more than standard java regarding memory
> > > management
> > > > in
> > > > > tomee.
> > > > >
> > > > > *Romain Manni-Bucau*
> > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > > http://rmannibucau.wordpress.com/>
> > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > > *Github: https://github.com/rmannibucau*
> > > > >
> > > > >
> > > > >
> > > > > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> > > > >
> > > > > > Hello.
> > > > > > I have a long running statefull bean.
> > > > > > It does a lot of calculaton and database interaction via JPA.
> > > > > > The problem is that the server does not use all available memory.
> > > > > > Is it a configuration problem ?
> > > > > >
> > > > > > Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
> > > > > >
> > > > > > my setenv.bat:
> > > > > > set JRE_HOME=d:\tools\jre6u43
> > > > > > set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> > > > > > -Dcom.sun.management.jmxremote.port=8086
> > > > > > -Dcom.sun.management.jmxremote.ssl=false
> > > > > > -Dcom.sun.management.jmxremote.authenticate=false
> > > > > >
> > > > > > [image: Inline image 2]
> > > > > >
> > > > > > [image: Inline image 3]
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Memory managment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
hmm, weird, can you share more details or even a project?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>

> No I don't get an OutOfMemory error.
> I don't think that it does not need any more memory. I use the same code on
> glassfish and my process is running in 5 to 15 minutes. But on tomee It
> takes up to 12 - 15 hours.
> Because I am stuck in garbage collection.
>
>
> On Mon, Jun 17, 2013 at 11:44 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > Hmm, do you get an OutOfMemory or any error?
> >
> > Maybe you just don't need more memory?
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> >
> > > Maybe there are some per thread limitations that can be changed ?
> > >
> > > http://imgur.com/a/NGlEq
> > >
> > >
> > > On Mon, Jun 17, 2013 at 11:27 AM, Romain Manni-Bucau
> > > <rm...@gmail.com>wrote:
> > >
> > > > Hi
> > > >
> > > > i can't see your picts, maybe upload them somewhere else
> > > >
> > > > btw there is nothing more than standard java regarding memory
> > management
> > > in
> > > > tomee.
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > > http://rmannibucau.wordpress.com/>
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> > > >
> > > > > Hello.
> > > > > I have a long running statefull bean.
> > > > > It does a lot of calculaton and database interaction via JPA.
> > > > > The problem is that the server does not use all available memory.
> > > > > Is it a configuration problem ?
> > > > >
> > > > > Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
> > > > >
> > > > > my setenv.bat:
> > > > > set JRE_HOME=d:\tools\jre6u43
> > > > > set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> > > > > -Dcom.sun.management.jmxremote.port=8086
> > > > > -Dcom.sun.management.jmxremote.ssl=false
> > > > > -Dcom.sun.management.jmxremote.authenticate=false
> > > > >
> > > > > [image: Inline image 2]
> > > > >
> > > > > [image: Inline image 3]
> > > > >
> > > >
> > >
> >
>

Re: Memory managment

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
No I don't get an OutOfMemory error.
I don't think that it does not need any more memory. I use the same code on
glassfish and my process is running in 5 to 15 minutes. But on tomee It
takes up to 12 - 15 hours.
Because I am stuck in garbage collection.


On Mon, Jun 17, 2013 at 11:44 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> Hmm, do you get an OutOfMemory or any error?
>
> Maybe you just don't need more memory?
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > Maybe there are some per thread limitations that can be changed ?
> >
> > http://imgur.com/a/NGlEq
> >
> >
> > On Mon, Jun 17, 2013 at 11:27 AM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> > > Hi
> > >
> > > i can't see your picts, maybe upload them somewhere else
> > >
> > > btw there is nothing more than standard java regarding memory
> management
> > in
> > > tomee.
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog: **http://rmannibucau.wordpress.com/*<
> > > http://rmannibucau.wordpress.com/>
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> > >
> > > > Hello.
> > > > I have a long running statefull bean.
> > > > It does a lot of calculaton and database interaction via JPA.
> > > > The problem is that the server does not use all available memory.
> > > > Is it a configuration problem ?
> > > >
> > > > Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
> > > >
> > > > my setenv.bat:
> > > > set JRE_HOME=d:\tools\jre6u43
> > > > set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> > > > -Dcom.sun.management.jmxremote.port=8086
> > > > -Dcom.sun.management.jmxremote.ssl=false
> > > > -Dcom.sun.management.jmxremote.authenticate=false
> > > >
> > > > [image: Inline image 2]
> > > >
> > > > [image: Inline image 3]
> > > >
> > >
> >
>

Re: Memory managment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm, do you get an OutOfMemory or any error?

Maybe you just don't need more memory?

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>

> Maybe there are some per thread limitations that can be changed ?
>
> http://imgur.com/a/NGlEq
>
>
> On Mon, Jun 17, 2013 at 11:27 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
> > Hi
> >
> > i can't see your picts, maybe upload them somewhere else
> >
> > btw there is nothing more than standard java regarding memory management
> in
> > tomee.
> >
> > *Romain Manni-Bucau*
> > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > *Blog: **http://rmannibucau.wordpress.com/*<
> > http://rmannibucau.wordpress.com/>
> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > *Github: https://github.com/rmannibucau*
> >
> >
> >
> > 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
> >
> > > Hello.
> > > I have a long running statefull bean.
> > > It does a lot of calculaton and database interaction via JPA.
> > > The problem is that the server does not use all available memory.
> > > Is it a configuration problem ?
> > >
> > > Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
> > >
> > > my setenv.bat:
> > > set JRE_HOME=d:\tools\jre6u43
> > > set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> > > -Dcom.sun.management.jmxremote.port=8086
> > > -Dcom.sun.management.jmxremote.ssl=false
> > > -Dcom.sun.management.jmxremote.authenticate=false
> > >
> > > [image: Inline image 2]
> > >
> > > [image: Inline image 3]
> > >
> >
>

Re: Memory managment

Posted by Dmitrijs Litajevs <dm...@balticom.eu>.
Maybe there are some per thread limitations that can be changed ?

http://imgur.com/a/NGlEq


On Mon, Jun 17, 2013 at 11:27 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:

> Hi
>
> i can't see your picts, maybe upload them somewhere else
>
> btw there is nothing more than standard java regarding memory management in
> tomee.
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<
> http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>
>
> > Hello.
> > I have a long running statefull bean.
> > It does a lot of calculaton and database interaction via JPA.
> > The problem is that the server does not use all available memory.
> > Is it a configuration problem ?
> >
> > Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
> >
> > my setenv.bat:
> > set JRE_HOME=d:\tools\jre6u43
> > set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> > -Dcom.sun.management.jmxremote.port=8086
> > -Dcom.sun.management.jmxremote.ssl=false
> > -Dcom.sun.management.jmxremote.authenticate=false
> >
> > [image: Inline image 2]
> >
> > [image: Inline image 3]
> >
>

Re: Memory managment

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

i can't see your picts, maybe upload them somewhere else

btw there is nothing more than standard java regarding memory management in
tomee.

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/6/17 Dmitrijs Litajevs <dm...@balticom.eu>

> Hello.
> I have a long running statefull bean.
> It does a lot of calculaton and database interaction via JPA.
> The problem is that the server does not use all available memory.
> Is it a configuration problem ?
>
> Tomee version apache-tomee-1.6.0-20130604.041138-90-plus
>
> my setenv.bat:
> set JRE_HOME=d:\tools\jre6u43
> set CATALINA_OPTS=-XX:MaxPermSize=256m -Xmx1200m -Xms1200m
> -Dcom.sun.management.jmxremote.port=8086
> -Dcom.sun.management.jmxremote.ssl=false
> -Dcom.sun.management.jmxremote.authenticate=false
>
> [image: Inline image 2]
>
> [image: Inline image 3]
>