Having troubles with a local network server

    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    hi everyone.

    so my brother and I have been getting really into starmade, and being who we are naturally we wanted to host a private server to play together and customise our own world.
    So we are running the starmade-dedicated-server-windows file which opens a console and runs a server, we've use the dedicated server menu to give it 16G ram (1866) and were having crashing issues, even with only one of us on it , just by asteroids or a few pirates, it didn't take much to crash it. so we ordered an hp proliant server, I've got it setup and configured with 7 cpu threads and 32 gigs ram (speaking of which is the "
    CHUNK_REQUEST_THREAD_POOL_SIZE_CPU = 7 //Available threads of total for CPU generation. WARNING: too high can cause cpu spikes. About the amount of available cores minus one is best" setting in server.cfg threads or cores, seriously, im running 8 HT cores, so it makes a difference)
    so as soon as it was setup my brother tested it by going in and attacking a pirate station, and after a while everything froze and he disconnected, with a few "bad connection" pop ups along the way, the server is connected by 2 gig connections to a gigabit switch that also connects to both our computers and the gateway.
    I havent set up port forwarding on the GW yet so theres no public traffic, no firewalls, clean install of win2k16 full system is 36g ram(6x4g, 6x2g, 6xempty), 2x X5550 4core HT,


    how do you get best performance from dedicated servers? should i be running from that file or should i be running the starmade launcher and launching dedicated server? im expecting 1-3 local players and 1-3 public players max atm but want to get stable again. should I redo a clean installation and start a new server with new settings? could it be updating and config changes that causes crashes? what settings tend to cause issues that i should steer away from?
     
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    So we are running the starmade-dedicated-server-windows file which opens a console and runs a server, we've use the dedicated server menu to give it 16G ram (1866) and were having crashing issues
    Edit the StarMade-dedicated-server-windows.bat

    java -Xms2048m -Xmx16384m -Xincgc -Xshare:eek:ff -jar StarMade.jar -server

    The :eek: is the e : bit without a space going smiley on me.

    That should give you a max 16GB ram Server. 16x1024=16384

    CHUNK_REQUEST_THREAD_POOL_SIZE_CPU = 7
    Lower this to 5 0r 6 so the server has a little overhead even though you think it runs nothing else but StarMade.

    Use the Upload a File option to attach your server.cfg to a forum post.

    You can edit out any private data like the server address.

    You can also add the server logs. But let me first see your server.cfg for any obvious mistakes. It could be something simple.

    what settings tend to cause issues that i should steer away from?
    That list is very long. :whistle:

    I made a lot of posts about settings to use or avoid in this forum.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    ill upload it when i can remote in a little later, i'm in classes atm and my way into my private network is turned off. but just a quick question again
    Lower this to 5 0r 6 so the server has a little overhead even though you think it runs nothing else but StarMade.
    ok, sure but does this refer to my cores or my threads? the name makes me think its threads, which would be 16 threads. i wanted to give it 4 cores/8 threads so i have room for some other server services, but i was unsure as the value states threads but the description states cores.

    Edit the StarMade-dedicated-server-windows.bat

    java -Xms2048m -Xmx16384m -Xincgc -Xshare:eek:ff -jar StarMade.jar -server

    The :eek: is the e : bit without a space going smiley on me.

    That should give you a max 16GB ram Server. 16x1024=16384
    Awesome, okay, so i should edit the batch file directly, is 16G lots for a starmade server host or should i look into upgrading my server to 72g for more dedicated ram? i think my next upgrade will be switching the procs for x5670's or x5660's (6core HT each, x2= 12core 24thread) or more nic's but im unsure as to how much ram starmade wants or what resources its heaviest on.
     
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    ok, sure but does this refer to my cores or my threads?
    Cores. Anything above 4 should not add much so set it like this for now. Given that you want to do other stuff as well.

    CHUNK_REQUEST_THREAD_POOL_SIZE_CPU = 4

    im unsure as to how much ram starmade wants or what resources its heaviest on.
    StarMade loves a powerfull multi Core CPU. It can never get enough of it. RAM is less important 16 GB is more then enough.

    full system is 36g ram(6x4g, 6x2g, 6xempty)
    On a side note since you have so much RAM and a lot of banks populated. Make sure each module of RAM is error free. Even a single damaged bit can destroy your server. StarMade is like a stress test tool for computers. If it is going to fail then it will fail while running StarMade. Damaged memory can give very weird errors.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    here is my server.cfg before my most recent changes (cpus)
    how should i check my ram? cant remember if memtest is good for ECC RAM or not.
     

    Attachments

    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    cant remember if memtest is good for ECC RAM or not.
    Memtest works with ECC RAM. I just suggested this as a side note. I do not think your current problems are related to faulty RAM. However given that you use many modules. Running this just as part of general computer health is never a bad thing. I ones replaced half my pc until i finally tracked the fault to a broken RAM Module. Should you do this then check each module on it's own remove the others.

    Here is my read back of your server.cfg a few things stand out nothing special but it might help:

    PROJECTILES_VELOCITY_MULTIPLIER = 1.2 //multiplicator for projectile velocity

    Keep this at default 1.0 missiles are entities. The faster they move. The more CPU and Network is used.

    SQL_NIO_FILE_SIZE = 512 //megabyte limit of .data file when to use NIO (faster) (must be power of 2)

    Keep this at default 256

    ASTEROID_SECTOR_REPLENISH_TIME_SEC = 3600 //seconds until a sector that is mined down to 0 asteroids is replenished (-1 = never)

    There is a "possible" problem with Asteroids spawning on top of each other. If they do the Lag is real! Keep it at -1 for now.

    NT_BLOCK_QUEUE_SIZE = 2048 //How many blocks are sent per update. Huge placements will shot faster, but it will consume more bandwidth and is subject to spamming players

    Keep this at default 1024

    ALLOWED_STATIONS_PER_SECTOR = 2 //How many stations are allowed per sector

    Keep this at 1!

    MAX_SIMULTANEOUS_EXPLOSIONS = 20 //the more the faster explosions at the same time are executed (costs in total about 20MB RAM each and of course CPU because it's all threaded) (10 is default for a medium powered singleplayer)

    Default is 10 and you might even use less like 8 or 6.

    Authentication is off. On a local network this should not be an issue. But never ever run the server with out it externally!

    NPC_FACTION_SPAWN_LIMIT = -1 //Maximum npc factions per galaxy (-1 for unlimited (will still be around 2-10))

    The NPC is very resource hungery at the moment you could start a map with out them by setting this to 0. This setting does not effect your current map.

    Tip. If you do then replace the default in game stations with ones of your own or from the dock. Just add them to your blueprints-stations folder. You can remove the old ones. Do this before you start a new map to "seed" the map with them. This does not work on existing maps. Note that all maps use the same stations that are in the blueprints-stations folder. So if you have more then one map. Then you need to place the old ones back in the same folder after you seeded your new map.
     
    • Like
    Reactions: valir
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    awesome, thanks, alot of those i wasnt sure about and the information was fuzzy. i think the asteroids was an issue, as for the others, how do SQL size and block queue size effect the server? would bigger files not help speed if i had the space? and the block queue was an experiment, does it help with local network game speed? ive changed them all back and changed the ram but now im getting
    Invalid maximum heap size: -Xmx16384m
    The specified size exceeds the maximum representable size.
    is this a java issue? any idea where to change the "maximum representable size"?

    --EDIT
    -nevermind this is a java thing.
     
    Last edited:
    Joined
    Feb 10, 2017
    Messages
    350
    Reaction score
    775
    • Community Content - Bronze 2
    • Legacy Citizen 5
    • Likeable
    Have you tried giving it less RAM? For my home server I've allocated 8 and even this is too much as I've never seen the VM my home server runs on use more then a few Gigs including OS. I'm considering dropping RAM back to 6 or even 4. Admittedly I'm new to this game and haven't done anything huge in it other then load some large ships and general mucking around. 16G for 2 people on a home server is just dick waving and would be the first thing I looked at if there were any problems. (Maybe it's just my Minecraft background influencing me, Java didn't play well with too much memory there...) Cut it back to 8 and see if there's any change... especially before going through checking your RAM individually, that's a real PITA and almost always, (in my experience,) turns up diddly squat.

    Edit: lol, I lie, still had my old test server launcher settings configured. So I was at default Java launch settings. Thanks to this post I double checked and bumped my xms from 512 to 1024 and my xmx from 2048 to 8096. RAM usage has now creeping toward 4G... performance wise I can't tell any difference... yeah PEBKAC Ltd. strikes again.
     
    Last edited:
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    nevermind this is a java thing.
    Yes i have never run a server with 16GB. So i do not know at what point Java says this is all i am going to accept. You read about people running 32GB servers but i am a little doubtful it is all being given to StarMade. Let alone that StarMade would require such a large amount of RAM. The CPU side would probably overload should you manage to fill it. StarMade is all about the massive amount of CPU calculations going on at once.

    how do SQL size and block queue size effect the server? would bigger files not help speed if i had the space? and the block queue was an experiment, does it help with local network game speed?
    It is about avoiding choke points and creating balance between all the many settings. You could tell the server to increase the feed. But you will run into problems when something bigs goes down while you play.

    Here are a few more post to help setup an amazing StarMade Server:

    Pirates choise of ships

    Pirate and AI

    Thanks to this post I double checked and bumped my xms from 512 to 1024 and my xmx from 2048 to 8096. RAM usage has now creeping toward 4G... performance wise I can't tell any difference...
    That just shows how well StarMade uses the available RAM. It can do lots of things with very little. Not counting recent additions like the NPC. I really hope the RAM footprint stays low. Since most server host companies sell server space at a RAM used cost.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    Okay, i managed to fix it, seems letting java decide the version gets you stuck with 32-bit which means 4gig max, had to manually uninstall and reinstall the 64-bit and it started just fine, and ran beautifully, first thing i did was take my ship to a pirate station and blow it up along with a few fleets, not a bit of lag or connection issues, smoother than i've ever seen it!

    Have you tried giving it less RAM? For my home server I've allocated 8 and even this is too much as I've never seen the VM my home server runs on use more then a few Gigs including OS.
    most of the networks i run with are 4-8 gig ram to 2 cores per server sometimes more for exchange servers or SCCM. my pc is 16g ram, 8core 4.4ghz, strix r9 380 4g, my bro's is 32g ram, 4core HT 4.4ghz with dual strix 1070's in SLI so i'm used to useing lots of ram lol (since its such an impact on performance when your short at all) its got 16G for starmade now, but i'll set up perfmon to log how it runs to see if i can find the heaviest amount it uses.

    as for hosts, yeah so far its just two, but im forwarding ports for a few more players soon, and theres 2-3 more computers in the house that can run it. right now we are just building/testing the settings

    (Maybe it's just my Minecraft background influencing me, Java didn't play well with too much memory there...)
    Speaking of minecraft, i was thinking of putting one on my server aswell, so i can share a world with a few friends, what are your recommends for resources for a minecraft server?

    It is about avoiding choke points and creating balance between all the many settings. You could tell the server to increase the feed. But you will run into problems when something bigs goes down while you play.

    Here are a few more post to help setup an amazing StarMade Server:

    Pirates choise of ships

    Pirate and AI
    Ok so ill go for the 6core HT CPU upgrade next, as it seems like a better choice

    okay, that makes sense, the links were very helpful, never knew those commands or setting them in catalogue, that will help, we've already started with custom factions.

    any more advice? i know computers well but serverhosting is new :P

    Oh! also, when trying to make things less laggy, i had the asteroid physics set to false. I've noticed that if i run into an asteroid then whenever i try to mine it the game gets bogged down HARD like from 0 ping mining the asteroid beside it to 300+ ping while mining the one i rammed with obvious lag and "server under heavy load" banners, is this normal? is it better on the system to have asteroid physics set to true or false? (i even tested this after changing the memory to 16G and still bad)
     
    • Like
    Reactions: Batavium
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    okay, that makes sense, the links were very helpful, never knew those commands or setting them in catalogue, that will help, we've already started with custom factions.
    The full Admin command list can be found here: Admin Commands

    any more advice? i know computers well but serverhosting is new :P
    It depends a bit on what you want with the server. For a local host security is less important but for outside connections you want Authentication on.

    If you White list the server. Then you also do not need to advertise it in Starmades own server browser. People can manually connect to the server. One less target to doss.

    Check that you are the only Admin on the server! An Admin has a $ sign infront of his name. On default StarMade does not add you as Admin. The server Admin list will be empty and Everyone will be admin! To check the Admin list do:

    /list_admins

    To add an Admin to the list do:

    /add_admin valir note the spelling it has to be perfect! So like Batavium not batavium.

    For a public server you need to create a safe spot for new players to start. A protected spawn is then handy. Default spawn is at the pilon shop at 2 2 2 and is without protection. But you can change that freely.

    /sector_chmod 2 2 2 + protected

    I make a whole protected bubble of 3 by 3 by 3 sectors around spawn. Every player exists in a 3 by 3 by 3 sector bubble.

    Disable dynamic shop prices so no one can get rich by selling computers between shops.

    You can move people, ships and even stations with teleport commands. Careful if you do this with a station. You or some one else have to be in a build block. The whole station and everything docked to it will move!

    At some point you might want to increase your sector size a bit. Careful this has a big impact on how the server runs and not for the good! You can make them bigger on an existing map but not smaller! Use baby steps see how it runs and how big your map file gets. I would keep them small myself.

    The current planets in the game create a lot of trouble. Try to stay away from them.

    I've noticed that if i run into an asteroid then whenever i try to mine it the game gets bogged down HARD like from 0 ping mining the asteroid beside it to 300+ ping while mining the one i rammed with obvious lag and "server under heavy load" banners, is this normal?
    StarMade handles collision any collision very badly. The Asteroid physics setting is about can Asteroids move in space. At this point you want to keep that on false. Try not to hit the Asteroids with your miner.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    The full Admin command list can be found here: Admin Commands
    Yes i just came accross that, thank you, i will print out a copy
    It depends a bit on what you want with the server. For a local host security is less important but for outside connections you want Authentication on.

    If you White list the server. Then you also do not need to advertise it in Starmades own server browser. People can manually connect to the server. One less target to doss.
    yes, i already changed authentication lol dont want bots or malicious people connecting :P and a whitelist will probably be in order aswell thats a good idea. i dont plan on listing the server, just word of mouth and my own website for info
    Check that you are the only Admin on the server! An Admin has a $ sign infront of his name. On default StarMade does not add you as Admin. The server Admin list will be empty and Everyone will be admin! To check the Admin list do:

    /list_admins

    To add an Admin to the list do:

    /add_admin valir note the spelling it has to be perfect! So like Batavium not batavium.
    Never thought of that, thanks, ill make sure to do that before i forward any ports lol and change the superadminpass
    For a public server you need to create a safe spot for new players to start. A protected spawn is then handy. Default spawn is at the pilon shop at 2 2 2 and is without protection. But you can change that freely.

    /sector_chmod 2 2 2 + protected

    I make a whole protected bubble of 3 by 3 by 3 sectors around spawn. Every player exists in a 3 by 3 by 3 sector bubble.
    sweet, that will help, i might do a base aswell or a different spawn point entirely
    Disable dynamic shop prices so no one can get rich by selling computers between shops.
    hmm didn't know this, will do
    You can move people, ships and even stations with teleport commands. Careful if you do this with a station. You or some one else have to be in a build block. The whole station and everything docked to it will move!
    i saw this in another post, that could prove useful, ill have to keep in mind it carries the ships though
    At some point you might want to increase your sector size a bit. Careful this has a big impact on how the server runs and not for the good! You can make them bigger on an existing map but not smaller! Use baby steps see how it runs and how big your map file gets. I would keep them small myself.
    i heard about this one already, but just changed it last night, how does it effect gameplay? does it cause lots of empty space or will it help with not finding asteroids?
    The current planets in the game create a lot of trouble. Try to stay away from them.
    yes, ive read about that, ever since a couple planets ate our ships we stopped going anywhere near them, would it be beneficial to reduce their size to minimal?
     
    Joined
    Jan 28, 2015
    Messages
    492
    Reaction score
    149
    • Community Content - Bronze 1
    • Purchased!
    • Legacy Citizen 3
    i heard about this one already, but just changed it last night, how does it effect gameplay? does it cause lots of empty space or will it help with not finding asteroids?
    It creates lots of empty space. But that will not stay empty as people play the server. Some sectors will get very heavy. The plus side to a bit bigger sectors is that sector crossings do not happen so often. But i find the negatives much greater then the benefits you have to toy with it a bit.

    Asteroids spawn in the yellow circles on the map. Not every system has Asteroid belts. The Asteroids are at the center of a sector. Different types of Asteroids spawn at different distance from the center Star.

    would it be beneficial to reduce their size to minimal?
    YES
     
    Joined
    Feb 10, 2017
    Messages
    350
    Reaction score
    775
    • Community Content - Bronze 2
    • Legacy Citizen 5
    • Likeable
    Speaking of minecraft, i was thinking of putting one on my server aswell, so i can share a world with a few friends, what are your recommends for resources for a minecraft server?
    I run FTB Crackpack these days as I got tired of maintaining my own pack, I don't play that much anymore and it's mainly for my kids. Having said that, even in heavily modded MC I've never used more then xms 2G and xmx 4G for the server. I like to conserve resources so I tend to start low and give it more if it needs it. I've heard people going to 6G or even 8G but I've also read that it can cause major issues with lag spikes due to the load caused by large garbage collection. I like the KISS principal and don't like long and complicated Java launcher arguments so am not prepared to do the mucking around to get it working with lots of RAM. So yeah tldr go with xmx 4G and bump/experiment if you have issues. You can monitor RAM usage in game.

    ps. If you're going to setup multiple game servers on the same machine I very much recommend looking into Virtualbox. Having each game run in it's own VM which is easily cloned and backed up is essential IMO. Headless Linux (Debian is my goto), VM servers are easy to manage over ssh and low on the resources with very little overhead. It also keeps your host OS clean and tidy and more secure, you don't get game files cluttering it up and if a VM gets hosed or vandalized you can just delete and restore a clone...
    EDIT; PHPVirtualBox is a nice web interface for managing Virtualbox on a headless server... recommended!
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    You could use Proxmox for home VM hosting and it's free. Easy to setup and everything you need support wise is online.
    [doublepost=1491534751,1491534672][/doublepost]Oh, and if you want to setup a nice NAS for it, you can use FreeNAS.
     
    Joined
    Apr 5, 2017
    Messages
    11
    Reaction score
    1
    ps. If you're going to setup multiple game servers on the same machine I very much recommend looking into Virtualbox. Having each game run in it's own VM which is easily cloned and backed up is essential IMO. Headless Linux (Debian is my goto), VM servers are easy to manage over ssh and low on the resources with very little overhead. It also keeps your host OS clean and tidy and more secure, you don't get game files cluttering it up and if a VM gets hosed or vandalized you can just delete and restore a clone...
    EDIT; PHPVirtualBox is a nice web interface for managing Virtualbox on a headless server... recommended!
    lmao, yeah, believe me i know how VM's work, no one does one OS to one server anymore its a host with VMs or a hypervisor
    i usually just run with Hyper-v (microsoft's built-in) or VMware. and yeah, i would probably designate one nic to one VM running one game server. right now im playing with 2k16 because i havent used it yet just 2k12/2k8 but i will probably rebuild it with ubuntu server core after some testing so i can use the system more efficiently. i think once im done testing the server and have the first 3 factions set up ill convert it over to an Ubuntu server core on a hypervisor. its just easier to to teach windows gui than linux terminal and i dont have alot of time these days to do it all so my brother works on it too.

    You could use Proxmox for home VM hosting and it's free. Easy to setup and everything you need support wise is online.
    [doublepost=1491534751,1491534672][/doublepost]Oh, and if you want to setup a nice NAS for it, you can use FreeNAS.
    Hyper-V is free and built into every microsoft OS, VMware is free-ish and pretty good (and they have a free hypervisor too)
    i would never VM a nas though, the whole reason to have nas is access, i would want to give it its own 2+ gigabit connections (not share with other systems/OS's) and run a raid configuration or 2, that is ONLY doing nas things, without creating a bunch of vhds . at that point you might as well just create an open share on one pc and run net use on the other pcs.

    Im writing up an auto-backup script in powershell and putting it on a schedule to do a daily on-site backup of the server, server.cfg, and customblockbehaviorconfig.xml and a weekly off-site backup to a 1t Mirror (deleteing backups older than 3 months) so i wont need a nas for the server anyway.
     

    Lone_Puppy

    Me, myself and I.
    Joined
    Mar 12, 2015
    Messages
    1,274
    Reaction score
    529
    • Purchased!
    • Community Content - Bronze 2
    • Legacy Citizen 8
    i would never VM a nas though
    For sure! I wasn't suggesting you to. If you have a spare box, even with JBOD, it's useful as a NAS on your network.
    Although you could use Windows Server to do the same, which has really useful clustering that Hyper-V works well with.