Bad speed fluctuation and random cutouts.

General support for problems installing or using Deluge
bhf

Bad speed fluctuation and random cutouts.

Post by bhf »

Hello,

I am running deluge v1.3.5 with libtorrent 0.15.9.0 on a 1Gbit link server, with 24gbs of ram a 2 tb hdd and a 4 core 8 thread cpu. The server is running ubuntu 10.04 server LTS. I am using GTK to connect to the daemon on the server. My filesystem is ext4.

Recently i have been having problems with download speed fluctuations, it mainly happens on large torrents but i have seen it happen on others. I will hit 50-60MiB/s when i start the torrent and a minute later it will drop to 1-5Mib/s sometimes even goes bellow 1Mib or just stops downloading entirely for a couple seconds. I know my hard drive can sustain these speeds as well. I have tried messing with ionice priorities and other process priorities. Its currently set at best effort level 0 (high priority). The torrents are well seeded with most being seedboxes on gbit lines in the same data center, so thats not the problem. On a gbit line it should be able to keep a steady speed of around 50-60 MiB/s

I recorded a video of the problem to visually show you. This isn't that bad compared to what happens all the time, but im stumped as to why my deluge cant hold a constant speed.
My cache settings are at 99,999 and 60s expiry
http://youtu.be/swZfdk_Oocg
Watch in hd otherwise its too blurry.

Not sure what to do, happened on different distros on different servers and versions of deluge as well.

Please help,

Thanks.
CoteRL
New User
New User
Posts: 7
Joined: Tue Nov 06, 2012 2:48 am

Re: Bad speed fluctuation and random cutouts.

Post by CoteRL »

I get what appears to be the same thing! When I have a lot of traffic going all the torrents drop to 0 activity for a brief period and start back up to full. It's like clockwork! http://i.imgur.com/9WX1L.png
Cas
Top Bloke
Top Bloke
Posts: 3643
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Bad speed fluctuation and random cutouts.

Post by Cas »

Moving torrent storage will affect network transfer rates.
CoteRL
New User
New User
Posts: 7
Joined: Tue Nov 06, 2012 2:48 am

Re: Bad speed fluctuation and random cutouts.

Post by CoteRL »

I notice the issue whether or not I have moved storage on a torrent, and it's not something that only shows up while a torrent is being moved. I have tested this on both my Ubuntu and Win7 boxes (Deluge 1.3.5 on both) and they both show the same symptoms. I am going to try out utorrent just to verify that it is in fact a deluge issue and not something else in my network path.
CoteRL
New User
New User
Posts: 7
Joined: Tue Nov 06, 2012 2:48 am

Re: Bad speed fluctuation and random cutouts.

Post by CoteRL »

Tested utorrent on my Win7 box and it did not show signs of the issue. When looking at Deluge when the issue happens I see the torrents all quickly drop to zero speed and leave the Active torrent list. I also notice the connections jump up very quickly from the typical 30-40 up to 300-600 until data starts getting transferred again at which point they drop back down to ~30.
Darlok
New User
New User
Posts: 7
Joined: Mon Oct 29, 2012 2:05 am

Re: Bad speed fluctuation and random cutouts.

Post by Darlok »

I suspect a dirty cache issue. Try to run a torrent or two that are active on a ramdrive and you'll see the problem goes away. Tells me that IO is getting clobbered.
srt75
Member
Member
Posts: 24
Joined: Tue Sep 25, 2012 9:29 pm

Re: Bad speed fluctuation and random cutouts.

Post by srt75 »

Darlok wrote:I suspect a dirty cache issue. Try to run a torrent or two that are active on a ramdrive and you'll see the problem goes away. Tells me that IO is getting clobbered.
I don't believe it is an IO problem, as I'm getting the same issues and I'm running on SSD.

I have increased the cache to max and still get it, actually I decreased to min and time as one second and still get it.

I have read elsewhere on here that setting Allocation to Compact helps with this issue, I've just set mine, hopefully it will help.
CoteRL
New User
New User
Posts: 7
Joined: Tue Nov 06, 2012 2:48 am

Re: Bad speed fluctuation and random cutouts.

Post by CoteRL »

