Spiral Knights

Spiral Knights

243 ratings
Improve In-Game Performance!
By ZAMN
With this guide, you should be able to increase your performance quite significantly in SK. We’ll do so by making it use 64-bit Java instead of 32-bit as well as adding some parameters to use more RAM and CPU power.
4
16
   
Award
Favorite
Favorited
Unfavorite
Preparation
First off, you need to find out if you can actually run 64-bit applications as well as check how much RAM you have. While most PCs produced in the last ten years can run 64-bit, you might have installed a 32-bit operating system, which will prevent you from running 64-bit applications without reinstalling the operating system.

Open the start menu, right click “Computer” and press “Properties”. Here, you will find some information about your PC, including RAM and if your operating system installation is 32-bit or 64-bit. Take note of your RAM, as we’ll need to know how much you have later on.



If you are running a 32-bit system, you will not be able to run Spiral Knights on 64-bit Java and this guide is not for you.
Installing 64-bit Java
CAUTION! You will need to download from here! NOT from Java.com
Windows[drive.google.com]
Linux[drive.google.com]
MacOS[drive.google.com]

Once it’s installed, you need to open your Spiral Knights installation folder. If you’re playing through Steam, this should be C:\Program Files (x86)\Steam\steamapps\common\Spiral Knights. If you’re playing the standalone version of the game, it should be C:\Program Files\Spiral Knights. You can open the folder through Steam by right clicking Spiral Knights in your library, opening Properties, going to the Local Files tab and clicking Browse local files…



In that directory, you’ll find a folder called java_vm. Rename it to java_vm_backup, in case we screw something up



For Windows users: Go to Downloads folder and extract files from .rar archive we just downloaded (Java 8u251.rar). Now copy java_vm and extra.txt.



Go back to SK installation directory and paste it in there. Now if you did everything correctly, Spiral Knights should be running on 64-bit Java!



If the game no longer boots, you probably didn’t follow the instructions properly, and you'll have to rename java_vm_backup folder back to java_vm in order to undo the recent changes.
Verifying that it worked
Checking if the 64-bit Java installation is quite easy. Just start Spiral Knights and open the Task Manager by pressing Ctrl+Shift+Esc. Open the processes tab and sort by memory usage. You should find a java.exe process that’s using a decent amount of RAM. If it says java.exe *32, Spiral Knights is still running on 32-bit. If it just says java.exe, you’ve succeeded!

extra.txt - more RAM and CPU usage
Next step is to make Spiral Knights make more use of your system. Go to your Spiral Knights installation folder and create a text file called extra.txt. Note that you’ll only have to name it extra if you aren’t showing extensions. You can quickly see this by looking at digest.txt right above it. If it says digest.txt, do extra.txt. If it’s just digest, just do extra.

Open up the extra.txt and paste this:

-XX:+DisableExplicitGC -Xms512M -Xmx4096M -XX:+UseParallelGC -XX:+UseParallelOldGC

Depending on how much free RAM your system has
You can replace Xms and Xmx values
Here are some examples below:

16 GB RAM
-Xms512M
-Xmx8192M

8 GB RAM
-Xms512M
-Xmx4096M

4 GB RAM
-Xms512M
-Xmx2048M

2 GB RAM
-Xms512M
-Xmx1024M

For example my extra.txt is this:

-XX:+DisableExplicitGC -Xms4G -Xmx4G -XX:+UseParallelGC -XX:+UseParallelOldGC

If you have less than 2GB RAM: Both Xms and Xmx should be 512M

The last two lines tells Spiral Knights to use several CPU cores for garbage collection.

Closing words
Thanks for reading! If you’d like to know more, you can take a look at this old thread.[forums.spiralknights.com]

Also bear in mind that if you’re playing on Steam and use its Verify integrity of game cache function, it will restore back to 32-bit Java, in which case you’ll need to do this over again.
Knight Launcher
If you can't make this work, download KnightLauncher[github.com] and extract .jar file into your game directory. You might want to configure some settings from KnightLauncher though!
Like setting your desired memory, by default it'll be set to 512MB

60 Comments
RedGoat May 7 @ 8:11am 
game runs much smooth, good guide
dragon Apr 5 @ 5:16am 
I couldn't get the linux archive to extract properly, but I don't think it would work anyway since spiral knights on steam seems to be run through Proton.
I just plopped in a Windows Java 8 JRE I had instead which has been working so far.
Sad Robot Feb 25 @ 1:24am 
cheers fella
ZAMN  [author] Jan 11 @ 5:25pm 
Giving too much RAM can also cause crashes -I highly recommend only between 512MB and 3GB
ZAMN  [author] Jan 11 @ 5:17pm 
Can you copy and Paste your extra.txt here
ZAMN  [author] Jan 11 @ 5:16pm 
For example: if you have incorrect version of java installed it will cause problems and same for having multiple different java veraions
Jalswim Jan 11 @ 5:15pm 
I'm gonna guess that there's something incompatible with my system then because I followed the guide word for word, I even have the same xms/xmx settings as the guide.
ZAMN  [author] Jan 11 @ 5:12pm 
Crashes only happen if you didnt read & follow the guide correctly.
OR
Something wrong with your installation/system
Jalswim Jan 11 @ 3:21pm 
This seems to be giving me game crashes, not sure why. It works perfectly except for the crashing.
ZAMN  [author] Dec 27, 2023 @ 12:28pm 
Check the comment on download link for password