Opened 3 months ago

Last modified 9 days ago

#27321 needs_information defect

incorrect bw calculation during initial startup

Reported by: a_p Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

when I start nyx on a relay it takes about 5 seconds until the UI appears.

The very first value for download and upload bandwidth is always extremely and unreasonably high (3GB/s) and reaches the actual value one second after that.

The problem of this is the impact on the avg. bw value shown, which is distorted due to this incorrect first value.

connected to tor via a controlsocket (not controlport)
os: FreeBSD 11.2
nyx version: 2.0.4
Python 3.6.6

Child Tickets

Attachments (4)

download_before.png (2.9 KB) - added by wagon 11 days ago.
upload_before.png (2.0 KB) - added by wagon 11 days ago.
download_after.png (2.8 KB) - added by wagon 11 days ago.
upload_after.png (1.9 KB) - added by wagon 11 days ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 13 days ago by wagon

The very first value for download and upload bandwidth is always extremely and unreasonably high (3GB/s) and reaches the actual value one second after that.

The problem of this is the impact on the avg. bw value shown, which is distorted due to this incorrect first value.

I see the same with nyx and client-only tor on Linux. At first, depending on terminal's width, the plot of bandwidth may have the width size of about 20 points (Ox, horizontal). At second, bandwidth scale in the plot may by dynamic (Oy, vertical). So, the correct values are plotted only after the first "impulse" (moving to the right once per second) leaves the plot, i.e. after about 20 seconds.

comment:2 Changed 12 days ago by atagar

Status: newneeds_information

Hi wagon, I'm unsure I follow what you're describing. Could you please attach a screenshot pointing out the issue and the 'nyx ---debug' log (redacted of any information you feel is sensitive)?

Changed 11 days ago by wagon

Attachment: download_before.png added

Changed 11 days ago by wagon

Attachment: upload_before.png added

Changed 11 days ago by wagon

Attachment: download_after.png added

Changed 11 days ago by wagon

Attachment: upload_after.png added

comment:3 Changed 11 days ago by wagon

Could you please attach a screenshot pointing out the issue and the nyx ---debug log (redacted of any information you feel is sensitive)?

I added screenshots.

If you use option graph_bound tight, you should be able to reproduce it (it is seen immediately after starting Nyx). You can see on *_before.png attachments, that only single 'impulse' is plotted, and its value is really high (3 MB/s for download, and 2 MB/s for upload). After this 'impulse' passed out, all values are calculated correctly (*_after.png attachments: few 'impulses', each with 3 B/s for download, and 543 B/s for upload).

Tor was not used by applications during these measurements. Tell me, if this is not enough for you.

comment:4 Changed 10 days ago by atagar

Hi wagon. This looks tor simply isn't reporting any traffic (the current value is zero bytes). Please log BW events. Nyx simply reflects whatever those events say. If the event is faithfully providing low values (commonly zero) then nyx is working as intended.

comment:5 Changed 10 days ago by wagon

Please log BW events

I disabled logging on my system, because I want my system to be more amnesiac about its past. I don't think that Nyx should rely on existence of old log files with BW events.

This looks tor simply isn't reporting any traffic

Don't you think that Nyx should recognize its start up as a special case, and start counting only from the first non-zero value(s)? "3 MB/s" jump during inactivity period looks as absurd anyway.

comment:6 Changed 10 days ago by atagar

I disabled logging on my system, because I want my system to be more amnesiac about its past. I don't think that Nyx should rely on existence of old log files with BW events.

It doesn't (though it used to use those prior to 2.x). If all those datapoints are from before Nyx started then they came from the output of a 'GETINFO bw-event-cache' command to tor.

You might not keep logs but the tor process itself still knows its last several datapoints.

Again, Nyx is just displaying data it gets from Tor. If that data's being faithfully reflected then this isn't a Nyx bug. If you feel that tor data is incorrect for some reason we can move this ticket over to the network team for further questions.

comment:7 Changed 9 days ago by wagon

If all those datapoints are from before Nyx started then they came from the output of a GETINFO bw-event-cache command to tor.

OK, good.

Sometimes these jumps are not so high (I don't know what their existence depend on), sometimes they absent completely. I think it is a minor thing anyway, but if somebody will have its own observations in future I am ready to listen about.

Note: See TracTickets for help on using tickets.