[freenet-support] OOM on start-up
Hi, I have trouble in installing KeepAlive plugin. It causes "java.lang.OutOfMemoryError : unable to create new native Thread" when installing, and on every start-up after the installation. I tried setting wrapper.java.additional.4=-Xss128k, decreasing node.load.threadLimit, increasing wrapper.java.maxmemory, ulimit -u 4096, but all of them did not work. I noticed that CPU usage got very high (> 100% on C2D E8400) temporarily for the several seconds after start up, and lots of threads (> 300) were created, even if I removed KeepAlive plugin. After booting up successfully, threads count decreases under 100. I ran jstack during the high CPU usage period, which showed 397 threads. I suspect this massive thread creation is the cause of KeepAlive installation problem. So my question is, Is it normal that so many threads are created beyond node.load.threadLimit on start-up? and if so, how can I increase the maximum number of threads without OOM? regards, s11 ___ Support mailing list Support@freenetproject.org http://news.gmane.org/gmane.network.freenet.support Unsubscribe at http://emu.freenetproject.org/cgi-bin/mailman/listinfo/support Or mailto:support-requ...@freenetproject.org?subject=unsubscribe
Re: [freenet-support] OOM on start-up
On Mon, 11 Nov 2013 21:42:07 +0900, Signal 11 wrote: > Hi, > I have trouble in installing KeepAlive plugin. > It causes "java.lang.OutOfMemoryError : unable to create new native > Thread" when installing, and on every start-up after the installation. Just to clarify, your node works fine, until you try using the KeepAlive plugin? > I tried setting wrapper.java.additional.4=-Xss128k, decreasing > node.load.threadLimit, increasing wrapper.java.maxmemory, ulimit -u > 4096, but all of them did not work. What did you set maxmemory to? > I noticed that CPU usage got very high (> 100% on C2D E8400) > temporarily for the several seconds after start up, I think high CPU within the first minute or so is normal. > and lots of > threads (> 300) were created, even if I removed KeepAlive plugin. > After booting up successfully, threads count decreases under 100. > I ran jstack during the high CPU usage period, which showed 397 > threads. I suspect this massive thread creation is the cause of > KeepAlive installation problem. So my question is, > Is it normal that so many threads are created beyond > node.load.threadLimit on start-up? and if so, how can I increase the > maximum number of threads without OOM? Somewhere in freenet's Stats pages is a table of the running threads. Perhaps you can look for clues there, or post that table here? ___ Support mailing list Support@freenetproject.org http://news.gmane.org/gmane.network.freenet.support Unsubscribe at http://emu.freenetproject.org/cgi-bin/mailman/listinfo/support Or mailto:support-requ...@freenetproject.org?subject=unsubscribe
Re: [freenet-support] OOM on start-up
thanks for the advice. > Just to clarify, your node works fine, until you try using the > KeepAlive plugin? Yes. > What did you set maxmemory to? I set it to 512MiB. > Somewhere in freenet's Stats pages is a table of the running threads. > Perhaps you can look for clues there, or post that table here? I took two thread dumps, one during high CPU load on start-up, the other in normal low load after that. wrapper.log: http://pastebin.com/iQ45jaGX I also saved thread usage from Config->status page, thread usage: http://pastebin.com/JG9fXLJm which showed lots of "Pooled thread awaiting work" during the high CPU load. high: Pooled thread awaiting work : 268 (84.0%) normal: Pooled thread awaiting work : 23 (30.3%) regards, s11 ___ Support mailing list Support@freenetproject.org http://news.gmane.org/gmane.network.freenet.support Unsubscribe at http://emu.freenetproject.org/cgi-bin/mailman/listinfo/support Or mailto:support-requ...@freenetproject.org?subject=unsubscribe