tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63361] New: Provide a configuration option to disable MBean registration
Date Thu, 18 Apr 2019 09:00:47 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63361

            Bug ID: 63361
           Summary: Provide a configuration option to disable MBean
                    registration
           Product: Tomcat 9
           Version: 9.0.x
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Util
          Assignee: dev@tomcat.apache.org
          Reporter: awilkinson@pivotal.io
  Target Milestone: -----

We use Tomcat as the default embedded Servlet container in Spring Boot. Some of
our users make use of Tomcat's MBeans but, from what we've seen, the majority
of them do not. That's led us to look at the cost of having the MBeans
registered by default to see if we can reduce it for users who do not use them. 

One cost is in increased startup time. We've mitigated this by creating an
MBeanFactory instance in a separate thread. This causes the MBean XML to be
loaded in parallel to the rest of startup which significantly reduces the
noticeable effect of the unwanted processing.

The other cost is in increased memory usage. We've tried to find a way to
reduce this but have been unable to do so without resorting to reflection. In
the reflection-based approach we replace the Registry instance held by
org.apache.tomcat.util.modeler.Registry with a custom sub-class that no-ops all
of its methods. This hack sees a ~2MB reduction in heap usage. An app that
previously required -Xmx9M to start is able to start with -Xmx7M.

We'd greatly appreciate a configuration option in Tomcat that allowed MBean
registration to be disabled programatically without resorting to reflective
hacks. If the Tomcat community agree that this is a worthwhile enhancement, I
would be happy to contribute something once an approach has been agreed upon.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message