Server Lag Even When I'm The Host

darkdar4

New Member
Jul 29, 2019
11
0
0
me and my friends are trying to play DireWolf20 FTB but the server is lagging hard with many delays of breaking blocks or hitting mobs. can anyone help me out here?
 

glasspelican

New Member
Jul 29, 2019
187
0
0
what cpu do you have, how many cores, how much ram, what operating system

if your on windows, start menu-> computer (right click)->properties -> info!!!
 

darkdar4

New Member
Jul 29, 2019
11
0
0
what cpu do you have, how many cores, how much ram, what operating system

if your on windows, start menu-> computer (right click)->properties -> info!!!
System:
Processor: Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33GHz 2.33 GHz
Installed Memory: 8.00GB
System Type: 64-bit Operating System
 

glasspelican

New Member
Jul 29, 2019
187
0
0
Are you running the client and server on the same computer?

edit: then I will have something for you to test in 5min
 

glasspelican

New Member
Jul 29, 2019
187
0
0
you can try launching the server with this (goes in the start_server.bat)
please note that the command needs to be on a single line, it is spaced out so I can read/tweek it.
also make sure you set your server jar name correctly
If any of that sounds condescending Im sorry but these are problems I have had with people before
Hope it helps.

Code:
java -server -Xincgc -Xmx4G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc
-XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90
-XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp server_jar_name_here.jar -jar server_jar_name_here.jar

small print: the above code is tuned to the OPs system your computer may vary
 

darkdar4

New Member
Jul 29, 2019
11
0
0
you can try launching the server with this (goes in the start_server.bat)
please note that the command needs to be on a single line, it is spaced out so I can read/tweek it.
also make sure you set your server jar name correctly
If any of that sounds condescending Im sorry but these are problems I have had with people before
Hope it helps.

Code:
java -server -Xincgc -Xmx4G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc
-XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90
-XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=4 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp server_jar_name_here.jar -jar server_jar_name_here.jar

small print: the above code is tuned to the OPs system your computer may vary
wait i just copy and paste this to the server start.bat?
 

glasspelican

New Member
Jul 29, 2019
187
0
0
copy, change the server_jar_name_here to the name of your .jar file. and remove all the newlines ( enter key) so it all fits on a single line in the .bat
you will need to replace the current contentes of the .bat
 

darkdar4

New Member
Jul 29, 2019
11
0
0
user\home\desktop\FTBServer>Java - server - Xincgc -Xmx4G -Xms2G -Xmn1G -XX:Ne
wRatio=2-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048-XX:+CM
SParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc-XX:+U
seFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90-XX:+UseConcMarkSweep
GC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection-XX:parallelGCThreads=4 -XX:+A
ggressiveOpts-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G-cp direwolf20.jar -jar direwolf.jar[DOUBLEPOST=1357440745][/DOUBLEPOST]'java' is not recognized as an internal or external command, operable program or bath file.
 

darkdar4

New Member
Jul 29, 2019
11
0
0
i usually use this code to run my servers
Code:
@echo off
"%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms1024M -Xmx1024M -jar craftbukkit.jar
pause

is there anyway i can implement that code with this one?.(no administrator privileges)
 

glasspelican

New Member
Jul 29, 2019
187
0
0
yes actually its trivial

Code:
@echo off
"%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xms1024M -Xmx1024M -server -Xincgc -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -XX:+UseLargePages -XX:ReservedCodeCacheSize=1G -cp craftbukkit.jar -jar craftbukkit.jar
pause

I recommend changing
Code:
-Xmx1024M
to
Code:
-Xmx2G
as a minimum given that you have 8 gig of ram
I would also recommend having your admin install the latest 64bit build of jre7, it has a number of performance and security improvements
in that case your new path will look something like
Code:
%Program Files%\Java\jre7\bin\java.exe
 

darkdar4

New Member
Jul 29, 2019
11
0
0
now i get that error: no 'server' JVM at 'C:\Program (x86)\Java\jre6\bin\server\jvm.dll
 

glasspelican

New Member
Jul 29, 2019
187
0
0
the -server option is a standard feature
there is no reason that it should be missing
unless
could you try using the full path and not the program files system variable?
 

darkdar4

New Member
Jul 29, 2019
11
0
0
just had to change -server to -client. but now getting
Code:
Java GotSpot(TM) Client VM warning: JVM cannot use large page memory because it does not
have enough privilege to lock pages in memory. Error occurred during initialization of VM could not reserve enough space for object heap could not create the java virtual machine.
 

glasspelican

New Member
Jul 29, 2019
187
0
0
so it looks like you need to have an admin account to use -XX:+UseLargePages
you may have to start removing commands untill you get down to the ones you are allowed to use

is disappointing that you cant use the -server option, I have seen it reduce cpu usage by 20% when running MC