Heap Memory usage hunting

So my server has been running out of memory even though I’ve given it 1.5 Gb of heap.

I forced a dump and Eclipse is showing me :

132 instances of SocketSessionImpl occupy 312 MB and at least some of the instances take up 21MB

Digging down into these there is a concurrentLinkedQueue with a concurrentLinkedQueue$Node which links to another concurrentLinkedQueue$Node which links to another … for quite some time - obviously this is kinda expected each node in itself is fairly small but there appear to be rather a lot of them.

What is it that is in these nodes ? and what can I do to reduce the size of each of these session objects ?

I suppose I should add running Sun Java 1.5 Openfire 3.8.2 running on Linux. There are currently 450 users all of whom belong to multiple groups but one of the groups has every member in it. Predominant use is of MUC’s of which there are 41. PEP & Pub Sub is disabled.

java 5? eek! maybe wait for an openfire guru… but… even the pre-packaged openfire 3.8.2 comes with at least java 6… i could be mistaken, but i think they are even using java 7 now.

I tried it with Java 7 and there were real stability issues so I dropped back to 5 which I’d been running for some time with no problems

hmm… well, i’m not saying it’s your problem… but i do know that java 6 had massive improvements to garbage collection, as well as a lot of other performance-focuses improvements. Not to mention JIT has been improved in both 6 and 7, etc. So, in theory anyways, Java 6 or 7 should outperform a java 5 setup.

I think I was more in shock that someone is still using java 5 on brand new installations!