Jump to content

Profiling your server - redux - I need You!


Recommended Posts

I create host dedicated server on Amazon EC2, plan t2.micro

 

I tried host several times and server working great, can serve up to 9 player with out any problem.

 

Then at day 18 (usually that day), server become bad. Everything lag and can't play anymore and i have to

make a new world.

 

the CPU usage is 100%.

 

Down there is my profile, mod setup and save.

 

I can give you access to server if you ask to :(

 

yjHigcv.png

 

DST_Profile.zip

dedicated_server_mods_setup.lua

profile.zip

Link to comment
Share on other sites

I create host dedicated server on Amazon EC2, plan t2.micro

 

I tried host several times and server working great, can serve up to 9 player with out any problem.

 

Then at day 18 (usually that day), server become bad. Everything lag and can't play anymore and i have to

make a new world.

 

the CPU usage is 100%.

 

Emphasis is mine. Amazons t2 plans are "Burstable Performance Servers", what this means is you are given a certain amount of CPU credits to begin with. You will generate credits continuously while idle and use them while the server is active.

Whenever your CPU goes over a certain performance threshold, it will begin using the credits up. Once your credits are all used up; well, you've seen what happens. So it's not the game that's causing the server lag, unfortunately it's your server atm.

These types of servers are not designed for instances that require constant CPU usage (eg: game servers), they are for cases where you only need high performance in short bursts and low performance the rest of the time. I suggest scaling up to to their m3 instances (I'm on the m3 medium sydney server ($40 a month)) and every person who has joined my server mentions it is the best performing they have ever been on.

 

More on topic though @Biziboi...

My server is running 35 mods, would my performance stats be of any use to you still? Or are you more looking at servers not running such an over packed mod list.

Link to comment
Share on other sites

  • Developer

@vikeyev,

 

I`d definitely still be interested in seeing your profile. Each data point is valuable :)

 

@SunSakelly,

 

Thanks for the data, I`ll have a look at it, but I think @vikeyev pretty much explained what`s going on for your server.

 

I`ll keep investigating how to make DST perform better on dedicated servers across the board.

Link to comment
Share on other sites

  • Developer

@ToNiO55,

 

I get a file not found on the link you supplied, could you doublecheck? Thanks :) 

 

@RFiD,

 

Yeah, your profile is puzzling. You could check with the server provider if they have hyperthreading enabled for your server and whether it`s an option to have it disabled. It *seems* that hyperthreading impacts performance in a strange way (this is somewhat speculative, I haven`t been able to put my finger on it yet).

Link to comment
Share on other sites

  • Developer

@ToNiO55

 

