How to Make an Efficient Server

Xeonen

New Member
Jul 29, 2019
157
0
0
I've been running a FTB Server through my laptop for close friends and family. I'm having too much lag, and server is stuttering all the time. I've tried increasing RAM, I've checked net and forums for solutions yet in the end I've returned empty handed.

I have a modest laptop with 6 gigs of RAM and 4x2.7ghz CPUs and 20Mbit of internet connection. It should be able to handle 20 people yet, it is laggy even when I connect through a client in the same laptop.

I've had same problem with Vanilla 1.4.5 + IC2 and BC 3.2, had it with FTB 1.4.2 and had it with FTB Direwolf20 v2 1.4.6.

How can I make server more efficient and make it work more smoothly?



DX Diag Report


Time of this report: 12/29/2012, 18:21:49

Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7600) (7600.win7_rtm.090713-1255)
System Manufacturer: SAMSUNG ELECTRONICS CO., LTD.
System Model: RF510/RF410/RF710
BIOS: Phoenix SecureCore(tm) NB Version 01GB.M013.20100905.hkk
Processor: Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz (4 CPUs), ~2.7GHz
Memory: 6144MB RAM
Available OS Memory: 6004MB RAM
Page File: 3775MB used, 8231MB available
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7600.16385 32bit Unicode
 

OneFusion

New Member
Jul 29, 2019
11
0
0
A few things.

If you are going to run FTB Server on Windows, you really shouldn't play on the same machine you are running the server on. This is because, even with 6GB of RAM, you are forcing every bit of your machine to work twice as hard to keep up with JUST you, let alone your friends who are connected.

Second, if you are going to run FTB Server on Windows, eliminate as many running processes as you can which are unnecessary. Have an instant messenger? Skype? TeamSpeak? Anything else running? Yeah, close out whatever you can.

The laptop itself is sufficient to run the server IF it is the only thing it is running.

I am running a FTB Direwolf server on an older laptop with only 3GB of RAM will very little lag, if any, even when 15-20 people connect at a given time. I can assist further if needed.
 
  • Like
Reactions: Xeonen

Exxodus

New Member
Jul 29, 2019
3
0
0
I'm having some similar issues. I have run Vanilla MC servers and a Tekkit server for a while now, using both Windows and MineOS CRUX on my old 6Mbit DSL connection with no issues with 4 players. I now have a 30Mbit Cable connection, running FTB Direwolf20 1.4.6 on an AMD Athlon Dual core 3Ghz (same system as my Vanilla servers) and 6GB of RAM. In my FTB Server, the gameplay is very choppy, most evident when fighting mobs. For instance, you swing at a spider, it lags for half a second, connects with the spider, knocks him back and he stands there. Then the positions update and the spider is on top of the player the next instant. I know my nework and PC is set up to handle MC serving (as I have done this in the past) and I have increased my bandwidth from 6Mb down/256Kb up to 30Mb Down/4.5Mb up and yet I'm having this terrible lag issue. I have also tried disabling REI's minimap which fixed some of the FPS lag, but not this apparent server lag. Any ideas or help is appreciated.
 

OneFusion

New Member
Jul 29, 2019
11
0
0
The main reason glass doesn't have much lag issue is also due to having a graphics card with a decent processor of its own. This enables the system to load the majority of the minecraft environment using the GPU (graphics card) instead of the CPU. It makes a difference.

With that said, to Exxodus, I would say to also check into what texture pack (default?) you are using, as well as the actual graphics settings. There are many reasons for lag, especially client-side. The question is whether the server has enough RAM for itself. You can check this by simply watching the server output (the server window or the cmd prompt) for any messages stating the memory is low, or something similar.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
I've actually tried the technique on the thread that glass suggested and server didn't want to start. That lead to a long journey to learn server start-up commands which lead nay results. I do not think my problem is due to the lack of GPU since my own graphic card isn't that bad -GeForce GT 420M-.

I'll do some more tests with suggestions at hand and report the logs here.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
I've checked out version and typed as you suggested.

Code:
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
That is the result. I am testing single player right now, jumping between mystcraft worlds and flying to see if there is any stuttering on single player side as a control test. Right now, java.exe is using 1.8gig of ram and 25% of CPU on single player with no texture packs.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
5 gigs and 61% of CPU, right now MC SP is using 2.1gigs of RAM and 25% of CPU. I think my graphic card is borrowing 2 gigs of ram since when I manually add, my usage should be around 3 gig not 5 and graphic card at DxDiag shows 4gb instead of 2gb.
 

