Server Lag Even When I'm The Host

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

darkdar4

New Member
Jul 29, 2019
11
0
0
Well i somewhat fixed it just using 1.5g with
Code:
@echo off
"%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms1536M -Xmx1536M -jar direwolf20.jar
pause
there is still delay but hardly any.
 
  • Like
Reactions: demchrome

Condor

New Member
Jul 29, 2019
11
0
0
Heya glasspelican, was wondering if you could help me out with the server code for my machine?

I am running it on an Alienware MX11 Laptop , the client is running on my desktop so the Alienware is just running the server.

The specs are I7 U640 @ 1.2Ghz, 8GB RAM, Windows 7 Home Premium 64 bit SP1.

Java installed is 64 bit (and the only one installed) Version 7 Update 10 (build 1.7.0_10_b18)

The server runs using the below code:

Code:
O:\Direwolf20_Server>java -server -Xincgc -Xmx4G -Xms2G -Xmn1G -XX:NewRatio=2 -X
X:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallel
RemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAc
cessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:
UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+Aggress
iveOpts -XX:+UseLargePages -XX:ReservedCodeCacheSize=1G -cp direwolf20.jar -jar
direwolf20.jar

But it gives the following error in the dos box, before running the server:

Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
The server keep giving the [Warning] Can't keep up.... message

It is playable with two people but every minute or so we get a 7 to 10 second lag spike, that it quite distracting!

Any help greatly appreciated!

ps I thought this post was best here as it carries on from your code to optimise servers. If this is the wrong place or hijacking this thread inappropriately I am quite happy to move it to a new thread.

many thanks
Condor
 

glasspelican

New Member
Jul 29, 2019
187
0
0
so I went and looked up some info on your computer http://ark.intel.com/products/47700/Intel-Core-i7-640UM-Processor-4M-Cache-1_20-GHz

given the low clock-speed of the laptop Im going to try to take advantage of intel turboboost
you can install this to see what its up to http://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=19105

Code:
java -server -Xincgc -Xmx6G -Xms2G -Xmn1G -XX:NewRatio=2 -X
X:CMSFullGCsBeforeCompaction=5 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallel
RemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAc
cessorMethods -XX:CMSInitiatingOccupancyFraction=80 -XX:+UseConcMarkSweepGC -XX:
UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2 -XX:+Aggress
iveOpts -XX:ReservedCodeCacheSize=1G -cp direwolf20.jar -jar direwolf20.jar

the should give you something that preforms better at the expense of more ram

as your world grows you will find it using more cpu and memory, you may want to look at running the server on a desktop
 

Condor

New Member
Jul 29, 2019
11
0
0
Thanks very much for that, I have tried the code and get no dos errors now, but do still get the [WARNING] Can't keep up in the server window.
I guess the poor little laptop is not man enough even though it is an Alienware gaming laptop !. I installed the turboboost and it is sitting at 2.00Ghz mostly and jumps up to 2.13 Ghz and down to 1.86 Ghz every 30secs or so.
In game is generally lag free and smooth, but still every minute or so we get a 7 to 10 sec lag spike.
My desktop is a brand spanking new I7-3700K with 10Gb ram and twin 580GTX's etc but still does the 7-10sec lag spike and the warning can't keep up. Odd....
Much appreciated. If you have any other thoughts they are most welcome.
 

glasspelican

New Member
Jul 29, 2019
187
0
0
I would like you to try this vanilla server command

debug <start | stop>
Starts a new debug profiling session or stops the session currently running. It notifies about potential performance bottlenecks in the console when active and creates a profiler results file in the folder debug when stopped.
from http://www.minecraftwiki.net/wiki/Server_commands

pastbin the profile when you get it (or whatever just dont post a wall of text in the thread), the longer you run it the better the results are, 10 min should be good enough

for your desktop you will want to make 2 changes to the start command I gave you for your laptop
Code:
-XX:CMSInitiatingOccupancyFraction=90
-XX:ParallelGCThreads=4

this mod may also be helpful
http://www.minecraftforum.net/topic/1548779-1476-ticks-per-second-v0411/
 

glasspelican

New Member
Jul 29, 2019
187
0
0
Ok so MC autosaves every 90 sec
try
Code:
/save-off
at the server console

make sure you run
Code:
/save-all
before you shutdown the server :p
 
  • Like
Reactions: Condor

Condor

New Member
Jul 29, 2019
11
0
0
Thank you, godlike abilities have you. Seems to be running a treat now !

Ta very very much :)
 

Vape666

New Member
Jul 29, 2019
1
0
0
As the other player on Condors server i too would like to extend a virtual pint to you good sir. Server is now running stable and fast. We salute you. :)
 

Sir_Moodz

New Member
Jul 29, 2019
44
0
0
are you using the minecraft server gui? if you are, add nogui at the end of your server.bat file, this reduces cpu by 90%