myrobotlab icon indicating copy to clipboard operation
myrobotlab copied to clipboard

Make it easy and well documented to increase the heap size for MRL.

Open kwatters opened this issue 7 years ago • 3 comments

currently the only way to do this is with some magic args "-jvm" that seem to be completely lacking of any documentation and it's not normal for a standard java application that you would pass something like -Xmx or -Xms values on the command line.

we should make mrl easy to increase the heap size with something like a "-m 1g" sort of command line argument to specify the memory to give Runtime.

kwatters avatar Jun 10 '18 20:06 kwatters

its supposed to already be documented in that its any or all pre-existing jvm flags .. perhaps it would have been "more" standard to be called java_opts

It's supposed to be any flags you may want e.g:

-jvm "-Xms64M -Xmx1g -verbosegc -Xns10m -Xgc: parallel"

all the flags "should" be relayed ... at least that's how I thought it worked ;)

supertick avatar Jun 10 '18 21:06 supertick

I'm trying the following:

java -jar myrobotlab.jar -jvm "-Xmx256m" -service runtime Runtime python Python gui SwingGui -invoke python execFile /home/pi/github/pyrobotlab/home/kwatters/Harry.py

basically when I specify the -jvm arg.. runtime just dies and there's no details as to why.
Here's the no worky.. my eyes aren't working..

00:38:20.387 [main] INFO c.m.s.Agent [Agent.java:174] Agent agent Pid 1920 is alive 00:38:20.389 [main] INFO c.m.s.Agent [Agent.java:862] I am a jar - must be runtime 00:38:20.393 [main] INFO c.m.s.Agent [Agent.java:914] Agent starting spawn 20180611.003820392 00:38:20.394 [main] INFO c.m.s.Agent [Agent.java:915] in args [-jvm, -Xmx256m, -service, runtime, Runtime, python, Python, gui, SwingGui, -invoke, python, execFile, /home/pi/github/pyrobotlab/home/kwatters/Harry.py] 00:38:20.395 [main] INFO c.m.s.Agent [Agent.java:934] ============== spawn begin ============== 00:38:20.398 [main] INFO c.m.s.Agent [Agent.java:947] spawning -> [/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java -cp / home/pi/nixie/myrobotlab.jar:./libraries/jar/jython.jar:./libraries/jar/:./bin:./build/classes org.myrobotlab.service.Runtime -fromAgent agent.20180611.003819757.1920 -id runtime.20180611.003820397.0 -Xmx256m -service runtime Runtime python Python gui S wingGui -invoke python execFile /home/pi/github/pyrobotlab/home/kwatters/Harry.py ] 00:38:20.401 [main] INFO c.m.s.Agent [Agent.java:955] in /home/pi/nixie spawning -> [/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/j re/bin/java -cp /home/pi/nixie/myrobotlab.jar:./libraries/jar/jython.jar:./libraries/jar/:./bin:./build/classes org.myrobotla b.service.Runtime -fromAgent agent.20180611.003819757.1920 -id runtime.20180611.003820397.0 -Xmx256m -service runtime Runtime p ython Python gui SwingGui -invoke python execFile /home/pi/github/pyrobotlab/home/kwatters/Harry.py ] 00:38:20.644 [main] INFO c.m.f.Service [Service.java:2084] agent info starting new runtime.20180611.003820397.0 runtime 00:38:20.645 [main] INFO c.m.s.Agent [Agent.java:987] Agent finished spawn 20180611.003820645 00:38:20.902 [runtime.monitor] INFO c.m.s.Agent [Agent.java:649] publishTerminated - terminated %s %s - restarting 00:38:20.903 [runtime.monitor] INFO c.m.s.Agent [Agent.java:846] terminating others 00:38:20.904 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] agent info terminating runtime.20180611.003820397.0 00:38:20.905 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] agent info runtime.20180611.003820397.0 haz beeen termina ted 00:38:20.906 [runtime.monitor] INFO c.m.s.Agent [Agent.java:616] no survivors sir... 00:38:20.907 [runtime.monitor] INFO c.m.s.Agent [Agent.java:848] terminating self ... goodbye... 00:38:20.908 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1468] mrl shutdown 00:38:20.909 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1414] stopping service cli 00:38:20.910 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] cli info saving cli.json 00:38:20.910 [cli] INFO c.m.f.Service [Service.java:2084] cli info shutting down 00:38:20.928 [runtime.monitor] INFO c.m.f.Service [Service.java:1393] no such method Runtime.released(Cli) : - attempting upca sting 00:38:20.930 [runtime.monitor] INFO c.m.f.Service [Service.java:1398] searching through 275 methods 00:38:20.933 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1414] stopping service agent 00:38:20.935 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] agent info saving agent.json 00:38:20.938 [agent] INFO c.m.f.Service [Service.java:2084] agent info shutting down 00:38:20.941 [runtime.monitor] INFO c.m.f.Service [Service.java:1393] no such method Runtime.released(Agent) : - attempting up casting 00:38:20.943 [runtime.monitor] INFO c.m.f.Service [Service.java:1398] searching through 275 methods 00:38:20.945 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] runtime info saving runtime.json 00:38:20.947 [runtime.monitor] INFO c.m.f.Service [Service.java:2084] runtime info we cant serialize runtime yet 00:38:20.948 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1435] clearing hosts environments 00:38:20.949 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1438] clearing registry 00:38:20.947 [runtime] INFO c.m.f.Service [Service.java:2084] runtime info shutting down 00:38:20.950 [runtime.monitor] INFO c.m.s.Runtime [Runtime.java:1488] removing pid file pids/agent.20180611.003819757.1920.pid pi@raspberrypi:~/nixie $

kwatters avatar Jun 11 '18 00:06 kwatters

I feel that something like setting the heap size is such a desired thing, it should have it's own command line arg... i propose "-m" for memory...

kwatters avatar Jun 11 '18 00:06 kwatters