Fixed
Details
Assignee
Guus der KinderenGuus der KinderenReporter
Guus der KinderenGuus der KinderenFix versions
Priority
Critical
Details
Details
Assignee
Guus der Kinderen
Guus der KinderenReporter
Guus der Kinderen
Guus der KinderenFix versions
Priority
Created February 1, 2013 at 8:02 PM
Updated February 1, 2013 at 9:29 PM
Resolved February 1, 2013 at 9:29 PM
Over the last few weeks, we've noticed that the CPUs of the server that run the XMPP domain on igniterealtime.org spike.
In several thread dumps, it appears that a number of threads are busy updating a hashmap in the class IQPEPHandler. One (of many) example of such a thread is this one:
In a heap dump, I found that this map was almost 10MB in size (holding only textual data).
Given the above, it appears that this map is misused.
When looking at the code, it becomes clear that the map is intended to be a cache that holds all presence from all JIDs on domains other than the local domain. This in itself is a travesty - apart from the fact that the data will never be complete and up-to-date, an attempt to maintain such a cache easily consumes to much resources (the CPU spikes being a symptom of this).
The cache should be removed.