Live data from Hacker News

Clojure and Overtone Driving Minecraft

blog.josephwilk.net

11–18 of 18 posts

Re: Clojure and Overtone Driving Minecraft

#11
post #6

> java -XX:MaxPermSize=1G Really? I mean really?

New to java, but just wondering ... would that be due to intern()-ing (strings/symbols/etc.)?

See https://blogs.oracle.com/jonthecollector/entry/presenting_th....

How the JVM handled class metadata changed in Java 8; the MaxPermGen argument is ignored on that version (http://java.dzone.com/articles/java-8-permgen-metaspace).

P.S. According to that second link, interned strings haven't been stored in the permanent generation since Java 7.

Re: Clojure and Overtone Driving Minecraft

#12

> java -XX:MaxPermSize=1G Really? I mean really?

Yeah, don't do that. Run SpigotMC under Java 8 with the following flags: -d64 (force a 64-bit data model, although usually this isn't necessary) -server (use the server-optimized JVM instead of the desktop-optimized one, again, may not be necessary) -Xmx1G (start with this heap memory limit and increase if necessary) -XX:+UseConcMarkSweepGC (for multithreaded GC) -XX:+CMSIncrementalMode (only use on computers that su…

I though that

  -XX:+AggressiveOpts
is a noop these days.

Re: Clojure and Overtone Driving Minecraft

#13
post #6

> java -XX:MaxPermSize=1G Really? I mean really?

New to java, but just wondering ... would that be due to intern()-ing (strings/symbols/etc.)?

Nope, interned strings are no longer in PermGen since "forever" http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6962931. Also if you really care about this you'd likely be better of running Java 8u20 or later which automatically deduplicates Strings.

Reasons for running with -XX:MaxPermSize=1G that I can imagine:

  * you run Java 7 (which goes EOL in March)
  * and one of those:
    * your code base is twice as large as Eclipse and JBoss combined
    * you have a PermGen leak
    * you have no idea what you're doing

Re: Clojure and Overtone Driving Minecraft

#14

> java -XX:MaxPermSize=1G Really? I mean really?

Spigot complains if you launch with the default MaxPermSize. The developers there could make better suggestions as to why thats the case. Spigot warning: ``` Warning, your max perm gen size is not set or less than 128mb. It is recommended you restart Java with the following argument: -XX:MaxPermSize=128M Please see http://www.spigotmc.org/wiki/changing-permgen-size/ for more details and more in-depth instructions. ``…

There is almost an order of magnitude difference between 128MB and 1GB.

Re: Clojure and Overtone Driving Minecraft

#15

> java -XX:MaxPermSize=1G Really? I mean really?

Yeah, don't do that. Run SpigotMC under Java 8 with the following flags: -d64 (force a 64-bit data model, although usually this isn't necessary) -server (use the server-optimized JVM instead of the desktop-optimized one, again, may not be necessary) -Xmx1G (start with this heap memory limit and increase if necessary) -XX:+UseConcMarkSweepGC (for multithreaded GC) -XX:+CMSIncrementalMode (only use on computers that su…

Thats really helpful, thanks! Will give it a try.

Re: Clojure and Overtone Driving Minecraft

#16
post #6

Earlier quoted context omitted.

New to java, but just wondering ... would that be due to intern()-ing (strings/symbols/etc.)?

Nope, interned strings are no longer in PermGen since "forever" http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6962931 . Also if you really care about this you'd likely be better of running Java 8u20 or later which automatically deduplicates Strings. Reasons for running with -XX:MaxPermSize=1G that I can imagine: * you run Java 7 (which goes EOL in March) * and one of those: * your code base is twice as large as…

[deleted]

Re: Clojure and Overtone Driving Minecraft

#17

Earlier quoted context omitted.

Spigot complains if you launch with the default MaxPermSize. The developers there could make better suggestions as to why thats the case. Spigot warning: ``` Warning, your max perm gen size is not set or less than 128mb. It is recommended you restart Java with the following argument: -XX:MaxPermSize=128M Please see http://www.spigotmc.org/wiki/changing-permgen-size/ for more details and more in-depth instructions. ``…

There is almost an order of magnitude difference between 128MB and 1GB.

Good point, I'll update it to be more conservative for other people trying this out.

Re: Clojure and Overtone Driving Minecraft

#18

Earlier quoted context omitted.

Yeah, don't do that. Run SpigotMC under Java 8 with the following flags: -d64 (force a 64-bit data model, although usually this isn't necessary) -server (use the server-optimized JVM instead of the desktop-optimized one, again, may not be necessary) -Xmx1G (start with this heap memory limit and increase if necessary) -XX:+UseConcMarkSweepGC (for multithreaded GC) -XX:+CMSIncrementalMode (only use on computers that su…

I though that -XX:+AggressiveOpts is a noop these days.

It depends on the JVM release. On my Windows 8.1 laptop running 1.8.0_31,this flag increases AutoBoxCacheMax from 128 to 20000 (which affects autoboxing and collections performance), and it lowers BiasedLockingStartupDelay from 20000 to 500 (which can effect multithreaded access to shared data - see http://www.oracle.com/technetwork/java/tuning-139912.html#se... for more details).

It isn't strictly necessary, but if you're trying to squeeze every possible drop of performance out of your Minecraft server, the experimental optimizations aren't a bad thing to enable. I will admit to doing only informal performance testing when it comes to the AggressiveOpts flag.

Post reply on HN