Closed ghost closed 9 years ago
Did another experiment. Started the above peer on a vanilla Ubuntu Server workstation, left it alone for 72 hours, without ever connecting to the peer. Memory usage is at 198 MB after 72 hours.
This is the aggregated allocation made by the JVM running the above code, and nothing but that ( except for maven and its exec:java plugin ) for 25 hours. IMHO this should, fairly quickly after launch, level out; alas, it doesn't. Where is the leak ?
I'm running some tests now and checking with VisualVM the memory usage. I did not run it for too long, but I could not clearly observe a memory leak. After a GC, it goes down to ~6MB. I'm running it with -Xmx32M to see if it will fail with OutOfMemory Exception. The graph goes slightly up, so there may be a very slow leak.
I'll let my test run for a while, and post a new graph.
Do you run the test with a high -Xmx? If so, can you set it to something lower. Java's GC does not kick in if there is plenty of memory available.
No, I don't set -Xms and -Xmx at all. GC kicks in about every 700 seconds on the completely idle Peer.
Fortuna audaces adiuvat - hos solos ?
On 16 February 2015 at 21:01, Thomas Bocek notifications@github.com wrote:
Do you run the test with a high -Xmx? If so, can you set it to something lower. Java's GC does not kick in if there is plenty of memory available.
— Reply to this email directly or view it on GitHub https://github.com/tomp2p/TomP2P/issues/86#issuecomment-74564473.
After one hour and constantly putting a value, I could not observe a memory leak. I was running net.tomp2p.dht.TestSinglePeer
Can you try with -Xmx32 to see if you get an OutOfMemoryException?
Running now. Will report back tomorrow.
Fortuna audaces adiuvat - hos solos ?
On 16 February 2015 at 22:30, Thomas Bocek notifications@github.com wrote:
Can you try with -Xmx32 to see if you get an OutOfMemoryException?
— Reply to this email directly or view it on GitHub https://github.com/tomp2p/TomP2P/issues/86#issuecomment-74575361.
@exercitussolus any news on this issue?
Yes, sorry for not giving feedback earlier ( work overload here ).
It turns out that, as I made TomP2P run inside the Maven exec plugin, what I discovered is a real memory leak, very much so - though not one of TomP2P. It is a Maven exec plugin problem.
Eight days of continuously running TestSinglePeer outside of Maven exec did not produce an OutOfMemoryException, in fact memory usage remained constant as per your observation. I think you may consider this one resolved :-)
Fortuna audaces adiuvat - hos solos ?
On 9 April 2015 at 13:33, Thomas Bocek notifications@github.com wrote:
@exercitussolus https://github.com/exercitussolus any news on this issue?
— Reply to this email directly or view it on GitHub https://github.com/tomp2p/TomP2P/issues/86#issuecomment-91202841.
Thanks for the test!
The following code, when started up through the Maven exec plugin and left to run for 24 hours, goes from 137 MB resident size for the JVM to 188 MB. Only about a dozen other peers have contacted this peer; no information exchange ( put, send, direct ) took place. This peer never gets wrapped in a PeerDHT.