Torrent_Client Performance Understanding.

Discussion of Transmission that doesn't fit in the other categories
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Torrent_Client Performance Understanding.

Post by kpdozer »

Hello. Please help in solving the following situation.
I am a newbie in the world of Linux. But I do have something to compare.
For the first time installing Transmission, I immediately attended to the understanding of how it consumes system resources.
And he was very puzzled.
I have:

Ubuntu 10.04
Core2Duo 8400
4 GB of RAM.


My ISP provides access to resources at a rate of 100 Mbps. In practice, the speed is about 10 MB / sec (88 Mbps).
Downloading using Transmission is flawless, while the speed of download is not more than 3.5 MB / sec (28 Mbps).
At this speed the same way without any problems running my router Netgear WNR-3500L together with the open firmware and installed Transmission.
CPU usage is 5-10%.

The problems appears when the rate increases closer to 7 MB / sec.
In this case, CPU usage increases by more than 7 times. And 70-80%.
At the same time on Core2Duo computer download speed is 8 Mbytes / sec.
The load on the CPU WNR-3500L at 100% and download speed is not more than 4 MB / sec.

I'm using the ext3 file system
I had to compare Transmission with another client on another platform on the Core2Duo machine and that's what I got:

uTorrent (Core2Duo 8400, Windows7): 10 MB / sec - CPU 15-20%
Transmission, Deluge, rTorrent (Core2Duo 8400, Ubuntu 10.4): 7 MB / sec - CPU 60-70%

I've tried a variety of PC configuration and the situation was everywhere the same.

I decided to use Oprofile. May be wrong, but I got the following results at maximum load:
opreport --exclude-dependent

TIMER:0|
samples| %|
------------------
75606 70.7464 vmlinux-2.6.31-21-generic
20621 19.2956 e1000
4686 4.3848 libcrypto.so.0.9.8
2115 1.9791 libc-2.11.1.so
839 0.7851 transmission
482 0.4510 libpixman-1.so.0.16.4
379 0.3546 ahci
.......................................
opreport -l /usr/lib/debug/boot/vmlinux-2.6.31-21-generic
samples % symbol name
71275 51.9649 try_preserve_large_page
13443 9.8010 rtnl_fill_ifinfo
7612 5.5497 __change_page_attr
3957 2.8850 thermal_zone_bind_cooling_device
3929 2.8645 cpa_flush_array
3826 2.7894 hpt3x2n_init_one
2982 2.1741 find_busiest_group
2859 2.0844 load_balance_newidle
.......................................
I have very little experience in configuring Linux, so I do not understand the meaning of
try_preserve_large_page.
What can I do wrong? How do I get the maximum speed with minimum load CPU?
When testing with Intel Atom on Ubuntu at work Transmission heating processor is much higher than Windows7 and Utorrent.
Of course I'd prefer Ubuntu, but I do not want to believe that there is no solution.
Please help people who know. Thank you.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

I just checked the Transmission for Windows.
http://sourceforge.net/projects/trqtw/f ... ission-Qt/
In Windows7 I got to 8 MB/sec , with maximum load on one core at 40%

In all cases, used a version Transmission 2.20
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Torrent_Client Performance Understanding.

Post by Jordan »

I see a lot of details but don't really see a question.

What are you asking?
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent_Client Performance Understanding.

Post by rb07 »

kpdozer wrote:In all cases, used a version Transmission 2.20
There's a problem right there, 2.20 didn't handle encrypted connections, I even warned about it in the Transmission-Qt for Windows download page. I don't know how that problem affected performance as you measured, but the results are worthless.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Jordan wrote:I see a lot of details but don't really see a question.
What are you asking?
Kpdozer wrote: What can I do wrong? How do I get the maximum speed with minimum load CPU?
Good afternoon.

I will clarify my questions:
Why is the maximum download speed is lower than in Utorrent on Windows?
What caused the high consumption of CPU, Linux settings or Transmission?
What must be configured to obtain the same results:
uTorrent (Core2Duo 8400, Windows7): 10 MB / sec - CPU 15-20%
rb07 wrote:
kpdozer wrote:In all cases, used a version Transmission 2.20
There's a problem right there, 2.20 didn't handle encrypted connections, I even warned about it in the Transmission-Qt for Windows download page. I don't know how that problem affected performance as you measured, but the results are worthless.
I apologize if I did not understand
Using the command Top, I see that the download speed of 7 MB / sec, Transmission consuming 70% CPU.
Is this a incorrect measurement, or is it normal behavior?

Thank you
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent_Client Performance Understanding.

Post by rb07 »

kpdozer wrote:I apologize if I did not understand
Using the command Top, I see that the download speed of 7 MB / sec, Transmission consuming 70% CPU.
Is this a incorrect measurement, or is it normal behavior?
You didn't understand.

The measurement may be correct, but the version you used is not working correctly, therefore your result is invalid.

Notice that I said "may be correct". Your testing, which on the surface looks like a lot of work and probably is as good as you can do, is not a very good measure, why? have you even been trained to do testing? have you thought why formal testing is done under laboratory conditions? in short: you have to do repeatable tests to get meaningful results, that means reduce your variables to the minimum, repeat your test to eliminate measurement errors, and a few other details that you don't mention (did you use the same torrents, with the same peers, and the same protocols -- encrypted, no uTP).

