Forums › English Language Forums › Technical › Technical Issues

Search

Spiral Knights Performance QUICKFix <reduce or eliminate lag>

8 replies [Last post]
Fri, 08/15/2014 - 20:57
Klipwc's picture
Klipwc

(This is a re-post from general discussion, thanks darkbolt)
Was brought to my attention that people have not done memory allocation for their Java. Looking at you Luigi!!!
If you ever wondered why the heck couldnt you play High with a monster gaming rig or why you lag on low. Please look below - . -
EDIT:
SEE 3RD COMMENT FOR SIMPLIFIED VERSION

This is a quickfix for your spiral knights. If you stutter due to skill spam or players joining the game, this will help.
First let me be clear. This will in absolutely NO way solve latency lag. That is a server problem not a memory allocation problem. It will however prevent you... or at least reduce the chances of you rubberbanding into lava-pits every time someone uses a Polaris or a pet skill.

What this does:
Spiral Knights only allocates 512MB of memory to your game. This is absolutely ridiculous since even the most dumb-down computer has 2gb...mostly. So what you are going to do is to allocate more memory to your game. The following is a step by step guide to what you need to do.

Here it is, Step by Step:
Go to control panel, look for JAVA, Click on the Java tab, click View.
You should see one line here, if you see more than that means multiple instances of Java has been installed and you really ought to rectify that
Under Runtime Parameters. Add this line: -Xincgc -Xmx4096M
What this does is allocate 4GB worth of RAM to java programs, you can either increase or decrease the number depending on your RAM size. so if you only want 2gb, change 4096 to 2046, or just 2000 (dosent really matter) 4gb is more than sufficient.

REMINDER: COPY OUT YOUR java_vm FILE BEFORE YOU DO ANYTHING.

Now you are done with your memory allocation, but spiral knights uses its own java (ask OOO dont ask me)
You need to copy out your jreX (X for java version, mostly 7) and replace your java_vm file with jreX and rename to java_vm in your spiral knights game folder.

You can find jreX at either program files(x86) or program files, the former is 32bit java
java_vm is located in YOUR GAME FOLDER. Whether it be in steam or non-steam. If its in steam its located in \Steam\SteamApps\common\Spiral Knights. If you are using the non-steam, right click your spiral knights shortcut, click properties, click open file location.

For people using 64 bits java, please remember that your 64 bits java is located under program files, not program files(x86). SK uses 32 bit by default. And yes 64 bit will improve performance further.

If you are still having problems with lag, bring up your task manager and check how much memory SK is using, Enter a map (FSC or roar twins works well) and see if the memory used increases beyond 512MB if it does and you are still lagging, its either latency, or see below 2. If its still below 512, something went wrong and the memory allocation isnt been applied, 2. might also help.

P.s: i dont normally read the forums, contact me in-game if you need help instead... if i am free i just might.

Possible problems: (ignore if its working)
1. You BSODed
Idiot you set way too much RAM and your SK overloaded your computer... (this will not happen unless you only have like.. 1gb of ram or 2gb or you are running ALOT of programs at once)

2. You still lag alot
Try looking up memory allocation for windows, if you use seperate hard drives (like an SSD and a HD) you need to manually set an amount.
here.
http://windows.microsoft.com/en-sg/windows/change-virtual-memory-size#1T...

3. Nothing happened:
Try downloading Jre6, might work...

4. I dont understand your instructions
Contact me ign, if your question hasnt been repeated a thousand times i will help you.

Fri, 08/15/2014 - 23:34
#1
Arthexy's picture
Arthexy
no java_vm

hello, I looked everywhere, but there is no "Java_vm" in nowhere. I done what you said in the memory allocation but the jreX (7 in my case) and Java_vm doesn't exists. Jre7 is a folder, no file called Jre7 was inside.

Is that good?

Sat, 08/16/2014 - 00:15
#2
Klipwc's picture
Klipwc
Yes you are on the right

Yes you are on the right track, copy the ENTIRE Jre7 Folder into your SK GAME folder whether it be steam or non steam version.
You will find java_vm in your SK game folder. Replace and rename, remember to make a backup

Sat, 08/16/2014 - 00:41
#3
Klipwc's picture
Klipwc
Let me just simplify things

Let me just simplify things since people are asking,
Go to control panel,
look for JAVA,
Click on the Java tab,
click View.
Under Runtime Parameters. Add this line: -Xincgc -Xmx4096M
Locate jreX (X is your java version, should be 7), it should be in C:program files for 64bit and program files(x86) for 32
COPY jreX (Please do not for the love of, cut this folder)
Open a new folder
Locate game folder
Paste jreX here
CUT java_vm out to desktop, this serves as backup
Rename jreX to java_vm

Boot up SK, Profit

Sat, 08/16/2014 - 01:23
#4
Arthexy's picture
Arthexy
lol

Thats the thing, the Java_vm folder doesn't exist (yes, I'm talking about the SK folder), I will just copy jre7 and put it there and rename, that should do it?

Sat, 08/16/2014 - 01:32
#5
Klipwc's picture
Klipwc
That cant be possible lol..

That cant be possible lol.. well you can try, set your game to non-full screen and check taskmanager. If it goes beyond 512mb in FSC or intensive areas then you will be fine.

Sat, 08/16/2014 - 01:49
#6
Arthexy's picture
Arthexy
...

nah, the max memory was 651 mb, I don't think it worked the way I done.... Well whatever, my new pc might arrive soon. Thanks for your help!

Sat, 08/16/2014 - 07:41
#7
Pmdd
Hi !

Thx dude , u are awsome ! ;D !!!!

Fri, 02/20/2015 - 07:01
#8
Zenje's picture
Zenje
Thanks again!

This works so well. Had to dig through the forums to find it again for my new computer.

Powered by Drupal, an open source content management system