Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jsp-impl Apache vs. Glassfish - BIG memory difference

metadata-complete has no effect on what gets scanned, all classes will still be scanned.
metadata-complete was added back during the early days of annotations and discovery, but the servlet spec has progressed to a point where this attribute no longer has the original meaning.

now there are parts of the servlet spec infrastructure that have to be scanned in order to work properly.
take, for example, the role of ServletContainerInitializer's.
most 3rd party libraries have SCI's now, and rely on them.
the mere existence of a single one means you have to scan all classes to satisfy the requirements of a ServletContainerInitializer.


Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, Aug 28, 2015 at 8:36 AM, Ciprian Hacman <ciprian.hacman@xxxxxxxxxxxx> wrote:
I think you might be right about the amount of classes in your webapp, Joakim. One of the guys from the Java team had the same feeling.
Not 100% sure if this is the only reason we are seeing this huge memory usage, but we ran out of ideas and the solution we found below is acceptable for us.

We just modified the web.xml file by adding metadata-complete="true" to disable scanning of discoverable annotations. Memory usage is close to what we had when annotations were disabled.

Thanks,
Ciprian

On Fri, Aug 28, 2015 at 4:52 PM, Joakim Erdfelt <joakim@xxxxxxxxxxx> wrote:
The annotation module is for bytecode scanning all of your WEB-INF/lib and WEB-INF/classes content.
Used to find various bits and bobs related to Servlet 3.x initialization.
Used by class annotations (like @Servlet, @Filter, @HandlesType etc), and reference tree construction (eg: types referenced in ServletContainerInitializer's).

If you have 1.5GB of memory used for your annotation scanning you must have a stupendous amount of classes in your webapp.



Joakim Erdfelt / joakim@xxxxxxxxxxx

On Fri, Aug 28, 2015 at 6:33 AM, Ciprian Hacman <ciprian.hacman@xxxxxxxxxxxx> wrote:
Unfortunately, the RES Size is not a mistake.
I was hoping to get some feedback from someone with more knowledge about the annotation module in Jetty, so that I don't have to debug using a native profiler. I never tried it on Java programs.

Thanks,
Ciprian

On Fri, Aug 28, 2015 at 4:17 PM, Christoph Läubrich <laeubi@xxxxxxxxxxxxxx> wrote:
Maybe it is the just a misleading output of the RES Size? If not all you can do is attach a native profiler to the JVM process, maybe it resides in some kind of native code (dll/so)... this is not covered by NMT afaik.

Am 28.08.2015 13:32, schrieb Ciprian Hacman:
Hi Christoph,

I also enabled the detailed data, and the reports are very similar. As I said, this extra memory doesn't seem to be tracked by NMT.
If you look at the summary, it says that it is only 1.1GB of committed memory, which mean the RES size should be below that, like when annotations are disabled.

Full GC doesn't help, again because this memory is off-heap.

The summaries from the previous emails were generated immediately after restarting the Jetty (waited for the server to accept requests).
This is a production environment, so we restart Jetty only when deploying bug fixes.

Ciprian


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top