Your question is: can Transmission be configured to perform as good or better than X? The answer is: probably.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Today I repeated the experiment, but with version Transnmission 1.93
Settings were exactly the same, the configuration of computers and the torrent files too. Moreover 2 torrent file, were launched simultaneously on two identical computers.
Inaccurate results for Ubuntu and Transmission would be if every new attempt results would differ much.
But no matter how I change the settings Transmisson, the results are always the same. I made 20 attempts to simultaneously run Utorrent, and Transmission, and always received the same (the results I've shown above)
I will try out different distributions Linux.
But the question for me is still not resolved.
rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: Torrent_Client Performance Understanding.

Post by rb07 »

kpdozer wrote:I made 20 attempts to simultaneously run Utorrent, and Transmission, and always received the same (the results I've shown above)
You just wrote a contradiction... if you test 2 clients simultaneously how can one client use 100% of your bandwidth and the other 70% ?

You are wasting my time... or to be precise, I'm wasting my time answering you.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

rb07 wrote:
kpdozer wrote:I made 20 attempts to simultaneously run Utorrent, and Transmission, and always received the same (the results I've shown above)
You just wrote a contradiction... if you test 2 clients simultaneously how can one client use 100% of your bandwidth and the other 70% ?

You are wasting my time... or to be precise, I'm wasting my time answering you.
I meant that to run tasks, one after another immediately. And the network is used first Linux-client, and then the Windows-client.
This is understandable even to a child, but probably not for you.

Your answers are absolutely useless to me, they do not carry any useful information, but attention to the construction of my sentences and questions.
While I understand that you want to convince me that I did not understand correctly the results.
I do not think that I would like to receive further advice from you. Bye
Jordan
Transmission Developer
Posts: 2312
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: Torrent_Client Performance Understanding.

Post by Jordan »

If I'm reading that profile correctly, it looks like Transmission is using less than 1% of the profiling time, and the kernel is using about 70%.

I've never heard of try_preserve_large_page() before, but my guess from the percentages is that you might want to try a newer kernel and filesystem. For example, you might want to run the same benchmarks on an Ubuntu 10.10 system with an ext4 filesystem.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Jordan wrote:If I'm reading that profile correctly, it looks like Transmission is using less than 1% of the profiling time, and the kernel is using about 70%.
I've never heard of try_preserve_large_page() before, but my guess from the percentages is that you might want to try a newer kernel and filesystem. For example, you might want to run the same benchmarks on an Ubuntu 10.10 system with an ext4 filesystem.
Thank you understand me.
That question worries me.
I am sure that Transmission does not directly affect the load of CPU. Moreover, the same thing happens in other torrent client (deluge, rtorrent, utorrent).
My clear choice is Transmission, which is why I decided to consult with you as the developer of this great torrent client.

I understand that it is the Linux kernel consumes 70% CPU.
But I do not understand what it does and why it is happening at the time of downloading Transmission at high speeds?
I do not understand: Does anyone have the same problem except me?
What does it mean try_preserve_large_page ()?

I'll definitely try Ubuntu 10.10.
Add: On Ubuntu 10.04 LTS Server on ext4 file system kernel also consumes 70% CPU.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Change the operating system on Ubuntu 10.10 no results.
I will try other distributions.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Archlinux and ext2:
6.5 MB / Sec = 2% CPU
7.5 MB / Sec = 80% CPU
Now 7 my favorite number ...
Archlinux and JFS - the same result.
zjfdlut
Posts: 1
Joined: Sat Feb 26, 2011 12:49 pm

Re: Torrent_Client Performance Understanding.

Post by zjfdlut »

kpdozer wrote:Archlinux and ext2:
6.5 MB / Sec = 2% CPU
7.5 MB / Sec = 80% CPU
Now 7 my favorite number ...
Archlinux and JFS - the same result.
The same problem also in my Linux system(ubuntu10.10). It not only happens in transmission, but also happens in other bt clients, like ktorrent, deluge.
kpdozer
Posts: 10
Joined: Wed Mar 02, 2011 7:34 pm

Re: Torrent_Client Performance Understanding.

Post by kpdozer »

Yes, it happens to all the torrent clients.
After reading a few articles, I came to the conclusion that the TCP-stack in most Linux distributions is not configured for such loads. I decided to make the setting as if using 1Gigabit channel. I found some articles
Many of these articles have the name like "How to achieve Gigabit on Linux". I was not able to combine them into one article, because currently very limited in time. Also I do not solved the problem completely.
The following article has helped to improve the results:

http://www.welinux.ru/post/4552/

This article in Russian ..
One user described the configuration of the system, which provides peak load speed of 900 Mbit / sec (more detailed data is not reported):

Code: Select all

net.ipv4.ip_forward = 1 
net.ipv4.conf.default.rp_filter = 1 
net.ipv4.conf.all.rp_filter = 1 
net.core.rmem_max = 16777216 
net.core.wmem_max = 16777216 
net.ipv4.tcp_rmem = 4096 87380 16777216 
net.ipv4.tcp_wmem = 4096 65536 16777216 
net.ipv4.tcp_no_metrics_save = 1 
net.core.netdev_max_backlog = 2500 

echo 65536000> / proc/sys/net/ipv4/netfilter/ip_conntrack_max 

/ Sbin / ifconfig eth2 txqueuelen 2000 
/ Sbin / ifconfig eth3 txqueuelen 2000 
After specifying these parameters, CPU utilization dropped to 50% and increase speed up to 10.5 MB / sec.
Unfortunately, such a load too high, but most importantly that the rate has increased significantly.

Attention should be paid as a parameter
net.ipv4.tcp_congestion_control
Post Reply