Whoops, my bad. Somehow your post showed as `new` for me, so I went to grab the profile, but I now see that it wasn`t new at all!

 

@SunSakelly,

 

I just looked at your profile and it seems indeed the process is scheduled at a pretty low priority when that happens, things that normally take 1 ms now take 36ms - likely as @vikeyev said, the credits are gone and the process is scheduled with low priority, getting way less CPU time than it needs.

Link to comment
Share on other sites

Profile is here in my Dropbox. in the attachment because I'm an idiot who doesn't read.

Running on a Virtual PC rented from Amazon Web Services, Specs are:

Intel Xeon E5-2670 v2, 1 vCPU
3.75 GiB ram
1 x 4 SSD storage
Ubuntu Server 14.04.2 LTS
 
 
 
Unfortunately, that is all of the information they give me about it sorry.
 
Mod list:

Abigails Woe
Caloric Countdown
Cannibalism
Detailed Tooltips
Drop Stuff on Kick
Dynamic Season Length
Extra Equip Slots
Four Characters in One
Freezer
Game and Item Tweaks
Gesture Wheel
Global Positions
Health Info
Krampusnacht
Larger Campfire Collision
Loot Drop Tweaks
More DST Characters
Ownership
PickyPickyPicky
Recipe Rebalancer
Resurrection Shelter
Sanity Tuner
Slower Sanity Drain
Smarter Crock Pot
Soulmates
Status Announcements
Storm Cellar
Wall Gates
Where's My Beefalo
Woodie For DST

 

Is it possible to setup a script that will automatically run the profiler if the server performance hits a certain threshold? Sometimes (but rarely) the server performance will go to crap for a short while, but sitting in the server and waiting for it to happen would be pointless as it might not happen for days (or it might happen in seconds; no way for me to know).

profile.json.zip

Link to comment
Share on other sites

My Server

[Tw]Vadise Open Server

Total number of days:173

Max Player:10/10
Endless
Autumn
Version:v137679
 

Optical Network:
60M/20M

AMD FX-4100 Quad-Core Processor(4 CPUs)-3.6GHz
RAM:8G

Mods List:
http://steamcommunity.com/sharedfiles/filedetails/?id=440496678
 

 

As long as there are three high-PING server players
HOST will become Bad HOST
 
Even I even own my own server is the same

Vadise.zip

Link to comment
Share on other sites

  • Developer

@BaiSu,@ToNiO55,  

 

Cheers guys, I can clearly see one areas I should focus optimization on (and another one I should at least look at). Unfortunately the optimization takes a lot of time and research as they affect such core parts of the gameplay loop.

Link to comment
Share on other sites

Hi @bizziboi,

 

I understand that it must make be time and that this should be technically complicated, I just hope my profile will help you better optimize the game, we can understand that's going need so much time and that's huge work :)
 

thx you again for your help bizziboi

Link to comment
Share on other sites

Hey, do you reckon there would be a way to allow the Server Hoster to select processor affinity i.e. have the process run on a certain core/set of cores. Have something similar in my Team fortress server launcher (although not sure if it actually works), not sure if that's possible. 

Link to comment
Share on other sites

So I have been running a server on a t2.micro instance on Amazon for quite a while now ( and I know all about the the cpu credits and the quirks with this setup, I am very carefull and manage to always keep my credits balance positive, no problems there ) and everything runs fine performance wise and connection as well, never had any problems.

 

However, one of my friends who I play with, most of the time ( not all the times we play ) complains about huge lag, so much so that he spends one entire ingame day trying to open a chest despite we have an "Ok host" and his ping is low ( about 40-50, I believe its good ).

We have tried disabling movement prediction and he says that helps a little but still the lag for him makes it almost unplayable and it's always happening to only him, neither me or my other friends experience this.

 

So I don't know if a profile of the server would be helpful because the server runs very well, it's just that one player with a problem wich we think it's connection related but he has a good ping and besides he has very good internet connection ( 100 mb/s fiber ).

 

On another note, he never has any problems when we try a LAN server.

 

Would a server profile be useful in any way in this case?

Link to comment
Share on other sites

  • Developer

Hi @raiser,

 

A server profile may provide insight (but as you say, if it runs fine that shouldn't be the issue). Maybe you can have him grab a profile of his client as well (same procedure, open the console and enter "TheSim:Profile()")?

 

 

Link to comment
Share on other sites

Hey @bizziboi,

 

Well me and my friends will all be busy during this week but we will do that as soon as we can! I posted this here in the meantime because I wasn't expecting a quick reply.

 

Will upload the profiles as soon as I can. :)

Link to comment
Share on other sites

  • Developer

@Jeffs

 

While it would be fairly easy to add processor affinity settings (at least for some threads), it is generally not a good idea to pin a thread to a processor unless you have full control over the system. Since you are contending with other processes that may end up using the cores you set the game to use, thereby actuallly limiting its possibility to run even if other cores would be idle. This may explain why you can't tell if it's working on your TF server - while it will benefit in one way, it suffers in another.

Link to comment
Share on other sites

Host: ConaHa

Region: Tokyo / Japan

 

Ubuntu 14.04.2 LTS(GNU/Linux 3.16.0-36-generic x86_64)

Intel® Xeon® CPU E5-2660 v3 @2.60GHz / 6CPU

50 GB SSD Disk
8G RAM

100Mbit / 100Mbit

https://drive.google.com/file/d/0B6a488l7gg0BdFNvRlV6c2VyRnM/view?usp=sharing
 

This is what I set up in the ConoHa of VPS
And I use it to set up my Do not Starve Together Server
But then broke more than one thousand days later, he often easy LAG
I view the system usage, CPU often found in between 95 to 100%
This is not supposed to happen, after all, I have 6 core CPU

 

So upload information for authors examined

Use Mods:
http://steamcommunity.com/sharedfiles/filedetails/?id=440496678
Link to comment
Share on other sites

  • Developer

Hi @raiser

 

Thanks. 

The server indeed runs a very solid 60fps(it has about 70% time to spare). The client seems to run a tad over 30fps, so nothing way out of the ordinary. 

It does seem from the profile your server's tickrate is set to 30, I wonder if that could be related (although I don't quite see how it would be).

 

Sadly the profile doesn't show any indication of why things are going lopsided on his end.

 

 

Link to comment
Share on other sites

  • Developer

@Ksizor,

 

Nothing really standing out in that profile, except that sim seems to take a long time as does network logic so it ends up running below 60fps. Running a large world?

 

You can view the data - I think I mentioned it before - if not it was mentioned long ago on the original DS modding support.

 

 

 

 

Link to comment
Share on other sites

  • Developer

@Kzisor,

 

Whoops. I meant to include the info on *how* to view it. Accidentally pressed backspace while editing and when I retyped the message I forgot that part completely. Derp. Apologies, didn't mean to send you on a treasure hunt.

 

 

 

For others:

 

If you open Chrome and navigate to chrome://tracing you enter a profile viewer where the 'open' button should allow you to import profile.json.

 

(Edited, ah, figured it out. The info was there but the forum keeps deleting the line because there's a URL in it)

 
Link to comment
Share on other sites

Hi @bizziboi

 

I increased the tickrate to 60 on the server and that seems to have solved the problem completely for my friend who was having problems. Still remains the same for me and the other people. Now I don't even need to disable movement prediction. I don't really understand how the tickrate can affect just one single player everytime while still being fine for others?

 

Anyway I don't know if this is usefull information for you or anyone with simillar problems but there it is. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...