Projects tigase _server server-core Issues #1158
Establishing JMX connection to the server causes excessive memory allocation (#1158)
Won't Fix
wojciech.kapcia@tigase.net opened 4 years ago

Reported on github: https://github.com/tigase/tigase-server/issues/35

After quick test it turned out that this allocation starts and happens only after connecting JMX client (I checked HEAP memory usage using YourKit running in parallel and after startup Tigase maintained ~35M memory usage until VisualVM connected over JMX)

wojciech.kapcia@tigase.net commented 4 years ago

Turns out "it's not a bug, it's a feature". In a nutshell, JMX causes quite excessive allocation, (and it's a known problem and it's especially visible with VisualVM (with which we end up with constant 10k/s objects allocations). The recommendations are: decrease pooling interval (doesn't help that much with VisualVM) or use other tools (YouTrack operates in native memory and doesn't impact heap in this case)

In the attached screenshot:

  1. start jconsole
  2. start visualvm
  3. stop visualvm
  4. start tigase-monitor (which triggered GC)
  5. start visualvm
  6. stop visualvm

In conclusion - using jconsole or tigase-monitor impacts (memory) metrics the least and this increased memory usage has to be taken into consideration when monitoring using JMX. (Alternatives like prometheous #issue #1034 might be better here and could possibly be considered in the context of Cangaroo and it's monitoring (#kangaroo-29) ; there is a JavaFlightRecorder, which is supposedly low-impact monitoring solution, but the tooling around it is not great)

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Version
tigase-server-8.2.0
Spent time
5h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1158
Please wait...
Page is in error, reload to recover