Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect torrent upload/download ratio #4161

Closed
yuliaSharabi opened this issue Jan 21, 2019 · 9 comments
Closed

Incorrect torrent upload/download ratio #4161

yuliaSharabi opened this issue Jan 21, 2019 · 9 comments

Comments

@yuliaSharabi
Copy link

yuliaSharabi commented Jan 21, 2019

Tribler version/branch+revision:

v7.1.5

Operating system and version:

Ubuntu 16.4

Steps to reproduce the behavior:

Create 3 movies in the downloads
Ratio just decreasing , I started today with -6.1 and it decreased to -6.3.
Is there any settings I need to apply to make it seed? What am I doing wrong? I've read your Wiki page and searched in the issues but yet don't understand what is wrong :(

51497795-f0ae4f00-1dcc-11e9-812a-b63f0093dad8

@devos50
Copy link
Contributor

devos50 commented Jan 22, 2019

Thank you for your report! I've slightly edited your screenshot to hide some sensitive (and personal) information.

Regarding your issue, the token balance should slowly increase over time if you are not downloading anything. When you are downloading anonymously, the token balance decreases (since you are using bandwidth of other users). I see that you are streaming a download. Could it be that this download is not complete yet? If so, the token balance will decrease and this could explain the issue you are experiencing.

If this is not the case, I can help you to find out the root cause of this, which is most likely a bug in Tribler. 👍

@devos50 devos50 added this to the V7.2: Gigachannels milestone Jan 22, 2019
@yuliaSharabi
Copy link
Author

Hi, thanks for quick response.
Well, all of them are finished downloading for more than 24 hours. No seeding at all.(checked it when clicked on the token balance icon)
image

The last one (let's call it #3) is tucked on Streaming for more than 24 hours. ration for 24 hours still -6.3. I'd like to help you understanding the bug root cause.(I am a QA) Let me know which info you are missing.

@wkrick
Copy link

wkrick commented Jan 26, 2019

Version: Tribler 7.1.5
OS: Windows 7 64-bit.

I'm seeing the same problem. I have a bunch of torrents that are actively seeding but the ratio is stuck at zero. I let them seed for days but I still stay deeply in the negative token-wise. I suspect a bug somewhere. Let me know if there's any information I can provide that will help with the debugging. Here's a screenshot of active seeds with a zero ratio...

image

@wkrick
Copy link

wkrick commented Feb 1, 2019

I downloaded two more torrents since my last comment. One is just under 1GB and the other is just under 10GB. The 1GB is completed and seeding, the 10GB one is about 70% complete. My token balance went from -20.9GB to -64.2GB (and climbing). That's a change of nearly 44GB for downloading 11GB. Is this working correctly?

@devos50
Copy link
Contributor

devos50 commented Mar 4, 2019

@wkrick that totally depends on the number of hops you are using for anonymity. By default, you are using one hop for downloads. According to your screenshot, you are downloading with three hop anonymity which is quite expensive (you pay 5x for the bandwidth being used). That should explain your quickly decreasing balance. In 7.3, we will release a fix where one would sometime lose balance even without downloading something.

@qstokkink
Copy link
Contributor

qstokkink commented Mar 5, 2019

Hmm.. it seems like the ratio is calculated from the libtorrent information. We might not be able to fix this in our codebase:

return self.lt_status.all_time_upload / float(self.lt_status.all_time_download)

This lt_status comes directly from the libtorrent handle:

self.update_lt_status(self.handle.status())

@devos50
Copy link
Contributor

devos50 commented Mar 5, 2019

We did some investigation of this issue. The ratio is computed from the all_time_upload and all_time_download fields, whereas the numbers shown in the torrent details pane are derived from total_upload and total_download in a torrent_status object.

We should keep track of all bytes being uploaded and downloaded since these are the bytes you actually pay for if you are using an exit node. So this includes communication overhead which does not directly include "useful" traffic (where you exchange pieces with others). One workaround for this is to manually keep track of all bytes exchanged in a libtorrent download, by using the total_upload and total_download fields. These values can be written away during checkpointing.

This issue is a bit more involved than we thought and at this point, it might not be a good idea to make changes to the way we manage data reported by libtorrent. We will fix this later.

@Nubro01
Copy link

Nubro01 commented Mar 12, 2019

On the current 7.3 the problem is also there!
54191137-95880700-44b5-11e9-8122-2c0261e64585

@ichorid ichorid changed the title Question - regarding ratio not increases Incorrect torrent upload/download ratio Jan 5, 2020
@ichorid
Copy link
Contributor

ichorid commented Jan 15, 2020

Let's discuss mining-related problems in #4363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants