Torrent speed fluctuating drastically only starting today

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Torrent speed fluctuating drastically only starting today

Post by Roxy »

Duo V2 with most recent ARM 5 version.
Transmission 2.8

As of this evening, torrents in Transmission are having their speeds fluctuate quite drastically, and additionally I can't quite max out my connection as I normally do.
For example, they'll take ten minutes to finally get any decent speeds and then go from 4.45mb/s to 1.85 mb/s back to 3.26mb/s and then occasionally it spikes to something my internet can't achieve, like 6.1mb/s before returning to the aforementioned pattern.
As of five hours ago, it didn't do this for single torrents or running ten at the same time.

When running Utorrent on Win 7 PC, it pegs my connection consistently.


This behavior makes me think of disk related issues, whether read/write or caching. Though nothing has changed in the setup/network.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent speed fluctuating drastically only starting toda

Post by rb07 »

It could be the result of many causes...

FWIW I also have seen this behavior, and I'm sure is not my NAS (2 core 64-bit Intel Atom, 4 GB RAM, and no other process using much CPU at the time), my guess is the peer, either they are running a bad version of something which loads a bunch of data, then stops to digest it ;-) or their Internet connection is unstable. The important point is that I don't see the behavior all the time; some times its stable high, some times the graph look like a saw, some times I see stable, then a sudden drop, and quickly returns to stable (my guess is that this last one is a Transmission problem).

I used to have an ARM based NAS (ARM 7 with 256 or maybe 512 KB of RAM) which was a 32-bit system and it did got taxed running Transmission. The problem was the small amount of RAM it had, and it showed after a while in the swap space used. But also that Transmission's code is hand-optimized for 64-bit (the 64-bit NAS flies compared to the 32-bit).

