Bandwidth Throttling

Bug #213213 reported by humblefool
8
Affects Status Importance Assigned to Milestone
DC++
Fix Released
Wishlist
Unassigned

Bug Description

I have no doubt that this has come up before, but I'd like to get an official bug/wishlist item filed on it.

The ability to cap general upload/download kib/s would be much appreciated for those of us on connections shared with other people. Having DC++ constantly attempt to go as fast as it can saturates the line and can even make general web browsing noticeably slower.

MikeJJ (mrmikejj)
Changed in dcplusplus:
importance: Undecided → Wishlist
Revision history for this message
Spott (spott-andy) wrote :

There are many hubs that do not allow their users to use clients that allow bandwidth throttling. They feel that many users would abuse the throttle settings, for example, limiting their upload bandwidth to 1kb/sec while leaving their download bandwidth unthrottled. They feel that this violates the "spirit of the filesharing community".

There are external applications which will manage your bandwidth usage, one such is NetLimiter (I like version 1.30) which will allow you to set limits for your entire computer, individual applications, individual applications processes, and/or individual connections. It also measures and displays network usage statistics (total and application-specific, immediate and longterm), shows process data for each application that uses the network, and shows WHOIS data for indiviual connection addresses. It does not slow my PC down noticeably, and my computer is at 4-5 years old.

There may be other programs that provide the throttling you need, but I do not know their names. One of these may provide what you need.

A hint: If you limit your maximum upload speed at 5-10% below the maximum your internet connection will support, it may help speed downloads, depending on the type of connection you have.

Revision history for this message
bla (bla-trash-mail) wrote :

This functionality is neverteless very important.

If you are on Linux/*BSD/etc. (linuxdcpp [DC++ port]) you can only throttle your whole bandwidth and not only the application. But that is useless if you want bandwidth ressources for surfing etc..
Also if there are other PCs using the same internet connection you just cannot work on other things (really nasty).

And the hubowners know that there are lots of other programs around for throttling (at least for win32). It is not a problem of the developers, you should make the app as useable and comfortable as possible.

Revision history for this message
rosc2112 (rosc2112) wrote :

"NetLimiter is an ultimate internet traffic control and monitoring tool designed for Windows."

Doesn't help us linux users none....

Hopefully this capability will be available soon, in the dc++ core and thereby the linuxdc++ port..

Revision history for this message
Steven Sheehy (steven-sheehy) wrote :

There's always trickle for linux...

Revision history for this message
MikeJJ (mrmikejj) wrote :

Also regarding Netlimiter, i seem to remember it being invasive, injecting it's dll into everything, and causing apps to crash. :P

Revision history for this message
rosc2112 (rosc2112) wrote :

I tried 'trickle' - didn't work :/

QOS in linux isn't much use for this purpose. Would be much simpler to put the capability into the offending client program (like every other bandwidth-intensive app has nowdays :)

Revision history for this message
Francois Botha (igitur) wrote :

AFAIK, only Netlimiter *Monitor* is free. The actual tool for throttling your bandwidth isn't free. And I don't earn Dollars.

I also support this wishlist item. I'd be ok with having my download speed <= upload speed. Doesn't that solve it?

Furthermore, a general Pause button would be great. Currently, I have quit DC++ just so that I can download email. Then I have to fire it up again when I leave home. Tedious.

Revision history for this message
Rampage (jilan-shah) wrote :

Linux is quite capable of shaping traffic, and in my experience the tools are very powerful although it needs more documentation. (My shaping is done using 'iptables' and 'tc')

Please check http://lartc.org for more information regarding shaping bandwidth. Again this is not to limit all uploads to 1kb/s or something equally ridiculous.

Revision history for this message
cologic (cologic) wrote :

See this patch.

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

After merging with this limiter code, my client started to be very unstable when limiting is enabled. Call stack looks like this:

> StrongDC.exe!memcpy(unsigned char * dst=0x02651f2d, unsigned char * src=0x02f63ba8, unsigned long count=16384) Line 250 Asm
  StrongDC.exe!_ssl3_write_bytes() + 0x3c3 bytes C
  StrongDC.exe!_ssl3_write_bytes() + 0xd8 bytes C
  StrongDC.exe!_ssl3_write() + 0x115 bytes C
  StrongDC.exe!_SSL_write() + 0x7e bytes C
  StrongDC.exe!dcpp::SSLSocket::write(const void * aBuffer=0x02f5bba8, int aLen=1877) Line 138 + 0x19 bytes C++
  StrongDC.exe!dcpp::BufferedSocket::threadSendFile(dcpp::InputStream * file=0x025c6808) Line 351 + 0x40 bytes C++

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

One more information, it doesn't crash always, but it seems that it disconnects every TLS connection.

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

This is call stack from DC++

#0 0x77c36fa3 in msvcrt!memcpy () from C:\WINDOWS\system32\msvcrt.dll
No symbol table info available.
#1 0x006b95e5 in do_ssl3_write (s=0x6e5bc60, type=15, buf=0x6d52928 "",
    len=0, create_empty_fragment=112371200) at ./ssl/s3_pkt.c:745
        p = (unsigned char *) 0x6d52928 ""
        i = <value optimized out>
        mac_size = 16421
        prefix_len = 0
        align = <value optimized out>
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

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

I found a reason of problems. OpenSSL documentation says:

"When an SSL_write() operation has to be repeated because of SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, it must be repeated with the same arguments."

But this is exactly what isn't kept. When you enable limiter in "incorrect" time, the length in SSL_write() will be different althought previous operation ended with SSL_ERROR_WANT_WRITE. Old version of limiter changed length only when reading block from disk (i.e. after SSL_write has been completed correctly)

cologic (cologic)
Changed in dcplusplus:
status: New → Fix Committed
Revision history for this message
poy (poy) wrote :

Fixed in version 0.760.

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.