Ubuntu

152d:2338 High IO when writing to USB devices

Reported by Alan Pope ㋛ on 2012-07-29
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
Unassigned

Bug Description

I am wiping a SATA disk which is attached via USB in an enclosure. I'm running this command:-

root@deep-thought:~# dd if=/dev/zero bs=512M | pv -s 250059350016 -petr > /dev/sdb

Whilst running I note significant IO wait on all cores. This means the desktop becomes very slow and at times completely unresponsive. Applications go grey as they wait and sometimes the mouse cursor doesn't even move.

top - 15:58:04 up 22:34, 5 users, load average: 3.11, 2.54, 2.04
Tasks: 201 total, 1 running, 199 sleeping, 0 stopped, 1 zombie
Cpu0 : 6.2%us, 4.0%sy, 0.0%ni, 51.5%id, 36.8%wa, 0.0%hi, 1.5%si, 0.0%st
Cpu1 : 1.0%us, 6.1%sy, 0.0%ni, 44.9%id, 48.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 8.2%us, 1.4%sy, 0.0%ni, 36.6%id, 53.8%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 2.0%us, 1.0%sy, 0.0%ni, 67.2%id, 29.7%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8058844k total, 7915428k used, 143416k free, 3348052k buffers
Swap: 8267772k total, 12040k used, 8255732k free, 2043248k cached

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-27-generic 3.2.0-27.43
ProcVersionSignature: Ubuntu 3.2.0-27.43-generic 3.2.21
Uname: Linux 3.2.0-27-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 2.0.1-0ubuntu11
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: alan 2296 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf2620000 irq 52'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:14f1506e,17aa21da,00100002 HDA:80862805,80860101,00100000'
   Controls : 27
   Simple ctrls : 9
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw unknown'
   Mixer name : 'ThinkPad EC (unknown)'
   Components : ''
   Controls : 1
   Simple ctrls : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Sun Jul 29 14:48:41 2012
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=4de844e6-b3a9-4309-bc26-739bea6b4146
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MachineType: LENOVO 4287CTO
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-27-generic root=UUID=c8438547-b9fb-46af-8012-4663c77c70e7 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.2.0-27-generic N/A
 linux-backports-modules-3.2.0-27-generic N/A
 linux-firmware 1.79
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/15/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET52WW (1.22 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4287CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8DET52WW(1.22):bd09/15/2011:svnLENOVO:pn4287CTO:pvrThinkPadX220:rvnLENOVO:rn4287CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4287CTO
dmi.product.version: ThinkPad X220
dmi.sys.vendor: LENOVO

Alan Pope ㋛ (popey) wrote :
Brad Figg (brad-figg) on 2012-07-29
Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: needs-upstream-testing
summary: - High IO when writing to USB devices
+ 152d:2338 High IO when writing to USB devices
Alan Pope ㋛ (popey) on 2012-07-29
description: updated
Alan Pope ㋛ (popey) wrote :

Have tried 3.2.24-030224-generic from kernel.ubuntu.com/~kernel-ppa/mainline/v3.2.24-precise and get similar results:-

top - 16:15:12 up 7 min, 4 users, load average: 2.82, 1.07, 0.43
Tasks: 194 total, 2 running, 192 sleeping, 0 stopped, 0 zombie
Cpu0 : 7.4%us, 3.0%sy, 0.0%ni, 56.8%id, 31.7%wa, 0.0%hi, 1.1%si, 0.0%st
Cpu1 : 2.0%us, 3.3%sy, 0.0%ni, 89.0%id, 5.7%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 10.2%us, 1.7%sy, 0.0%ni, 40.3%id, 47.8%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 1.7%us, 0.3%sy, 0.0%ni, 9.4%id, 88.6%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8058896k total, 7457592k used, 601304k free, 2974216k buffers
Swap: 8267772k total, 0k used, 8267772k free, 2389896k cached

Alan Pope, thank you for reporting this bug and helping make Ubuntu better. Could you please test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please do not test the kernel in the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. As well, please comment on which kernel version specifically you tested.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream', and comment as to why specifically you were unable to test it.

Please let us know your results. Thanks in advance.

Helpful Bug Reporting Links:
https://help.ubuntu.com/community/ReportingBugs#Bug_Reporting_Etiquette
https://help.ubuntu.com/community/ReportingBugs#A3._Make_sure_the_bug_hasn.27t_already_been_reported
https://help.ubuntu.com/community/ReportingBugs#Adding_Apport_Debug_Information_to_an_Existing_Launchpad_Bug
https://help.ubuntu.com/community/ReportingBugs#Adding_Additional_Attachments_to_an_Existing_Launchpad_Bug

Changed in linux (Ubuntu):
importance: Undecided → High
status: Confirmed → Incomplete
Alan Pope ㋛ (popey) wrote :

Have just tried 3.5.0-030500rc7-generic from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.5-rc7-quantal/ and get the same result:-

top - 16:28:40 up 8 min, 3 users, load average: 2.98, 1.58, 0.66
Tasks: 196 total, 1 running, 195 sleeping, 0 stopped, 0 zombie
Cpu0 : 3.5%us, 4.6%sy, 0.0%ni, 35.9%id, 56.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 2.4%us, 1.7%sy, 0.0%ni, 24.9%id, 71.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 14.3%us, 4.2%sy, 0.0%ni, 48.7%id, 32.5%wa, 0.0%hi, 0.4%si, 0.0%st
Cpu3 : 2.0%us, 0.3%sy, 0.0%ni, 91.5%id, 6.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 8058548k total, 7037376k used, 1021172k free, 3182792k buffers
Swap: 8267772k total, 0k used, 8267772k free, 1814156k cached

tags: removed: needs-upstream-testing
tags: added: kernel-bug-exists-upstream

Alan Pope, thank you for testing the mainline. Did this problem not occur in a prior vesion of Ubuntu?

Alan Pope ㋛ (popey) wrote :

I couldn't say. I've only had 12.04 on this machine.

Alan Pope, for regression testing purposes, could you please test for this problem in a Lucid environment http://cdimage.ubuntu.com/lucid/daily-live/current/ ?

Alan Pope ㋛ (popey) wrote :

Same thing happens on Lucid.

top - 22:06:03 up 12 min, 9 users, load average: 1.92, 0.61, 0.25
Tasks: 196 total, 1 running, 194 sleeping, 0 stopped, 1 zombie
Cpu0 : 1.7%us, 0.3%sy, 0.0%ni, 31.5%id, 66.6%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 0.3%us, 0.7%sy, 0.0%ni, 67.2%id, 31.8%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 0.0%us, 3.0%sy, 0.0%ni, 23.4%id, 73.6%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 0.0%us, 1.6%sy, 0.0%ni, 96.2%id, 0.0%wa, 0.0%hi, 2.2%si, 0.0%st
Mem: 8075448k total, 3872208k used, 4203240k free, 2246296k buffers
Swap: 0k total, 0k used, 0k free, 514024k cached

Andy Smith (grifferz) wrote :

Is there a particular reason why you're using a block size of 512M? Have you tried just leaving it at default?

Have you tried changing the scheduler for sdb to "deadline"?

echo deadline | tee /sys/block/sdb/queue/scheduler

Have you tried changing the scheduler of ALL disk devices to deadline?

I'm not 100% sure that this would not happen on pretty much all Linuxes, as USB is pretty slow.

Andy Smith (grifferz) wrote :

(sudo tee, obviously)

tags: added: lucid
Alan Pope ㋛ (popey) wrote :

I'm away from home, will test again later in the week.

tags: added: kernel-da-key
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers