set max_upload_speed=0 but there is upload

General support for problems installing or using Deluge
Post Reply
MarkusKramer
Member
Member
Posts: 15
Joined: Sat Oct 18, 2014 1:44 pm

set max_upload_speed=0 but there is upload

Post by MarkusKramer »

Hi
I have set max_upload_speed=0 but I observe upload (session.status.upload_rate).

In most of the time, the upload is below 20 kbs, which is fine for me, but it can rise to 1000 kbs and stay for up to 5 minutes at 1000 kbs.

I left set max_upload_speed_per_torrent=-1 (the default)


Which other parameters I need to check?

Thank you,
Markus
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: set max_upload_speed=0 but there is upload

Post by shamael »

Hi,

What's your goal? Avoid upload? the speed limiter is evaluated per schedule reason why you may see such. A better option is to leave the torrent in pause state for example after d/l or to configure Deluge w/o UPNP (disable it in the GUI+restart) and with a fixed port w/o NAT in your router. You will be able to download but no connection possible for incoming connections means no upload at all.
MarkusKramer
Member
Member
Posts: 15
Joined: Sat Oct 18, 2014 1:44 pm

Re: set max_upload_speed=0 but there is upload

Post by MarkusKramer »

Hi shamael,
thank you for the advise and yes, my goal is to avoid upload (temporarily and automatically).

I have added my_torrent.pause() to my modified deluge/core/daemon.py (which changes max_upload_speed in certain conditions).

I will report here what the effect is, it only appears once in a while.

As pause() is only usable after download, I would like to understand why the speed limiter fails.
Where is the scheduler you mentioned?
Can I trigger the speed limiter?

I need to to restrict upload also during download.
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: set max_upload_speed=0 but there is upload

Post by mhertz »

Until shamael returns, then just a few small observations. Pausing of finished downloads can be done from UI, and then you can add a 0 as time/ratio in core.conf as GTKUI preferences restricts that as min 0.5 or something. This works untill opening preferences in GTKUI, which will overwrite the 0 in core.conf with 0.5, so if not wanting to reset in core.conf if using GTKUIs preferences often, then there's a glade file under ui\gtk\glade or something, to change that 0.5 to 0.

If using ltconfig plugin, then I believe you can set incoming ports to disabled for both TCP and UDP(uTP). Keep in mind this will limit your download too often, compared to forwarded incoming port enabled, depending on swarm, but also note that bittorrent is little different P2P system where you also can upload through outgoing connections, and not only incoming ones, though you will minimize greatly the upload with disabling incoming ports.

As shamael stated, there can be fluctuations, I believe, because the limit is done in scheduled steps(ticks I believe) in libtorrent, and hence the disreprency, like shamael already stated. This is in libtorrent, and don't know about changing that.

I haven't looked into what the limit speed options in deluge does, e.g. possibly using 0 as max upload speed would be unlimited(I believe it is in utorrent), though maybe not as deluge already uses -1 for that.

The option for limiting upload slots sounds intriguing to this scenario too, i'd guess.

Again, honestly haven't looked into this propperly, so sorry for being so vague and no clear answers given really.

My main point with this post, was to make aware of asymetric nature of bittorrent spec, supporting uploads also through outgoing connections too, meaning you'll have a hard time fully disabling uploads for the time of the download happens, before you can pause/remove the finished/seeding torrent automatically.
shamael
Compulsive Poster
Compulsive Poster
Posts: 667
Joined: Sat Oct 08, 2016 9:28 am

Re: set max_upload_speed=0 but there is upload

Post by shamael »

I can't be more complete @mhertz, very well explained.

My 2cents about the variation of speed, even for 0: the variation of speed between 2 points may be limited with a QoS inserted but both sides need to be handled and this is not possible on a BitTorrent connection. Thus we fail back on the traffic shaping option with speed evaluated per time or per packet sent. The fluctuation is inherent as this is a "reactive" action.

As mentioned deliberately using an incoming port without NAT in your router will ends with a download w/o upload possible for any peers. the tracker is mostly on 80/443 port so will receive the status update but no peer will be able to connect. It may decrease the d/l speed, some trackers check it, but this is maybe not major concern. As defender of the BitTorrent sharing concept I'm not in favor of such, sharing even a bit should not hurt your nor expose you to legal issue (France for example) as this is not the way used. Your choice at the end ;)
MarkusKramer
Member
Member
Posts: 15
Joined: Sat Oct 18, 2014 1:44 pm

Re: set max_upload_speed=0 but there is upload

Post by MarkusKramer »

Both mhertz and shamael,
I observe very little upload (around 50 kbs) during download.
Thank to you, I better understand why that is, though I need to further digest your explanations on the variation of speed.

I observed a stronger upload (around 300 kbs) right after download.
Since I now pause/resume after the completed download (under certain conditions), I expect these uploads to be zero.

At first I thought this is just the DHT information.

I do not use a tracker or a GUI, and I have no legal concerns about the upload.
MarkusKramer
Member
Member
Posts: 15
Joined: Sat Oct 18, 2014 1:44 pm

Re: set max_upload_speed=0 but there is upload

Post by MarkusKramer »

(How) can deluge/core/daemon.py receive the event "torrent completed"?
Post Reply