Uploads sometimes stuck at 0 B/s, 4.57 kB/s and 9.11 kB/s

Bug #190015 reported by Big Muscle
6
Affects Status Importance Assigned to Milestone
DC++
Fix Released
Wishlist
Unassigned

Bug Description

One user reported me bug in StrongDC++ that speed of uploads sometimes falls to 0 B/s. He sent me the following video: http://kompozitor.gotdns.org/misc/uploads.avi

So I tested in DC++ SVN. And exactly same thing happens when there's more uploads. Some of them stuck at 4.57 kB/s or 9.11 kB/s and the rest falls to 0 B/s.

But there's one interesting thing. The guy who reported me the bug (and sent the video) is from totally different country than me, he has totally different connection than me, but when this problem occurs he has exactly the same speeds (0 B/s, 4.57 kB/s, 9.11 kB/s).

I can reproduce this bug if I grant a slot to more users.

Revision history for this message
MikeJJ (mrmikejj) wrote :

I can confirm this with dc++. Always thought it was a symptom of my isp's packet shaping, guess not if other people getting it as well (also just had it reported from someone i compiled svn991 for).
From the limited amount of transfers i've had from adc (2 both to same person, at different times) i not seen it there, but it happens with every nmdc initiated one.

Changed in dcplusplus:
status: New → Confirmed
Revision history for this message
Big Muscle (bigmuscle) wrote :

It seems there's following problem:

When uploading, the file is read each 64 kB. The speed is measured from last 15 samples (or less if there'sless than 15). If whole 64 kB block isn't sent in the time when it measured speed (so in 15 samples), it will fall to given speeds.

Revision history for this message
Big Muscle (bigmuscle) wrote :

I've check the source properly and now I exactly know where the problem is.

- BufferedSocket sent info to UploadManager only after 64 kB.
- there's 14 samples to count the transfer speed
- 64 kB / 14 = 4.57 kB !!!
- so upload speed will be always 4.57 kB aligned

- if upload speed is below 4.57 kB/s, it will show 0 B/s
- if upload speed is below 9.11 kB/s but higher than 4.57 kB/s, it will show 9.11 kB/s
etc...

I think that the best solution would be rewriting BufferedSocket::threadSendFile to report uploaded data correctly (and not only each 64 kB)

Revision history for this message
Pseudonym (404emailnotfound) wrote :

Why not just keep track of things using an exponential average, like Unix load averages. Only requires storing a single float, and the update code is really simple. Just have to spend some time finding a good value for alpha.

Revision history for this message
RoLex (hundrambit) wrote :

Or, you can go back to previous way of doing "the thing" where everything worked correctly. :)

Changed in dcplusplus:
importance: Undecided → Wishlist
Revision history for this message
Jacek Sieka (arnetheduck) wrote :

if someone could verify that averaging is better now...

Changed in dcplusplus:
status: Confirmed → Fix Committed
Revision history for this message
MikeJJ (mrmikejj) wrote :

It's partially better now. It still repeats the same numbers a lot. It just seems to have a larger selection of numbers to choose from. :)

Revision history for this message
Big Muscle (bigmuscle) wrote :

I still see that speeds below 3.9 kB/s (haven't noticed exact number yet, but it's about 3.9) are shown as 0 B/s.

MikeJJ (mrmikejj)
Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.