Forgive me if I make no sense because I don't know much about running a minecraft server other than how to hit a button and play on it with my friends... but I have a server that me and two of my friends play on and it kept crashing. I noticed that the RAM I have dedicated only had 1% free so I did a tutorial on how to increase the RAM for your server. Once I did that, as expected I started to run the server from a .bat file instead of the .jar file that you get from downloading a server on minecraft.net. My problem is the framerate issues that I have been getting ever since I increased the RAM... It isn't like a teleportation lag or anything but it isn't nearly as smooth as it was and it just irritates me a lot. It's almost as if the game twitches a lot more. I tried looking in the forums for other people with this problem but couldn't find it... lol idk maybe I wasn't searching the right thing. My PC was built 4 months ago specific to gaming, probably put $1200 into it, so I sure hope its not my computer that is the problem. If anybody has any idea what is going on here I would love to hear your input!
Java is a garbage collected language.
The size of the heap is also dynamic.
When the used memory gets to a certain %, Java performs garbage collection and frees everything that isn't being used anymore (garbage).
If after GC there still isn't enough memory, then Java tries to grow the heap.
IF you have too large a current heap, THEN there is a lot of room for garbage to accumulate before being collected. This then leads to GC taking a 'long' time, i.e. the response isn't smooth and stutters.
So, you want the heap to be right-sized, not just as big as possible.
Ok so are you saying that I should reduce the RAM that I made dedicated to my server? Sort of like finding the sweet spot so to speak?
I only set the RAM to 1 gig. Maybe Ill reduce it to 500mb and see if that helps. Thankyou
Sorry I was away from my computer all last night.
Ya I have the .bat file set at 1024M. I have 8G of ram in my computer anyways, so 16G isnt possible.
And yes I am running Windows 7 Home Premium 64-bit and Java 64-bit as well. It only seems to have the lag when I am running the .bat file. As soon as I go back to the .jar it is fine.
That's only calling for 256MB of memory... in any case, there's no path there saying which java to use.
When you run this you could be getting a 32bit java, or at least not the same java you get when you double click the jar.
It should be something like
"C:\Program Files\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar minecraft_server.jar gui
Might be jre6. But If your java is at Program Files (x86) that is a 32bit version and generally speaking won't perform as well.
Oh crap my bad the 256 was just me messing around trying to get it to work. I originally had it at 1024. Sorry :S
But ok I see what you mean. I just checked and I have Java in the Program Files file, not the Program files (x86). Its the jre7.
So Ill change it back to 1024 and put in the line that you just typed above, and see if that helps.
Ill report back soon, thanks
Unless you have a second java installation somewhere it shouldn't make a difference. Then again, it should not make a difference using the bat or not if you have reasonable heap parameters and only one java installed.
Well, I am fairly certain that I do not have the 32-bit version of Java installed, and I don't know how else I would figure out if I had a second version installed somewhere.
Just switched those forward slashes to back slashes, and its no surprise that it made no difference. Well, all I know is that on the .jar file, I get a steady 200fps. And on the .bat file, it drops down lower than 100fps occasionally. It may not seem like I should notice a difference, but trust me, I do.
Idk I guess I'll just try to run the .jar for as long as I can, and if it crashes too much Ill just suck it up and run the .bat.
Thanks for all your help anyways.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Forgive me if I make no sense because I don't know much about running a minecraft server other than how to hit a button and play on it with my friends... but I have a server that me and two of my friends play on and it kept crashing. I noticed that the RAM I have dedicated only had 1% free so I did a tutorial on how to increase the RAM for your server. Once I did that, as expected I started to run the server from a .bat file instead of the .jar file that you get from downloading a server on minecraft.net. My problem is the framerate issues that I have been getting ever since I increased the RAM... It isn't like a teleportation lag or anything but it isn't nearly as smooth as it was and it just irritates me a lot. It's almost as if the game twitches a lot more. I tried looking in the forums for other people with this problem but couldn't find it... lol idk maybe I wasn't searching the right thing. My PC was built 4 months ago specific to gaming, probably put $1200 into it, so I sure hope its not my computer that is the problem. If anybody has any idea what is going on here I would love to hear your input!
Thanks, Patties97
The size of the heap is also dynamic.
When the used memory gets to a certain %, Java performs garbage collection and frees everything that isn't being used anymore (garbage).
If after GC there still isn't enough memory, then Java tries to grow the heap.
IF you have too large a current heap, THEN there is a lot of room for garbage to accumulate before being collected. This then leads to GC taking a 'long' time, i.e. the response isn't smooth and stutters.
So, you want the heap to be right-sized, not just as big as possible.
I only set the RAM to 1 gig. Maybe Ill reduce it to 500mb and see if that helps. Thankyou
Do you have a 64bit OS and a 64bit Java?
Ya I have the .bat file set at 1024M. I have 8G of ram in my computer anyways, so 16G isnt possible.
And yes I am running Windows 7 Home Premium 64-bit and Java 64-bit as well. It only seems to have the lag when I am running the .bat file. As soon as I go back to the .jar it is fine.
@echo off
java -Xms256M -Xmx256M -jar minecraft_server.jar gui
pause
Thats what I wrote in the notepad
When you run this you could be getting a 32bit java, or at least not the same java you get when you double click the jar.
It should be something like
"C:\Program Files\Java\jre7\bin\java.exe" -Xmx1024M -Xms1024M -jar minecraft_server.jar gui
Might be jre6. But If your java is at Program Files (x86) that is a 32bit version and generally speaking won't perform as well.
But ok I see what you mean. I just checked and I have Java in the Program Files file, not the Program files (x86). Its the jre7.
So Ill change it back to 1024 and put in the line that you just typed above, and see if that helps.
Ill report back soon, thanks
I have it at:
@echo off
"C:\Program Files\Java\jre7/bin/java.exe" -Xms1024M -Xmx1024M -jar minecraft_server.jar gui
pause
Is this right? 'Cause when I run it I THINK it is a little better, but it didn't seem to make that big of a difference.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou might want to check the path you put in. (forward slash vs backwards slash).
Yes true say, I did mess up the slashes... Damnit. Thanks for pointing that out.
Idk I guess I'll just try to run the .jar for as long as I can, and if it crashes too much Ill just suck it up and run the .bat.
Thanks for all your help anyways.