Bug 486111 - Transmission causes wakeups by unnecessary polling.
Transmission causes wakeups by unnecessary polling.
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: transmission (Show other bugs)
10
All Linux
low Severity medium
: ---
: ---
Assigned To: Rahul Sundaram
Fedora Extras Quality Assurance
:
Depends On:
Blocks: wakeup
  Show dependency treegraph
 
Reported: 2009-02-18 09:00 EST by Quintin Hill
Modified: 2013-03-13 01:44 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-13 14:35:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Quintin Hill 2009-02-18 09:00:44 EST
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 05:42:21 EDT
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 06:27:10 EDT
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 16:19:52 EDT
Upstream ticket: http://trac.transmissionbt.com/ticket/2035
Comment 4 Charles Kerr 2009-05-14 09:48:44 EDT
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 12:05:17 EDT
Great! is this is 1.53 or 1.61 ?
Comment 6 Charles Kerr 2009-05-14 20:56:22 EDT
No, this is a new development in trunk.  Possibly 1.62.
Comment 7 Fedora Admin XMLRPC Client 2009-06-03 04:28:02 EDT
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 10:54:53 EDT
Charles,

Is the latest upstream supposed to fix this issue? Can I close this bug?
Comment 9 Charles Kerr 2009-06-13 14:27:50 EDT
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 14:35:35 EDT
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.