Bug 486111 - Transmission causes wakeups by unnecessary polling.
Summary: Transmission causes wakeups by unnecessary polling.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: transmission
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rahul Sundaram
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: wakeup
TreeView+ depends on / blocked
 
Reported: 2009-02-18 14:00 UTC by Quintin Hill
Modified: 2013-03-13 05:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-13 18:35:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Strace output (241.39 KB, text/plain)
2009-02-18 14:00 UTC, Quintin Hill
no flags Details
Strace output from Transmission 1.51-2 (201.16 KB, text/plain)
2009-04-02 10:27 UTC, Quintin Hill
no flags Details

Description Quintin Hill 2009-02-18 14:00:44 UTC
Created attachment 332376 [details]
Strace output

Description of problem:

Transmission causes many unnecessary wakeups when it is idle (~6 per second).

Version-Release number of selected component (if applicable):
transmission         i386  or x86_64       1.42-1.fc10 

How reproducible:

Always on several computers

Steps to Reproduce:

strace transmission -m 2> transmission-strace
(without any current torrents, also if no torrents currently uploading or downloading)
  
Actual results:

Constant polling for
read(3, 0x8e56f4, 4096)                 = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}], 4, 0) = 0 (Timeout)
read(3, 0x8e56f4, 4096)                 = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}], 4, 1558
The second argument in the read statement differs each time you run transmission but is the same on each poll.

Expected results:

No activity in transmission, no wake ups when idle.

Additional info:
Strace output attached.

Comment 1 Sebastian Krämer 2009-03-30 09:42:21 UTC
Hm, there are more recent transmission versions. One could test these. I however didn't see any bugfix about this issue in the release notes/closed bugs list..

Comment 2 Quintin Hill 2009-04-02 10:27:10 UTC
Created attachment 337764 [details]
Strace output from Transmission 1.51-2

I installed F11 Beta (in a virtual machine) and updated transmission to 1.51-2 (latest Rawhide).  Powertop now reports 3-4 wake ups per second: 

14.7% (  3.5)      transmission : __mod_timer (process_timeout)
 2.1% (  0.5)      transmission : schedule_hrtimeout_range (hrtimer_wakeup)

Rawhide strace attached (strace transmission -m 2> rawhide-strace.out C-c after ~30 seconds).

Comment 3 Charles Kerr 2009-05-06 20:19:52 UTC
Upstream ticket: http://trac.transmissionbt.com/ticket/2035

Comment 4 Charles Kerr 2009-05-14 13:48:44 UTC
Trunk is down to about 1.5 wakeups per seccond now:

  % powertop --dump 2>&1 | grep " transmission : "
     0.5% (  0.9)      transmission : __mod_timer (process_timeout) 
     0.3% (  0.5)      transmission : hrtimer_start_range_ns (hrtimer_wakeup) 
     0.0% (  0.1)      transmission : __mod_timer (death_by_timeout) 

So about 63% of the wakeups have been fixed.

The code is reaching a point of diminishing returns in the tradeoff
between code complexity and reducing the number of idle timeouts.
This is probably as low as we're going to get unless someone wants
to submit a patch that reduces it further in a clean way.

Comment 5 Denis Leroy 2009-05-14 16:05:17 UTC
Great! is this is 1.53 or 1.61 ?

Comment 6 Charles Kerr 2009-05-15 00:56:22 UTC
No, this is a new development in trunk.  Possibly 1.62.

Comment 7 Fedora Admin XMLRPC Client 2009-06-03 08:28:02 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Rahul Sundaram 2009-06-13 14:54:53 UTC
Charles,

Is the latest upstream supposed to fix this issue? Can I close this bug?

Comment 9 Charles Kerr 2009-06-13 18:27:50 UTC
Rahul: welcome aboard. :)

The changes I mentioned above are in the 1.7x series.

We're still at ~ 1.5 wakeups per second when no torrents are running.

I would vote for closing this bug.

Comment 10 Rahul Sundaram 2009-06-13 18:35:35 UTC
Thanks. I have built the very latest version for Fedora 11 and it is at 

https://admin.fedoraproject.org/updates/transmission-1.71-1.fc11

OP, feel free to test it and if you find the issue persisting, do reopen this bug. I am closing it based on upstream recommendation. Thank you reporting this issue.


Note You need to log in before you can comment on or make changes to this bug.