Solved RAM allocation for server?

AliceTheVixen

New Member
Jul 29, 2019
64
0
0
Hosting: Self
Internet Speed: 33.17mbps download, 5.19mbps upload
FTB Version: 5.0.1/Direwolf 1.4.7
OS: Windows 7 64-bit
RAM: 8gbs
Video Card: AMD Radeon HD 6970
Processor: Intel Core i5-2500k 3.3ghz

Considering I'm new to these forums, I hope I read the Tech Support thread correctly. Either way, here goes. As anyone else, I'm running a server of my own. Most things run pretty smoothly, but from time to time, my friends complain of lag. Sometimes I can pinpoint the issue (i.e. their internet connection, or mine, as my routers frequently crash), but others, I sometimes wonder if it is my system. If I'm correct, the servers only allocate 512mb at start up? If so, I would like to know how to increase that to around 3gb. At the same time, I would like to know if anyone else can offer some performance tips that can be done within the software, as I'm not looking to outsourcing my server, or upgrading my hardware.

Also, I know the Tech Support thread said I must know how to use a batch file, and frankly, I have only heard this term a handful of times, so I'm going to put what I know about them here. Hopefully I can get this knowledge confirmed/built upon, before it gets deleted.

A batch file is a:
  • .bat file
  • series of commands to execute
  • edited in a normal notepad, similar to HTML editing
  • uses java script
This is all I know. Thank you all for your help and consideration, as browsing the forums and Google turned up nothing.
 

Velotican

New Member
Jul 29, 2019
799
0
0
Only increase the server RAM allocation as much as necessary, as all it actually does in practice is allow more of the world to be loaded at once and Minecraft is programmed to load as much of the world around players as it can get away with. I would raise it slowly until you stop having problems, as it will end up causing more hassle than it fixes if you increase it too much.

Other than that, the other possible throttle on your system is your upload speed, as this is the speed data is sent to your users and it's shared between all of them and whatever you happen to be doing on the Internet at the same time. The more you're doing on the Internet the less bandwidth you have for anything else. For most home use the upload pipeline is just used to upload the occasional file or more commonly to send download requests to servers so you don't notice its limitations. When you're playing the role of server, the importance of uploading and downloading is flipped, as now you are the one sending information to everyone else.

The RAM allocation will be a variable in the batch file. This size is fixed and assigned at startup of the JVM. In fact for FTB this is very simple, this is the complete contents of the batch file by default:

java -Xms512M -Xmx1G -jar ftbserver.jar

-Xms is the minimum amount of RAM given to the JVM and Minecraft, -Xmx is the maximum. Set these to whatever you prefer then save the changes and run your server. :)

Editing the .sh file has no effect; you will need to edit the .bat directly.
 

AliceTheVixen

New Member
Jul 29, 2019
64
0
0
That all makes sense. Is my upload speed of 5.19mbps enough to really cause issues? I could up my allocation to 1gb to see if it will affect performance, and I'm hoping that will definitely smooth things out. I have the RAM, so why not use it? Thanks for the help.
 

Velotican

New Member
Jul 29, 2019
799
0
0
It would only cause a problem if mods you were using were particularly demanding on bandwidth or you had a lot of users connected at once. Minecraft isn't very efficiently coded so I would guess that you'd start having problems related to bandwidth if you had more than 10 people online at once on a heavily modded server like FTB.
 

AliceTheVixen

New Member
Jul 29, 2019
64
0
0
No, I've only ever had 3 max, so it shouldn't have a problem. I upped to 2gbs, and I'm trying that for now. Thanks for the help.
 

Nessiroj

New Member
Jul 29, 2019
855
0
1
No, I've only ever had 3 max, so it shouldn't have a problem. I upped to 2gbs, and I'm trying that for now. Thanks for the help.
On my own modded server (DW20v5) with me and 3 friends i'm using atm 3GB, and find that to be running best. Only changed my xmx value, since the startup is nice to have low (server reboots automaticly @ 0400 CET) and in general there will be none on till 0800 so my server can run backs and scans during those 4 hours.
I monitored my output on my 100/100mbit line and the highest i have seen so far is 1Mbit / player when alot of things are going on. In general it aint that high.