OneFusion

New Member
Jul 29, 2019
11
0
0
You're running ~3GB worth of other items? o.o Wow. Um, yeah. Close a lot of the excess programs. Cuz man. That'll lag you to hell right there with that kind of RAM drain.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
My graphic card seems to be leeching 2 gigs of ram from my total system, I have around 1 gig of extra usage, 90% of being chrome. I am searching for a way to get that memory back from card and let the system use it. I'll check out bios.


Update - BIOS didn't have an option to stop Graphic Card from taking excess RAM, after a clean restart with only Chrome open, I have 1,68gig of usage. If I dedicate 2 to Client and 2 to Server, I'll have some excess.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
that cpu usage is also worrying
Minecraft is single threaded, it should use no more then 25%
I've checked Affinity, it can use all my 4 CPUs and while jumping from world to worl with Mystcraft, I've reached 61% of CPU usage, still 1.8gig of Ram usage with 64x PureDB pack which I just added to see how much it can go before breaking.


Jumping between 4 worlds, single player could handle it. I'll try with server right now.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
Testing with server-client; RAM is quite alright, no problems with it, server has 512 to 2gigs of allocation and using around 640 yet it is hogging on CPU, and entering into a mystcraft world? IMPOSSIBLE without 10000 time outs.

On the general stuttering is a bit less. I'm tryingto increase the priority of server to dedicate it more CPU.
 

Xeonen

New Member
Jul 29, 2019
157
0
0
This is a clean world, last night whole FTB servers and clients folder enjoyed a nice SHIFT+DELETE, in the past one each pass from mystraft portal not even a new age, would make server work slower, slower and slower untill it slowed down to a stuttering mess.

This is the last reading I got before socket time out, I've used Direwolf Launcher code.

Code:
2012-12-30 08:24:00 [INFO] [Minecraft] Server Stats-----------------------
2012-12-30 08:24:00 [INFO] [Minecraft] Memory use: 178 of 1820MB (46% free)
2012-12-30 08:24:00 [INFO] [Minecraft] Threads: 1 Read + 1 Write
2012-12-30 08:24:01 [INFO] [Minecraft] Average tick: 21.178 ms
2012-12-30 08:24:01 [INFO] [Minecraft] Packets sent: 8, Average size: 66B
2012-12-30 08:24:01 [INFO] [Minecraft] Packets rec: 2, Average size: 9B

I guess I found a solution, I've checked the code glass suggested and rechecked it to see that I've missed ":p" and a semicolon. Going between ages is smooth enough, stuttering is very little. Here is the code.

Code:
java -server -Xincgc -Xmx2048M -Xms1024M -Xmn512M -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -cp "direwolf20.jar" -jar "direwolf20.jar"

I'll test the mod with this launcher line and return with results.


Update; easily passed between ages, these ticks are just after I've used a link book.


2012-12-30 08:32:51 [INFO] [Minecraft] Server Stats-----------------------
2012-12-30 08:32:51 [INFO] [Minecraft] Memory use: 489 of 1996MB (24% free)
2012-12-30 08:32:51 [INFO] [Minecraft] Threads: 1 Read + 1 Write
2012-12-30 08:32:51 [INFO] [Minecraft] Average tick: 9.693 ms
2012-12-30 08:32:51 [INFO] [Minecraft] Packets sent: 11, Average size: 114B
2012-12-30 08:32:51 [INFO] [Minecraft] Packets rec: 2, Average size: 5B
 

Exxodus

New Member
Jul 29, 2019
3
0
0
I tried the code for the bat file presented here and it worked! I appreciate everyone's help. The "tick lag" as we have dubbed it on my server is gone! However, I have been experiencing some artifacting and some stuttering textures as well as being able to see through the floor on occasion. I'm using optifine and the default texture pack for now.

Also, as grateful as I am that the bat file code works, if it wouldn't be too much trouble, could someone please explain what each of those commands does so I can learn something about this and possibly adjust the commands to my specific machine? As it stands I just copy>pasted it to see if it would have any affect (which it did, once again thank you!).
 
  • Like
Reactions: OneFusion

Exxodus

New Member
Jul 29, 2019
3
0
0
Thank you!

Now I just checked my CPU on the server, it only supports SSE 3. Would that be a problem? Should I change that to SSE 3?