Wednesday, 22 April 2015

Resonant Rise 3 Java Settings to reduce lag

I've begun a new Youtube series covering Resonant Rise 3 (3.2.5.3-RC-MAIN).
In the process I discovered it lags.
HORRIBLY.

As my Linux server decided to sulk and fail to boot, I'm using a late model Mac Mini as a server.
The clients are late model iMacs.
This is OBVIOUSLY SUB-OPTIMAL.
I'm organising a replacement linux server which I will use in our upcoming videos.

So I did a metric shit ton of digging and finally found a series of settings for the server and client that reduce that lag considerably.
So...
Yeah...
You keep getting:

"Can't keep up! Did the system time change"

Messages?

Then do this.

On your servers LaunchServer.sh:

#!/bin/bash
set -x
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
export PATH=${JAVA_HOME}/bin:${PATH}
opts="-server -XX:+TieredCompilation \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \
-XX:+UseCMSInitiatingOccupancyOnly"
java -Xmx2G -XX:MaxPermSize=256M $opts -jar forge-1.7.10-10.13.2.1291-universal.jar nogui

(Slashes added for readability)

Of course this assumes you're using Java 1.7 update 71.
I tried JDK 1.8 and it gave me a whole bunch of grief.
So I decided to switch back to JDK 1.7 and see if that helped.
It did.
Suddenly the Mac Mini used all 4 cores instead of just 2 and the client side (iMac) sped up considerably.

Ok. Now client side.
In the ATLauncher settings, choose 'Settings' and:

For the Java path use: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
(Again assuming you have 1.7 update 67 - change to suit)

And for the Java parameters:

-server -XX:+TieredCompilation \
-XX:CompileThreshold=1500 \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \
-XX:+UseCMSInitiatingOccupancyOnly

(Slashes added for readability)

MANY THANKS TO https://plus.google.com/+JohnPaulAlcala/posts/FUKJ3QhZJ8w !

YMMV.

I'm still hunting for "The Perfect Seed" for videos, and will get back to making videos as soon as my current IRL workload decreases.

Wednesday, 1 April 2015

Where does chrome store open tabs information?

Recently I had a problem with a upgrade from Mavericks to Yosemite.
The upgrade failed.
Catastrophically.
But I had backed up all the main folders I might need in case of such a folder.

For reference, these are:

- /private
- /Library
- /Applications
- /Users/my_home_folder

I had to burn the machine and install Yosemite from scratch.

Now one of the things I wanted to recover was the current tabs I had open in Chrome.
The reason being was that some of them were very, very interesting and I had not bookmarked them.

I did a little bit of research, but not much turned up.
So I figured it out myself.

Let's say you have a folder ~/OldMachineBackup and it has the folders mentioned above in it.

So to find out what tabs you had open:

cd ~/OldMachineBackup
strings Application\ Support/Google/Chrome/Default/Current\ Tabs | egrep '^http' | sort | uniq

And there you have them. A list of http addresses.