Bug 470736

Summary: High IO Wait times for common IO loads kill interactivity on x86_64
Product: [Fedora] Fedora Reporter: Ben Gamari <bgamari>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: medium    
Version: 10CC: james, kernel-maint, tao
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-18 06:48:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Gamari 2008-11-09 20:15:37 UTC
Description of problem:
While transferring files from my hard drive to an external USB mass storage device, I experience considerable latency, with latencytop indicating that "Writing a page to disk" accounts for nearly a quarter of the system latency. During this activity, I can easily induce severe audio cutting out (e.g. Alt-Tabbing in compiz). This would be especially alarming except for the fact that I have 4GB of RAM, of which gnome-system-monitor claims only 44% is used by "programs" with 55% being used by cache. Moreover, swap usage is only 35 MiB.

All-in-all, it doesn't seem as if there should be any appreciable swapping latency on my setup, yet it is more than enough to cause very annoying audio skipping. On a desktop system, there should never be an excuse for something as noticeable as audio skipping.

Comment 1 Ben Gamari 2008-11-09 20:33:53 UTC
Note that even with pulseaudio running under SCHED_FIFO at priority 14, so its unlikely that the issue is waiting for CPU time.

Comment 2 Chuck Ebbert 2008-11-11 14:53:09 UTC
The system has to write the data that you are copying to the external disk. It can't just leave it in memory forever.

If you disable pulseaudio, does the skipping go away?

Comment 3 Ben Gamari 2008-11-11 15:01:17 UTC
So these pages are being written to the external disk? I was under the impression that except in the case of mmap, a page being written to disk would be going to swap. Is this not the case?

It seems to me that writing to the external drive shouldn't contribute to the overall system latency. No processes are blocking on reading from the drive, data is only being written. Is this just a symptom of the high CPU requirement of bulk USB transfers?

I'll need to go back home to see if pulseaudio is contributing.

Comment 4 Chuck Ebbert 2008-11-11 20:03:55 UTC
Any data written to disk shows up as page writes. And USB storage has a lot of overhead for each write.

Comment 5 Ben Gamari 2008-11-11 21:00:57 UTC
Alright, I guess that the USB overhead doesn't really surprise me. Somehow, I get a maximum of 10 MiB/sec to/from the external drive so clearly USB transactions aren't cheap.

I'll check the effect of pulseaudio when I get home.

Comment 6 Bug Zapper 2008-11-26 05:05:59 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Ben Gamari 2008-12-02 04:25:41 UTC
Ahh hah! I just found kernel.org bug #7372 (Unusable system (ie slow) when copying large files) well looking for a completely unrelated bug. It seems like this has been a known issue since 2.6.18.

Comment 8 Ben Gamari 2008-12-02 04:34:51 UTC
Also, kernel.org bug #8636 (http://bugzilla.kernel.org/show_bug.cgi?id=8636) seems to relate to this issue. Both #7372 and #8636 suggest that the problem lies in the IO scheduler.

Comment 9 Ben Gamari 2008-12-28 00:11:22 UTC
I opened a new kernel.org bug, #12309 ( http://bugzilla.kernel.org/show_bug.cgi?id=12309 ), to replace #7372. Hopefully this one will be a little more productive.

Comment 10 Chuck Ebbert 2009-03-28 14:26:16 UTC
You can try to work around this by running this command at boot time (after all the filesystems are mounted including the USB drive):

 pgrep kjournald | xargs -n 1 ionice -c1 -n7 -p

Comment 12 Bug Zapper 2009-11-18 07:58:17 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Bug Zapper 2009-12-18 06:48:08 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.