Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TUTORIAL] Netgraph explained

#1
Good day gentlemen,

every now and then there comes up a discussion on how exactly the netgraph works. There seem to be countless of experts that complain about bad server performance according to their netgraph, but when I explicitly ask they can't tell details ("netgraph just looks bad")

So my question is, does anyone here know what all the lines and colors mean?

Lemme get an example:


.jpg   netgraph.jpg (Size: 99.54 KB / Downloads: 112)


Obviously this netgraph doesn't look too good, or does it?

1) What is the blue line?
2) What is the yellow line and why do some spikes show up white and some stay yellow?
3) What are the green dots on the outgoing yellow graph?
4) What is the red line and why does it sometimes show huge red spikes and sometimes just small white ones?

I apologize if this topic has been discussed already, I couldn't find a thread about it.

Thanks for help,

Chris ( qbit )

All right, we've found an old post by LordHavoc himself Cool

First the bad/special ones:

Red is lost packet (out of sequence packets also count as lost as they are no longer relevant by the time they are received) - you want as little of this as possible!

Yellow is choked packet, meaning that your rate limit is set too low - note this only shows on your outgoing graph (incoming does not know if packets were choked).

If it's not one of those colors, then it is a bar graph showing how much of each of the following traffic occurred in the given direction (received or sent):

Orange - normal unreliable messages, this includes input (which looks like a pretty flat block, sometimes interspersed with yellow if your rate is set too low), explosions, sounds and other effects, as well as game objects and most other data.

White - reliable messages, such as chat, death messages, scoreboard frags/colors/name updates, screen flashes from item pickups, centerprint text (while spectating for example), and assorted other things that occur less frequently (such as when changing level).

Green - acknowledgement of receipt of reliable messages, for example when chat is received by the client, the input graph will show a green blip due to sending an acknowledgement packet, and if you send chat, the world (data from the server) graph will show a green blip a moment later.

There are two different graphs, one for world updates (from the server), and one for input (from you), the input one tends to look very boring as it uses a steady amount of bandwidth (other than chat), the world one varies wildly, and gets very high in fighting, eventually hitting a plateau when it reaches your rate limit.

Adjusting rate limit (higher or lower) can improve play, and cl_netinputpacketsperserverpacket can be adjusted when using cl_movement 1, other than that you have very little control over the network conditions.

source: http://www.alienTRAP.org/forum_old/viewt...=11&t=2219

Anything else to add to it?
[] qb!t
Reply

#2
We discussed this on irc with iamweasel and Sepelio, with help from bw_. Thanks Mario for suggesting to put that in writing on the forums Smile

The blue line comes from this commit in Darkplaces: https://gitlab.com/xonotic/darkplaces/-/...69d272dc6b

Basically, there is a rate limit system (both for inbound and outbound packets) that spreads out packets over time, allowing for some bursts. The blue line shows the difference between "clear time" and current time, where clear time is the time at which the buffer will be emptied, taking into account burst and rate limits. The time is mapped with a sigmoid function to the range (0, 1) (that atan function in the commit linked above) where 0.5 represents cleartime = time. It can peak a bit above 0.5 when there is room for a burst, and goes below 0.5 when packets are waiting in the buffer (thanks div for the info).

If the connection stalls, I guess cleartime does not get updated (both inbound and outbound) for some reason? Anyway, this shows up as both inbound and outbound curves increasing over time. (My understanding is not complete right now, I assume the Y axis is pointing down in the netgraph drawing code.)
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-