Hi,
I would like to try a different garbage collector when running Fiji. When I set it with an option, it is being overridden to use the incremental garbage collector, (-XX+incgc). How can this be overridden? Thanks, Gerold -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Gerold,
> When I set it with an option, it is being overridden > to use the incremental garbage collector, (-XX+incgc). > > How can this be overridden? Did you try passing the --default-gc flag? Looking at the launcher source [1], that should do the trick. You can also find out this sort of thing by passing --help and scanning the available options. There are a couple other potentially useful GC-related flags, too. Regards, Curtis [1] See: https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1092-L1098 https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 On Thu, Mar 5, 2015 at 12:20 PM, Gerold Rupprecht <[hidden email]> wrote: > Hi, > > I would like to try a different garbage collector when running Fiji. When > I set it with an option, it is being overridden to use the incremental > garbage collector, (-XX+incgc). > > How can this be overridden? > > Thanks, > > Gerold > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Curtis,
Thanks for your answer. I looked at the code from the two links, but still do not get the right garbage collector is I place the following commands in the imagej.cfg file as follows: . jre/bin/java -Xbatch -Xshare:auto -Xnoclassgc -Xms5120m -Xmx5120m -XX:+AggressiveOpts -XX:+UseLargePages -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:PermSize=67108864 -XX:MaxPermSize=67108864 -XX:GCTimeRatio=200 -XX:+DisableExplicitGC -XX:+UseCompressedOops -XX:+UnlockExperimentalVMOptions -XX:+G1UseParallelRSetUpdating -XX:+G1UseParallelRSetScanning -XX:NewRatio=4 -cp ij.jar ij.ImageJ I then launch the application from the terminal as follows: /home/foxel/Desktop/Fiji.app/ImageJ-linux64 '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' --gc-g1 This gives me the following messages: Unrecognized VM option '+G1ParallelRSetUpdatingEnabled' Warning: falling back to System JVM OpenJDK 64-Bit Server VM warning: ignoring option PermSize=67108864; support was removed in 8.0 OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=67108864; support was removed in 8.0 OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0 Unrecognized VM option 'G1ParallelRSetUpdatingEnabled' Did you mean '(+/-)G1UseParallelRSetUpdating'? Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. I have not added the "G1ParallelRSetUpdatingEnabled" setting, so it seems the program is putting it in. This appears to be coming from the file https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 It seems the JVM settings may have been renamed at some point. Is there an easy workaround for this? Thanks, -- Gerold Rupprecht 10, rue Louis-Curval CH-1206 Genève, Suisse Mobile: +41 79 914 29 52 >----Message d'origine---- >De : [hidden email] >Date : 05/03/2015 - 20:33 (CET) >À : [hidden email] >Objet : Re: Garbage Collector > >Hi Gerold, > >> When I set it with an option, it is being overridden >> to use the incremental garbage collector, (-XX+incgc). >> >> How can this be overridden? > >Did you try passing the --default-gc flag? Looking at the launcher source >[1], that should do the trick. > >You can also find out this sort of thing by passing --help and scanning the >available options. There are a couple other potentially useful GC-related >flags, too. > >Regards, >Curtis > >[1] See: >https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1092-L1098 >https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 > >On Thu, Mar 5, 2015 at 12:20 PM, Gerold Rupprecht <[hidden email]> >wrote: > >> Hi, >> >> I would like to try a different garbage collector when running Fiji. When >> I set it with an option, it is being overridden to use the incremental >> garbage collector, (-XX+incgc). >> >> How can this be overridden? >> >> Thanks, >> >> Gerold >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >-- >ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Gerold,
I can look into these errors. But in the meantime, try using the launcher with the "--dry-run" flag. It will output the exact java command it is invoking with final args, etc. You can then tweak the command to your liking, using it to actually launch Java + ImageJ with your desired arguments. Regards, Curtis On Thu, Mar 5, 2015 at 3:58 PM, [hidden email] <[hidden email]> wrote: > Hi Curtis, > > Thanks for your answer. I looked at the code from the two links, but still > do not get the right garbage collector is I place the following commands in > the imagej.cfg file as follows: > > . > jre/bin/java > -Xbatch -Xshare:auto -Xnoclassgc -Xms5120m -Xmx5120m -XX:+AggressiveOpts > -XX:+UseLargePages -XX:NewSize=1536m -XX:MaxNewSize=1536m > -XX:PermSize=67108864 -XX:MaxPermSize=67108864 -XX:GCTimeRatio=200 > -XX:+DisableExplicitGC -XX:+UseCompressedOops > -XX:+UnlockExperimentalVMOptions -XX:+G1UseParallelRSetUpdating > -XX:+G1UseParallelRSetScanning -XX:NewRatio=4 -cp ij.jar ij.ImageJ > > I then launch the application from the terminal as follows: > /home/foxel/Desktop/Fiji.app/ImageJ-linux64 > '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' --gc-g1 > > This gives me the following messages: > Unrecognized VM option '+G1ParallelRSetUpdatingEnabled' > Warning: falling back to System JVM > OpenJDK 64-Bit Server VM warning: ignoring option PermSize=67108864; > support was removed in 8.0 > OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=67108864; > support was removed in 8.0 > OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support > was removed in 8.0 > Unrecognized VM option 'G1ParallelRSetUpdatingEnabled' > Did you mean '(+/-)G1UseParallelRSetUpdating'? > Error: Could not create the Java Virtual Machine. > Error: A fatal exception has occurred. Program will exit. > > I have not added the "G1ParallelRSetUpdatingEnabled" setting, so it seems > the program is putting it in. This appears to be coming from the file > > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 > > It seems the JVM settings may have been renamed at some point. > > Is there an easy workaround for this? > > Thanks, > -- > Gerold Rupprecht > 10, rue Louis-Curval > CH-1206 Genève, Suisse > > Mobile: +41 79 914 29 52 > >----Message d'origine---- > >De : [hidden email] > >Date : 05/03/2015 - 20:33 (CET) > >À : [hidden email] > >Objet : Re: Garbage Collector > > > >Hi Gerold, > > > >> When I set it with an option, it is being overridden > >> to use the incremental garbage collector, (-XX+incgc). > >> > >> How can this be overridden? > > > >Did you try passing the --default-gc flag? Looking at the launcher source > >[1], that should do the trick. > > > >You can also find out this sort of thing by passing --help and scanning > the > >available options. There are a couple other potentially useful GC-related > >flags, too. > > > >Regards, > >Curtis > > > >[1] See: > > > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1092-L1098 > > > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 > > > >On Thu, Mar 5, 2015 at 12:20 PM, Gerold Rupprecht <[hidden email]> > >wrote: > > > >> Hi, > >> > >> I would like to try a different garbage collector when running Fiji. > When > >> I set it with an option, it is being overridden to use the incremental > >> garbage collector, (-XX+incgc). > >> > >> How can this be overridden? > >> > >> Thanks, > >> > >> Gerold > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > >-- > >ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Curtis,
Thanks for your quick reply. I just tried your suggestion for the --dry-run flag and got the following results: (I have wrapped it to new line for readability) /foxel/imagej-elphel/src/main$ /home/foxel/Desktop/Fiji.app/ImageJ-linux64 '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' --dry-run java -Xbatch -Xshare:auto -Xnoclassgc -Xms5120m -Xmx5120m -XX:+AggressiveOpts -XX:+UseLargePages -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:PermSize=67108864 -XX:MaxPermSize=67108864 -XX:GCTimeRatio=200 -XX:+DisableExplicitGC -XX:+UseCompressedOops -XX:+UnlockExperimentalVMOptions -XX:NewRatio=4 -Dpython.cachedir.skip=true -Dplugins.dir=/home/foxel/Desktop/Fiji.app -Xincgc -XX:PermSize=128m -Djava.class.path=/home/foxel/Desktop/Fiji.app/jars/imagej-launcher-3.1.6.jar -Dimagej.dir=/home/foxel/Desktop/Fiji.app -Dij.dir=/home/foxel/Desktop/Fiji.app -Dfiji.dir=/home/foxel/Desktop/Fiji.app -Dfiji.defaultLibPath=lib/amd64/server/libjvm.so -Dfiji.executable=/home/foxel/Desktop/Fiji.app/ImageJ-linux64 -Dij.executable=/home/foxel/Desktop/Fiji.app/ImageJ-linux64 -Djava.library.path=/home/foxel/Desktop/Fiji.app/lib/linux64:/home/foxel/Desktop/Fiji.app/mm/linux64 net.imagej.launcher.ClassLauncher -ijjarpath jars -ijjarpath plugins net.imagej.Main /home/foxel/Desktop/Fiji.app/ImageJ.cfg The settings are OK except for the garbage collector (XXincgc) and PermSize which is being set at twice what I need. I really need a throughput garbage collector though. Any and all help greatly appreciated. Best wishes, Gerold -- Gerold Rupprecht 10, rue Louis-Curval CH-1206 Genève, Suisse Mobile: +41 79 914 29 52 >----Message d'origine---- >De : [hidden email] >Date : 06/03/2015 - 00:34 (CET) >À : [hidden email] >Objet : Re: Garbage Collector > >Hi Gerold, > >I can look into these errors. But in the meantime, try using the launcher >with the "--dry-run" flag. It will output the exact java command it is >invoking with final args, etc. You can then tweak the command to your >liking, using it to actually launch Java + ImageJ with your desired >arguments. > >Regards, >Curtis > >On Thu, Mar 5, 2015 at 3:58 PM, [hidden email] <[hidden email]> >wrote: > >> Hi Curtis, >> >> Thanks for your answer. I looked at the code from the two links, but still >> do not get the right garbage collector is I place the following commands in >> the imagej.cfg file as follows: >> >> . >> jre/bin/java >> -Xbatch -Xshare:auto -Xnoclassgc -Xms5120m -Xmx5120m -XX:+AggressiveOpts >> -XX:+UseLargePages -XX:NewSize=1536m -XX:MaxNewSize=1536m >> -XX:PermSize=67108864 -XX:MaxPermSize=67108864 -XX:GCTimeRatio=200 >> -XX:+DisableExplicitGC -XX:+UseCompressedOops >> -XX:+UnlockExperimentalVMOptions -XX:+G1UseParallelRSetUpdating >> -XX:+G1UseParallelRSetScanning -XX:NewRatio=4 -cp ij.jar ij.ImageJ >> >> I then launch the application from the terminal as follows: >> /home/foxel/Desktop/Fiji.app/ImageJ-linux64 >> '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' --gc-g1 >> >> This gives me the following messages: >> Unrecognized VM option '+G1ParallelRSetUpdatingEnabled' >> Warning: falling back to System JVM >> OpenJDK 64-Bit Server VM warning: ignoring option PermSize=67108864; >> support was removed in 8.0 >> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=67108864; >> support was removed in 8.0 >> OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support >> was removed in 8.0 >> Unrecognized VM option 'G1ParallelRSetUpdatingEnabled' >> Did you mean '(+/-)G1UseParallelRSetUpdating'? >> Error: Could not create the Java Virtual Machine. >> Error: A fatal exception has occurred. Program will exit. >> >> I have not added the "G1ParallelRSetUpdatingEnabled" setting, so it seems >> the program is putting it in. This appears to be coming from the file >> >> https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 >> >> It seems the JVM settings may have been renamed at some point. >> >> Is there an easy workaround for this? >> >> Thanks, >> -- >> Gerold Rupprecht >> 10, rue Louis-Curval >> CH-1206 Genève, Suisse >> >> Mobile: +41 79 914 29 52 >> >----Message d'origine---- >> >De : [hidden email] >> >Date : 05/03/2015 - 20:33 (CET) >> >À : [hidden email] >> >Objet : Re: Garbage Collector >> > >> >Hi Gerold, >> > >> >> When I set it with an option, it is being overridden >> >> to use the incremental garbage collector, (-XX+incgc). >> >> >> >> How can this be overridden? >> > >> >Did you try passing the --default-gc flag? Looking at the launcher source >> >[1], that should do the trick. >> > >> >You can also find out this sort of thing by passing --help and scanning >> the >> >available options. There are a couple other potentially useful GC-related >> >flags, too. >> > >> >Regards, >> >Curtis >> > >> >[1] See: >> > >> https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1092-L1098 >> > >> https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 >> > >> >On Thu, Mar 5, 2015 at 12:20 PM, Gerold Rupprecht <[hidden email]> >> >wrote: >> > >> >> Hi, >> >> >> >> I would like to try a different garbage collector when running Fiji. >> When >> >> I set it with an option, it is being overridden to use the incremental >> >> garbage collector, (-XX+incgc). >> >> >> >> How can this be overridden? >> >> >> >> Thanks, >> >> >> >> Gerold >> >> >> >> -- >> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> >> >> > >> >-- >> >ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html >> > >-- >ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Gerold,
Now that you have that command line output from --dry-run, you can copy-paste it into your console, or a script, using it to actually launch ImageJ. You do not need to use the launcher to launch -- you can run that long java command instead -- but with your own GC settings. No need to wait for any bug-fixes in the launcher. Meanwhile, I will work on fixing the launcher to behave better. Regards, Curtis On Mar 5, 2015 6:15 PM, "[hidden email]" <[hidden email]> wrote: > Hi Curtis, > > Thanks for your quick reply. > > I just tried your suggestion for the --dry-run flag and got the following > results: > (I have wrapped it to new line for readability) > > /foxel/imagej-elphel/src/main$ /home/foxel/Desktop/Fiji.app/ImageJ-linux64 > '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' > --dry-run java > -Xbatch -Xshare:auto > -Xnoclassgc > -Xms5120m > -Xmx5120m > -XX:+AggressiveOpts > -XX:+UseLargePages > -XX:NewSize=1536m > -XX:MaxNewSize=1536m > -XX:PermSize=67108864 > -XX:MaxPermSize=67108864 > -XX:GCTimeRatio=200 > -XX:+DisableExplicitGC > -XX:+UseCompressedOops > -XX:+UnlockExperimentalVMOptions > -XX:NewRatio=4 > -Dpython.cachedir.skip=true > -Dplugins.dir=/home/foxel/Desktop/Fiji.app > -Xincgc > -XX:PermSize=128m > > -Djava.class.path=/home/foxel/Desktop/Fiji.app/jars/imagej-launcher-3.1.6.jar > -Dimagej.dir=/home/foxel/Desktop/Fiji.app > -Dij.dir=/home/foxel/Desktop/Fiji.app > -Dfiji.dir=/home/foxel/Desktop/Fiji.app > -Dfiji.defaultLibPath=lib/amd64/server/libjvm.so > -Dfiji.executable=/home/foxel/Desktop/Fiji.app/ImageJ-linux64 > -Dij.executable=/home/foxel/Desktop/Fiji.app/ImageJ-linux64 > -Djava.library.path=/home/foxel/Desktop/Fiji.app/lib/linux64:/home/foxel/Desktop/Fiji.app/mm/linux64 > net.imagej.launcher.ClassLauncher > -ijjarpath jars > -ijjarpath plugins net.imagej.Main /home/foxel/Desktop/Fiji.app/ImageJ.cfg > > The settings are OK except for the garbage collector (XXincgc) and > PermSize which is being set at twice what I need. > > I really need a throughput garbage collector though. > > Any and all help greatly appreciated. > > Best wishes, > > Gerold > > > -- > Gerold Rupprecht > 10, rue Louis-Curval > CH-1206 Genève, Suisse > > Mobile: +41 79 914 29 52 > >----Message d'origine---- > >De : [hidden email] > >Date : 06/03/2015 - 00:34 (CET) > >À : [hidden email] > >Objet : Re: Garbage Collector > > > >Hi Gerold, > > > >I can look into these errors. But in the meantime, try using the launcher > >with the "--dry-run" flag. It will output the exact java command it is > >invoking with final args, etc. You can then tweak the command to your > >liking, using it to actually launch Java + ImageJ with your desired > >arguments. > > > >Regards, > >Curtis > > > >On Thu, Mar 5, 2015 at 3:58 PM, [hidden email] <[hidden email]> > >wrote: > > > >> Hi Curtis, > >> > >> Thanks for your answer. I looked at the code from the two links, but > still > >> do not get the right garbage collector is I place the following > commands in > >> the imagej.cfg file as follows: > >> > >> . > >> jre/bin/java > >> -Xbatch -Xshare:auto -Xnoclassgc -Xms5120m -Xmx5120m -XX:+AggressiveOpts > >> -XX:+UseLargePages -XX:NewSize=1536m -XX:MaxNewSize=1536m > >> -XX:PermSize=67108864 -XX:MaxPermSize=67108864 -XX:GCTimeRatio=200 > >> -XX:+DisableExplicitGC -XX:+UseCompressedOops > >> -XX:+UnlockExperimentalVMOptions -XX:+G1UseParallelRSetUpdating > >> -XX:+G1UseParallelRSetScanning -XX:NewRatio=4 -cp ij.jar ij.ImageJ > >> > >> I then launch the application from the terminal as follows: > >> /home/foxel/Desktop/Fiji.app/ImageJ-linux64 > >> '/home/foxel/Desktop/Fiji.app/ImageJ.cfg' --gc-g1 > >> > >> This gives me the following messages: > >> Unrecognized VM option '+G1ParallelRSetUpdatingEnabled' > >> Warning: falling back to System JVM > >> OpenJDK 64-Bit Server VM warning: ignoring option PermSize=67108864; > >> support was removed in 8.0 > >> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=67108864; > >> support was removed in 8.0 > >> OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support > >> was removed in 8.0 > >> Unrecognized VM option 'G1ParallelRSetUpdatingEnabled' > >> Did you mean '(+/-)G1UseParallelRSetUpdating'? > >> Error: Could not create the Java Virtual Machine. > >> Error: A fatal exception has occurred. Program will exit. > >> > >> I have not added the "G1ParallelRSetUpdatingEnabled" setting, so it > seems > >> the program is putting it in. This appears to be coming from the file > >> > >> > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 > >> > >> It seems the JVM settings may have been renamed at some point. > >> > >> Is there an easy workaround for this? > >> > >> Thanks, > >> -- > >> Gerold Rupprecht > >> 10, rue Louis-Curval > >> CH-1206 Genève, Suisse > >> > >> Mobile: +41 79 914 29 52 > >> >----Message d'origine---- > >> >De : [hidden email] > >> >Date : 05/03/2015 - 20:33 (CET) > >> >À : [hidden email] > >> >Objet : Re: Garbage Collector > >> > > >> >Hi Gerold, > >> > > >> >> When I set it with an option, it is being overridden > >> >> to use the incremental garbage collector, (-XX+incgc). > >> >> > >> >> How can this be overridden? > >> > > >> >Did you try passing the --default-gc flag? Looking at the launcher > source > >> >[1], that should do the trick. > >> > > >> >You can also find out this sort of thing by passing --help and scanning > >> the > >> >available options. There are a couple other potentially useful > GC-related > >> >flags, too. > >> > > >> >Regards, > >> >Curtis > >> > > >> >[1] See: > >> > > >> > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1092-L1098 > >> > > >> > https://github.com/imagej/imagej-launcher/blob/imagej-launcher-3.3.0/src/main/c/ImageJ.c#L1783-L1798 > >> > > >> >On Thu, Mar 5, 2015 at 12:20 PM, Gerold Rupprecht <[hidden email]> > >> >wrote: > >> > > >> >> Hi, > >> >> > >> >> I would like to try a different garbage collector when running Fiji. > >> When > >> >> I set it with an option, it is being overridden to use the > incremental > >> >> garbage collector, (-XX+incgc). > >> >> > >> >> How can this be overridden? > >> >> > >> >> Thanks, > >> >> > >> >> Gerold > >> >> > >> >> -- > >> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> >> > >> > > >> >-- > >> >ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > >> > >> -- > >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > >> > > > >-- > >ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |