felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FELIX-5394) Memoryusage plugin creates a heap dump on every notification
Date Wed, 09 Nov 2016 09:58:59 GMT

    [ https://issues.apache.org/jira/browse/FELIX-5394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15650513#comment-15650513
] 

Felix Meschberger commented on FELIX-5394:
------------------------------------------

On rethought and some discussions, it might probably be worth while extending the memory plugin
as follows:

* Allow to set thresholds for each of the events separately, where zero means the plugin should
*not* change any current threshold
* Allow to configure whether to dump heap on either or both of the events or to not dump at
all

Possible UI:

{code}
+---------------+---------------+---------------+
| Mem Threshold | <value input> | ☐ dump heap ? |
+---------------+---------------+---------------+
| Snapshot Th.  | <value input> | ☐ dump heap ? |
+---------------+---------------+---------------+
{code}

In addition dumping heap should be limited more flexibly:

* dump only if last dump is more than some amount of time in the past (as today)
* dump if nth event within an amount of time (e.g. dump if 3rd event within an hour)

> Memoryusage plugin creates a heap dump on every notification
> ------------------------------------------------------------
>
>                 Key: FELIX-5394
>                 URL: https://issues.apache.org/jira/browse/FELIX-5394
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>    Affects Versions: webconsole-memoryusage-plugin-1.0.6
>            Reporter: Alex Parvulescu
>              Labels: patch-available
>         Attachments: FELIX-5394-v0.patch
>
>
> As a part of OAK-4966 I'm trying to install a listener on available memory with a notification
when a certain available memory threshold is met [0]. This seems to clash a bit with the current
{{memoryusage}} plugin, as both jmx listeners try to change the threshold for the notification,
and subsequently both might receive the notification at a different value than expected. (for
example I'm setting a notification at {{15%}} and even though the {{memoryusage}} plugin is
not used and is currently set at {{0%}} it will still create a heap dump:
> {noformat}
> *WARN* [Service Thread] org.apache.felix.webconsole.plugins.memoryusage Received Memory
Threshold Exceeded Notification, dumping Heap
> {noformat}
> I have 2 suggestions:
> * first is to _not_ change the threshold value if it's already set at a smaller value.
this means the plugin will not break other listeners expectations of receiving an event
>  
> * second is to verify the locally set threshold value against the values seen at notification
time. this effectively means the plugin is free to ignore certain events, and not dump the
heap to disk every time it gets a ping [1].
> I would like to provide a patch for this issue pretty soon as I really need to fix OAK-4966,
unless someone is more eager to come up with a working solution.
> [0] https://issues.apache.org/jira/browse/OAK-4966?focusedCommentId=15629253&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15629253
> [1] https://github.com/apache/felix/blob/trunk/webconsole-plugins/memoryusage/src/main/java/org/apache/felix/webconsole/plugins/memoryusage/internal/MemoryUsageSupport.java#L553



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message