[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [aspectj-users] OutOfMemryError LTW
|
Eric,
We don't yet have a good rule of thumb
for estimating the heap size necessary to use LTW because it can vary dramatically
between different environments. Ron has had a lot of experience with large
systems and as a result I would recommend doubling your heap size
at least. While we will always need more heap than a vanilla system we
are aware that we are probably using and retaining more memory than necessary
and are working with users like Ron to reduce it.
Cheers
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
Please respond to aspectj-users@xxxxxxxxxxx
Sent by:
aspectj-users-bounces@xxxxxxxxxxx
To:
aspectj-users@xxxxxxxxxxx
cc:
Subject:
RE: [aspectj-users]
OutOfMemryError LTW
Wow, that does chew up quite a bit of memory.
How are you able to estimate the size of the heap thats required? I usually
hit errors when I try enable both LTW and a profiler like Netbeans Profiler
because both javaagents are trying to hotswap classes
Ron Bodkin <rbodkin@xxxxxxxxxxxxxx> wrote:
Hi Eric,
AspectJ load-time weaving is
still quite memory intensive although it has improved a lot since 1.5.0.
For example, I found that starting Tomcat with some small applications
without AspectJ load-time weaving requires 11mb of heap and 18 mb of non-heap
memory. If I deploy a development version of Glassbox with AspectJ 1.5.2
rc1, it requires 41 mb of heap and 23 mb of non-heap memory. (*)
In the meanwhile, one technique
you can use to limit memory use by the weaver is to use the include type
patterns to only weave into code you need to affect. E.g., if you have
an application specific aspect, if you add <include within=â€com.myco.myapp..*â€/>
to your META-INF/aop.xml then you should find a much lower memory overhead.
(*) I am working on two ideas
for improving this situation:
* The patch submitted with
AspectJ enhancement #148773 reduces the heap required to 33 mb
* Allowing loading common aspect
definitions once per system instead of many times with many copies. Memory
profiles show me that most of the overhead is pinned by having 10 copies
of the weaving definitions one for each ClassLoader affected. This could
also reduce the time overhead for weaving, too. The tricky part about doing
this is to support nondelegating ClassLoaders that provide a different
definition of parent types.
Hope that Helps,
Ron
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Erc Crahen
Sent: Tuesday, June 27, 2006 12:42 AM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] OutOfMemryError LTW
When using the load time weaving
agent, I'm runing into OutOfMemory errors. I think that it could be that
some of my classes refer to so many other classes that the bytecode intrumentation
pieces are running of heap weaving the aspects.
Is there any debugging or anything I can do to confirm this? Or aleviate
it? I have a 96M heap which is plenty when the app runs w/o weaving on...
- Eric
Want to be your own boss? Learn
how on Yahoo!
Small Business.
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
- Eric
How low will we go? Check out Yahoo!
Messenger’s low PC-to-Phone
call rates._______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users