SK Performance Tweaking Guide
A comprehensive guide on ricing up your Java client to increase framerate, reduce stutters, and improve gameplay
This is a guide I wrote for my guild that I have decided to make public for the benefit of the SK community. I do not pretend to be an expert in Java, and these suggestions are merely what I have found works through my own research and experimentation. Many of the ideas were borrowed from previous threads on the subject, and this is my attempt to distill the most useful tweaks into one comprehensive step-by-step guide.
DISCLAIMER: I cannot guarantee that you will not encounter problems after doing the tweaks. Most people from my guild that have followed my instructions have had no issues, but I'm not making any assurances that everything will work for you. I also do not plan on offering any case-by-case technical support as I'm a busy guy and I've already laid everything out as foolproof as possible. Therefore, I advise you to only perform these tweaks if you are comfortable with them, and know how to restore any changes in case they don't work out for you.
If you like my work here, I'd appreciate if you'd check out this thread and lend your support if you like my ideas.
PC USERS
(Mac users scroll down. Sorry, no Linux version)
1. Using 64-bit Java
This step will yield the most significant improvements and should be done for anyone running a 64-bit version of Windows.
For Web Client Users:
If you have 64-bit Java installed, Spiral Knights should automatically launch in 64-bit mode if you are running a 64-bit browser. Some browsers such as Firefox will default to 32-bit Java unless additional plugins for 64-bit Java are installed. The easiest way to launch in 64-bit mode without installing anything is to run SK using Internet Explorer (64-bit) which should come with all 64-bit versions of Windows.
For Steam Users:
Exit both Steam and SK
Navigate to your SK folder (C:\Program Files (x86)\Steam\steamapps\common\spiral knights)
In this folder, there will be a folder named “java_vm”; rename it to “java_vm_backup”
Navigate to your Java folder (C:\Program Files\Java); make sure you are not in the (x86) folder
In this folder there will be a folder named either “jre6” or “jre7”; UPDATED: Copy the jre6 folder instead of jre7. I've received feedback of jre7 not working for some people. If you do not have jre6, download it here.
Navigate back to your SK folder and paste the jre6 folder; rename it to “java_vm”
In your SK folder create a file named “extra.txt”, we will come back to this later
2. Checking whether SK is running in 64-bit or 32-bit mode
Open your task manager and select the “processes” tab. Upon launching SK, a new instance of “java.exe” should appear. If “java.exe *32” appears instead, it means you are still running in 32-bit mode. You dun goofed. Recheck your work.
3. Creating an “extra.txt” file for additional tweaks
Java comes with various command line options that can alter the way it runs. We can set these options to run when SK starts by created an “extra.txt” file in the SK folder.
For Web Client Users:
Exit SK
Open your start menu and enter %appdata% at the bottom; hit enter
You will be brought to your ~Users\AppData\Roaming folder
Navigate back to ~Users\AppData and double-click the “LocalLow” folder, then the “spiral” folder; this is your SK folder
In your SK folder create a file named “extra.txt”
For Steam Users:
If you read Part 1, you should already have done this.
4. Allocating additional RAM for Java
SK by default allows itself to use up to 512mb of your system memory. Even the most modest machines will have much more RAM available to utilize.
In your extra.txt file enter the following lines:
-Xms##
-Xmx##
We will configure this option based on the amount of RAM you have installed:
If you have 4GB of RAM or more, set the numbers to 3G
If you have 2GB of RAM installed, set the first value to 1G and the second value to 512M
If you have less than 2GB of RAM, ignore this step and buy a new computer
The values given here attempt to maximize the amount of RAM allocation, even if the game does not necessarily need so much. We are erring on the side of caution and assuming you play with all extraneous applications closed.
5. Getting rid of stutters
If you have a multicore processor, enter the following lines in your extra.txt file:
-XX:+UseParallelGC
-XX:+UseParallelOldGC
If you don't have a multicore processor then enter these lines instead:
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode
-XX:+ExplicitGCInvokesConcurrent
6. Save your extra.txt file and enjoy smoother gameplay