https://bugs.kde.org/show_bug.cgi?id=474828

            Bug ID: 474828
           Summary: The system monitor shows a zigzag (sawtooth) profile
                    when downloading at a constant rate.
    Classification: Applications
           Product: plasma-systemmonitor
           Version: unspecified
          Platform: openSUSE
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: ksysguard-b...@kde.org
          Reporter: ttk...@gmail.com
                CC: ahiems...@heimr.nl, plasma-b...@kde.org
  Target Milestone: ---

Created attachment 161840
  --> https://bugs.kde.org/attachment.cgi?id=161840&action=edit
screenshot shows zigzag profile of the network traffic

SUMMARY
***
The system monitor shows a zigzag (sawtooth) profile when downloading at a
constant rate.

Note, this only seems to happen on systems where the underlying kernel network
driver doesn't allow adjusting the refresh frequency of the device transmission
statistics.
***

STEPS TO REPRODUCE
1. download at a constant rate, e.g. wget
https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.5.tar.xz
2. open the KDE system monitor and observe the network diagram


OBSERVED RESULT
zigzag profile, where the max is twice the download rate

EXPECTED RESULT
constant profile

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: openSUSE 15.4 and 15.5
KDE Plasma Version: 
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

The underlying problem seems to be with ksystemstats5 which calculates the
download/upload rates using a hard-coded interval of 0.5s:

https://github.com/KDE/ksystemstats/blob/master/plugins/network/NetworkManagerBackend.cpp#L20
                // Update rate in ms
                static const int UpdateRate = 500;

However, not all kernel network device driver support updating the refresh
frequency of the received/sent byte statistics:
        # ethtool -c eth0 | grep stats-block-usecs
        stats-block-usecs: 0

        # ethtool -C eth0 stats-block-usecs 500000
        netlink error: Invalid argument

        # lspci | grep Ethernet
        04:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetLink
BCM57780 Gigabit Ethernet PCIe (rev 01)

The update-frequency of the statistics of my eth0 device seems to be about 1s
(checked via cat /proc/net/dev), which explains the zigzag profile (first 0.5s
no change in received bytes --> 0 Mb/s, second 0.5s all bytes received in the
whole second --> twice as much Mb/s).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to