Things to check:
  • System settings: net.core.rmem_max, net.core.wmem_max, net.ipv4.tcp_rmem, net.ipv4.tcp_wmem, net.core.netdev_max_backlog
  • Transmission settings: cache-size-mb, peer-limit-global, peer-limit-per-torrent, speed-limit-up
  • Type of build. Transmission has the option, at build time, to "optimize libtransmission for low-resource systems". That kind of configuration will not handle GB Internet connections (my ARM NAS topped at 3 GB/s, the CPU couldn't handle more, and I did not use the low-resource configuration).
The system settings are network speed optimization settings -- they are optional (not needed), and pretty advanced. The objective is to get the most speed a given machine can do. Its difficult to pin good recommendations, the best option is to start conservative and maybe experiment a little, or not use them at all.

Transmission's settings are what usually cause problems like this. Caution: never use random values, too high a value can make Transmission useless (and we've seen several post in this forum from users that shotted themselves in the foot, and once it was a released package for some NAS with a dumb configuration), in fact all of those I listed (except the first) are really limits, having a good low limit improves everything (limiting the upload speed is what affects operation the most -- usually, with fiber optic I don't find that limit useful anymore, but I still use it since I want to do other things not just uploading). The first one enables Transmission to use more memory and less disk access.

Conclusion: Yes, you can optimize a bit to improve your side. The problem might be external, so it can't be improved.
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Re: Torrent speed fluctuating drastically only starting toda

Post by Roxy »

Hello, thanks for the response.

Transmission settings are pretty much at default :

Code: Select all

    "alt-speed-down": 4800, 
    "alt-speed-enabled": false, 
    "alt-speed-time-begin": 1290, 
    "alt-speed-time-day": 8, 
    "alt-speed-time-enabled": false, 
    "alt-speed-time-end": 1305, 
    "alt-speed-up": 350, 
    "bind-address-ipv4": "0.0.0.0", 
    "bind-address-ipv6": "::", 
    "blocklist-enabled": false, 
    "blocklist-url": "http://www.example.com/blocklist", 
    "cache-size-mb": 32, 
    "dht-enabled": true, 
    "download-dir": "/c/media/", 
    "download-queue-enabled": true, 
    "download-queue-size": 1, 
    "encryption": 1, 
    "idle-seeding-limit": 5, 
    "idle-seeding-limit-enabled": true, 
    "incomplete-dir": "/c/transmission/incomplete", 
    "incomplete-dir-enabled": false, 
    "lpd-enabled": true, 
    "message-level": 2, 
    "peer-congestion-algorithm": "", 
    "peer-id-ttl-hours": 6, 
    "peer-limit-global": 600, 
    "peer-limit-per-torrent": 125, 
    "peer-port": 50555, 
    "peer-port-random-high": 65535, 
    "peer-port-random-low": 49152, 
    "peer-port-random-on-start": false, 
    "peer-socket-tos": "default", 
    "pex-enabled": true, 
    "port-forwarding-enabled": false, 
    "preallocation": 1, 
    "prefetch-enabled": 0, 
    "queue-stalled-enabled": false, 
    "queue-stalled-minutes": 15, 
    "ratio-limit": 1, 
    "ratio-limit-enabled": true, 
    "rename-partial-files": true, 
    "rpc-authentication-required": true, 
    "rpc-bind-address": "0.0.0.0", 
    "rpc-enabled": true, 
    "rpc-password": "{37bde501e4957dcc747bb88f0a7935e9a21251502.rtdrM4", 
    "rpc-port": 9091, 
    "rpc-url": "/transmission/", 
    "rpc-username": "admin", 
    "rpc-whitelist": "*", 
    "rpc-whitelist-enabled": false, 
    "scrape-paused-torrents-enabled": true, 
    "script-torrent-done-enabled": false, 
    "script-torrent-done-filename": "/c/addons-config/Transmission/email_alert", 
    "seed-queue-enabled": false, 
    "seed-queue-size": 3, 
    "speed-limit-down": 100, 
    "speed-limit-down-enabled": false, 
    "speed-limit-up": 500, 
    "speed-limit-up-enabled": true, 
    "start-added-torrents": true, 
    "trash-original-torrent-files": false, 
    "umask": 0, 
    "upload-slots-per-torrent": 14, 
    "utp-enabled": true, 
    "watch-dir": "/c/transmission/watch-dir/", 
    "watch-dir-enabled": false
I appreciate what you are saying about Transmission settings being too high causing problems - I did learn that the hard way, particularly with cache size. In Utorrent type environments on Windows, low cache settings can result in very poor speeds and errors from the P2P client. So naturally our first instinct is to ramp that up really high.
As for global peer and peer per torrent, I figure my connection can handle more than the default so I did change those. A quick reset to default and I still get the speed fluctuations. Note that this happens with upload as well.

Would this be of any relevance? https://trac.transmissionbt.com/wiki/NAS

For the system settings, I'm not yet well versed on how to access and edit such features, however I'd like to think that it's not required just to have a stable connection to other peers.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent speed fluctuating drastically only starting toda

Post by rb07 »

cache-size-mb is high, can your NAS handle it? (i.e. if swap is used at all, then it can't).

Global peers & peers per torrent... those usually affect the router, some routers can't handle a high number of connections (and its one of the differences between a default Transmission configuration, and the "other guys" -- we don't mention the u word, besides you are comparing a NAS vs. a PC, which are completely different things).
Note that this happens with upload as well.
Now that is interesting. If the NAS had a problem (high CPU and memory use) it would show only in download, upload doesn't take much CPU power. This loosely points to a network problem.
Would this be of any relevance? https://trac.transmissionbt.com/wiki/NAS
No. I wrote those tips for a very different problem: the daemon freezes, stops responding, and does nothing.

Where do you see the network graph? At the router, or on your NAS? (for instance, I have gKrellM installed on my NAS, the NAS own control panel does have graphics and bars, but I prefer)

Do you have also access to your NAS CPU use, disk use, memory (both RAM and swap) use?

Important point: is the fluctuation happening all the time, or just with specific torrents?

How does the fluctuation looks like? Some fluctuation is normal, the one I described is transient (that's why I think its caused by a peer, a single peer).
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Re: Torrent speed fluctuating drastically only starting toda

Post by Roxy »

rb07 wrote:cache-size-mb is high, can your NAS handle it? (i.e. if swap is used at all, then it can't).
32mb is default for this 2.82 installation of Transmission. Should I lower it? My drives are Western Digital Red 2TB in XRAID2 configuration.
EDIT : Lowered it to 8 and didn't see any difference.
rb07 wrote: Global peers & peers per torrent... those usually affect the router, some routers can't handle a high number of connections (and its one of the differences between a default Transmission configuration, and the "other guys" -- we don't mention the u word, besides you are comparing a NAS vs. a PC, which are completely different things).
Indeed, and I am highly confident the router RT-N56U can handle it (obviously it does for the 'U' applications).
rb07 wrote: Now that is interesting. If the NAS had a problem (high CPU and memory use) it would show only in download, upload doesn't take much CPU power. This loosely points to a network problem.
My thoughts exactly - or rather that the fact it happens on upload as well. I appreciate that the Transmission GUIs are not exactly real time, so there's a pause before they update any statistics or numbers however that should not lend itself to spikes in speed for either direction.
rb07 wrote: Where do you see the network graph? At the router, or on your NAS? (for instance, I have gKrellM installed on my NAS, the NAS own control panel does have graphics and bars, but I prefer)
I didn't see a graph in Transmission, but I do have on one my router page showing traffic in real time.
rb07 wrote: Do you have also access to your NAS CPU use, disk use, memory (both RAM and swap) use?
It's a ReadyNas Duo V2 and I do not see any such information in the GUI, additionally I don't believe there's any monitoring apps I can get.
About the best I've achieved recently was to get the C: volume of the NAS drive mapped on a Windows computer. There's some what look like root files in there, but nothing that I think indicates usage stats.


rb07 wrote: How does the fluctuation looks like? Some fluctuation is normal, the one I described is transient (that's why I think its caused by a peer, a single peer).
Important point: is the fluctuation happening all the time, or just with specific torrents?
Yes it seems to happen on all torrents. Keep in mind a few days ago it was ok, and this is all being diagnosed from the same desktop machine where I compare it against the 'U' clients. Considering I am not pushing more than 5.5mb/s and trying one torrent at time, it strikes me as odd that there should be any large variance between the two.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent speed fluctuating drastically only starting toda

Post by rb07 »

Roxy wrote:32mb is default
No its not. You probably mean you just installed it and it had that value, but that is not the default set by Transmission, its probably set by the package maintainer for your NAS.
Roxy wrote:Should I lower it?
Depends on whether the NAS can handle it, or not. Simple experimentation won't show that, it takes a long time of operation to see if it causes swaping (which is bad).
Roxy wrote:obviously it does for the 'U' applications
Obviously? I doubt it, like I said: the "out of the box" settings are very different.
Roxy wrote:I do have on one my router page showing traffic in real time
So that is the graph that shows spikes?
Roxy wrote: I've achieved recently was to get the C: volume of the NAS drive mapped on a Windows computer
There is no "C:" volume on a NAS, unless it is running Windows. The usual NAS is running Linux, and Samba which provides the CIFS shares that Windows can see. By default Samba is configured to show only shared directories, no access to system directories, so you won't be able to see the files that have the statistics.
Roxy wrote:it strikes me as odd that there should be any large variance between the two.
May I suggest you compare Transmission to Transmission?

That means using my unofficial port to Windows: https://sourceforge.net/projects/trqtw/ (it can also be used to control and monitor the daemon on your NAS, which is what I do, with a remote session).

The objective is to see if the "spikes" only happen with the NAS, or not.
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Re: Torrent speed fluctuating drastically only starting toda

Post by Roxy »

rb07 wrote: No its not. You probably mean you just installed it and it had that value, but that is not the default set by Transmission, its probably set by the package maintainer for your NAS.
Could be, though if that's the case then you would hope the NAS can handle it, since it set it ;/

rb07 wrote: Obviously? I doubt it, like I said: the "out of the box" settings are very different.
I mean rather that the router can handle it using any client via desktop.
rb07 wrote: So that is the graph that shows spikes?
It shows internet traffic in packets - don't believe it's a good representation of what I am trying to convey.
rb07 wrote: There is no "C:" volume on a NAS, unless it is running Windows. The usual NAS is running Linux, and Samba which provides the CIFS shares that Windows can see. By default Samba is configured to show only shared directories, no access to system directories, so you won't be able to see the files that have the statistics.
Not C: as in a Windows drive. I ran the command :
use net z: \\IP address\c /user:admin

rb07 wrote: May I suggest you compare Transmission to Transmission?

That means using my unofficial port to Windows: https://sourceforge.net/projects/trqtw/ (it can also be used to control and monitor the daemon on your NAS, which is what I do, with a remote session).

The objective is to see if the "spikes" only happen with the NAS, or not.
Firstly, thanks for pointing me towards this. While Transmission Remote and Remote GUI are a nice boost from the NAS device's Transmission interface, this conversion is definitely helpful by giving me local or remote session options in one.

Transmission QT on local machine, saving to local drive:
Using my test torrent, it rose pretty quickly into the 4-5mb/s area, and then from there went back and forth.
4.7mb/s, 4.3mb/s, 4.99mb/s, 4.46 mb/s, 4.58mb/s, 4.54 mb/s, 3.98 mb/s, 4.66 mb/s, 5.1mb/s etcetc.

'u' client on local machine, saving to local drive and test torrent, pegged at 5.2mb/s within a minute.

I further tested it by running both Transmission and the 'u' client side by side, with the same torrent(and global/peer settings), capped at 2.5mb/s each. The 'u' client shot up to 2.5mb/s within a minute and sat there without any change. While over in Transmission, it reached a peak of 2.3mb/s within about the same time, and then proceeded to bounce around anywhere from 1.34 mb/s up to 2.2mb/s.

I appreciate that even with identical surface settings, that the results of different clients will be in fact different to some degree. But it's the erratic behavior of the Transmission that has brought me to this point.
Admittedly using your conversion client on the desktop machine, the performance was smoother than I've seen the activity level through the NAS box(accept that first day when it was running ok).
On the NAS the spikes and variance is more sharp. When I ran the torrent again, it would start 285kb/s, shoot up to 1.1mb/s, 485kb/s, 2.3mb/s, 1.8mb/s, 389kb/s, 3.1mb/s, etc
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Re: Torrent speed fluctuating drastically only starting toda

Post by Roxy »

Did some more testing running your Transmission QT alongside the Transmission Remote GUI client. QT's update intervals are quicker, so I knew that whatever reported speeds I'd see from Transmission Remote would be lagging behind that of QT.
What I didn't expect was the variance in numbers. For example, QT would have the down speed at 3.18mb/s while the remote client showed it at 4.1, yet moments before, the QT client wasn't on 4.1, it was on 4.9.
And even though the Transmission Remote GUI reports the updates slower, they would be more stable. So as another example, Remote GUI may show 4.5mb/s (followed by 4.2mb/s on the next update), meanwhile QT is reporting 3.96mb/s, 2.17mb/s and then 4.9 mb/s etc, within the same time.

At no point did there seem to be a pattern to connect what was happening on the clients in any mathematical way, e.g. taking the faster intervals of the QT client and averaging them, to give you the same number on the Remote GUI.

!!

I also figured out the * rate for the cache on this device. Cache amount is per peer. I.e at 2mb cache setting, x 100 peers = 200mb. The NAS has 256MB of RAM so setting myself a hard ceiling of 200mb and will work out the cache/global/peer calculation later.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent speed fluctuating drastically only starting toda

Post by rb07 »

Roxy wrote:the NAS can handle it, since it set it
The NAS didn't set it. The person that made the package you used did. If he knows what he is doing is something we can't know.
Roxy wrote:What I didn't expect was the variance in numbers.
Hold on, you are misunderstanding how things work.

My app doesn't work like Transmission when it comes to reporting speeds: since Windows uses binary values, my app shows binary by default, and it can be configured on the Preferences (either SI units, or IEC units). I'm guessing TRG uses what Transmission reports, and that is SI units, which are different by a factor of 1000/1024.
Roxy wrote:I also figured out the * rate for the cache on this device. Cache amount is per peer.
No. Wrong. Forget it I won't even go into this, just don't touch it.
Roxy wrote:I further tested it by running both Transmission and the 'u' client side by side
Bad test. Forget about doing this again, the results are useless.
Roxy wrote:I appreciate that even with identical surface settings
Wrong again, don't assume they have the same settings, they don't.

I think we're wasting our time. If you like how uTorrent works, use it. If you want to waste time figuring out why there are differences, waste it. If you want to optimize what is running on your NAS, start by making some real measurements, with tests that can be reproduced (i.e. not random operation).
Roxy
Posts: 10
Joined: Wed Oct 01, 2014 8:02 pm

Re: Torrent speed fluctuating drastically only starting toda

Post by Roxy »

Hmm, that's unfortunate. At least I'm actively trying to learn and figure out a resolution to something that SHOULD NOT BE HAPPENING.
You on the other hand, are make sweeping comments and generalizations without clarifying why they are factual or relevant.

For your information there is no Utorrent client for this devices. I guess then you don't know everything...like you seem to think you do.

And if you're going to continue to become increasingly negative or aggressive then yes, I suggest you stop wasting my time.
Post Reply