Is it possible to reducing heap consumed by JAR.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to reducing heap consumed by JAR.

Luke B
Hi,

It is not clear how related this is to jetty.

I have noticed that jetty seems to unpack a war into a folder and then some class loader looks to read those jar files (this is all fine). What I have noticed though is for each jar file a bit of heap memory is used.

It looks like a ZipFile$Source is held open and it hangs on to memory for every jar file that is in the war file. The amount consumed seems to be proportional to the size of the jar.

Have you noticed this or ever looked into this? Is it possible to prevent the JVM from doing this?

Many thanks

-Luke

_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to reducing heap consumed by JAR.

Simone Bordet-3
Luke,

On Thu, Nov 7, 2019 at 10:59 PM Luke B <[hidden email]> wrote:

>
> Hi,
>
> It is not clear how related this is to jetty.
>
> I have noticed that jetty seems to unpack a war into a folder and then some class loader looks to read those jar files (this is all fine). What I have noticed though is for each jar file a bit of heap memory is used.
>
> It looks like a ZipFile$Source is held open and it hangs on to memory for every jar file that is in the war file. The amount consumed seems to be proportional to the size of the jar.
>
> Have you noticed this or ever looked into this? Is it possible to prevent the JVM from doing this?

Did not notice, but did not look too hard.

Please open an issue and add what Jetty version, what OS, if you use
containers, possibly the heap dump, or a reproducer that would help us
with the diagnosis.
Thanks!

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.
_______________________________________________
jetty-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-users