Yea, I also don't think it's an IO issue. I have tested it both to local storage as well as to my Openfiler box as well as messing around with cache sizes from 0 to incredibly large.

I'm not sure how/why changing Allocation would help since I get this for both uploading and downloading.
Darlok
New User
New User
Posts: 7
Joined: Mon Oct 29, 2012 2:05 am

Re: Bad speed fluctuation and random cutouts.

Post by Darlok »

CoteRL wrote:...since I get this for both uploading and downloading.
I did not see mention before that this was happening on the upload side as well. I'm going to assume by your statement that this happens regularly with many peers attached on an active torrent that you're seeding, which would take the possibility out of a single fast peer that also has issues?

Also going to assume we're talking about linux distro's. I also have almost the same exact setup as the person who started the thread and have had the exact issues. I have been able to smooth things out using relatively aggressive (possibly dangerous) EXT4 mount settings:

/etc/fstab

Code: Select all

/dev/sda2       /home   ext4    noatime,data=writeback,barrier=0,nobh,errors=remount-ro         0       2
I also sent my dirty_background_ratio from the default '10' (~2.4GB in my case) to '1' (~240MB): (Will reset on reboot if you use this method)

Code: Select all

echo 1 > /proc/sys/vm/dirty_background_ratio
sysctl -p
In my case, this helped keep active threads open to flush the buffer before it stacked itself up and effectively killing all incoming I/O (what this problem is). I think I also set Deluge cache to about 840 MB give or take (40960, 360 seconds), but not completely sure how much it's actually helping..No clue honestly how libtorrent handles it's own cache.

Before the changes I was seeing 60-90MB/s down for a few seconds, then everything comes to a crashing halt (monitored using vmstat) while it synced, rinse, repeat.

Now I'm seeing a pretty steady 40MB stream (up and down), which is much more acceptable given the fact that it is a single spindle drive doing that sort of volume read/write.

That said, pass everything off to a ramdrive will hold 90-112MB/s up and 40-60MB/s down simultaneously....so yeah, it has to be a cache problem.

I wouldnt suggest using the mount parms I pasted for any data you care about by the way, lots can go wrong there. I did also mess with ionice - best efforts for deluged, but not sure if thats doing much yet either.

@srt65 - some SSD's have horrible write speeds, which would give the same issue..dirty cache waiting in line to be written. Bet your hashing flies though :)

I'm all ears (eyes) too if someone has any other ideas on the subject. Bottom line is that all things still point to IO. If it happens on a tmpfs ramdrive, then I'd say otherwise - it doesn't for me at least.
CoteRL
New User
New User
Posts: 7
Joined: Tue Nov 06, 2012 2:48 am

Re: Bad speed fluctuation and random cutouts.

Post by CoteRL »

Darlok wrote:I'm going to assume by your statement that this happens regularly with many peers attached on an active torrent that you're seeding, which would take the possibility out of a single fast peer that also has issues?
While I can't guarantee that for uploading the issue isn't on their end, it seems strange that all the torrents I'm seeding all stop sending to people at the exact same time. I will go from a few torrents seeding at anywhere from a few KB/s to a MB or two/s to all of them stopping. Followed by them all picking up again with the same peers. It follows the same pattern as when it happens downloading. I/O, hard stop for at least 5 seconds, I/O.

Darlok wrote:Also going to assume we're talking about linux distro's.
Sorry about that, I never did specify my setup. I run my little seedbox here at home which is an Ubuntu 12.04.1 LTS Server running Deluge 1.3.5. I have also tested Deluge and uTorrent on my Windows 7 machine with Deluge showing the same results as on Ubuntu while uTorrent worked just fine.

The only thing in common between the machines is Deluge 1.3.5 and that my torrents are stored on my Openfiler machine. On windows it's just a mapped drive and here is the fstab for the Ubuntu box.
/etc/fstab

Code: Select all

//192.168.0.5/vg2.vol2.Torrents /torrents cifs _netdev,auto,bootwait,guest,rw,noperm,hard 0 0
I only dabble in linux so my knowledge is limited so I cobbled that together from a few guides on cifs mounting and such. I too am all ears for suggestions on ways to improve my setup.
Post Reply