0421:01c7 Natty almost freezes on USB transfers / slow transfers / Xorg freeze / caching lunacy

Bug #837070 reported by Bzzz
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Low
Unassigned

Bug Description

Oh hi,
I bet this bug or at least parts of it are already here but suffer minor attention. But it really p***es me off and makes Ubuntu unusable for daily work....

* USB storage is incredibly slow. In my case: A Nokia N900 26GB, a Corsair Flash Voyager 4GB, another OCZ ATV 16GB, Verbatim Store'N'Go 4GB and some other other ones I rarely use and/or are not mine.

* cfq scheduler in its current condition is the most stupid thing one can imagine for flash devices. deadline has some advantages, but also isn't acceptable for usb storage

* Caching file transfers has idiotic behaviour: 100% I/O consumption and almost Xorg freeze over a few seconds without writing to the device, then starting the write process while reading nothing; after cache is (almost? fully?) empty, another massive read attack is started while stalling the write transfer. Seriously, WTF? Even a 1:1 without caching results in better transfer rates and lower impact on system usability.

* Queuing file transfers doesn't work for files that are larger than about 50 MB or 5 seconds write time. Surely everybody has time to move files piece by piece because queuing cannot be used without major performace impact:

* Sometimes single file transfers and almost everytime multi-file transfers result in massive system slowdown; Xorg freezes, reaction times to swith to a tty ~10 seconds and up. System and I/O wait CPU usage have a massive increase. Even WLAN connection seems lost

WORKAROUND: echo madvise > /sys/kernel/mm/transparent_hugepage/defrag

---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: bzzz 16948 F.... pulseaudio
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc020000 irq 47'
   Mixer name : 'Conexant CX20561 (Hermosa)'
   Components : 'HDA:14f15051,17aa211c,00100000'
   Controls : 16
   Simple ctrls : 8
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 7VHT16WW-1.06'
   Mixer name : 'ThinkPad EC 7VHT16WW-1.06'
   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]
DistroRelease: Ubuntu 11.04
HibernationDevice: RESUME=UUID=ab2e99a3-850d-480f-99db-b0711b005ed2
InstallationMedia: Kubuntu 11.04 "Natty Narwhal" - Release amd64 (20110426.3)
MachineType: LENOVO 6475VAT
Package: linux 2.6.38.11.26
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=en_GB:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-2.6.38-11-generic root=/dev/mapper/lvmtit-titroot ro elevator=deadline crashkernel=384M-2G:64M,2G-:128M
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-11-generic N/A
 linux-backports-modules-2.6.38-11-generic N/A
 linux-firmware 1.52
Tags: natty
Uname: Linux 2.6.38-11-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin audio cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 08/02/2010
dmi.bios.vendor: LENOVO
dmi.bios.version: 7UET89WW (3.19 )
dmi.board.name: 6475VAT
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:bvr7UET89WW(3.19):bd08/02/2010:svnLENOVO:pn6475VAT:pvrThinkPadT400:rvnLENOVO:rn6475VAT:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 6475VAT
dmi.product.version: ThinkPad T400
dmi.sys.vendor: LENOVO

Revision history for this message
Bzzz (da-bzzz) wrote :
Revision history for this message
Bzzz (da-bzzz) wrote :
Revision history for this message
Bzzz (da-bzzz) wrote :
Revision history for this message
Bzzz (da-bzzz) wrote :
Revision history for this message
Sam_ (and-sam) wrote :

Confirm with verbatim and Natty (Bug #778052), but no issue since Oneiric with kernel 3.0.0-8.

affects: ubuntu → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 837070

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: natty
Revision history for this message
Bzzz (da-bzzz) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Bzzz (da-bzzz) wrote : AlsaDevices.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : AplayDevices.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : BootDmesg.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : CRDA.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : Dependencies.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : IwConfig.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : Lspci.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : Lsusb.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : PciMultimedia.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : ProcCpuinfo_.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : ProcModules.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : RfKill.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : UdevDb.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : UdevLog.txt

apport information

Revision history for this message
Bzzz (da-bzzz) wrote : WifiSyslog.txt

apport information

Sam_ (and-sam)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Sebastian Breier (tomcat42) wrote : Re: Natty almost freezes on USB transfers / slow transfers / Xorg freeze / caching lunacy

Can you check how your system behaves when you do:

echo 1 | sudo tee /proc/sys/vm/dirty_ratio

I had really slow USB transfer speeds (only to pen drives, not to USB disks), and this "fixed" it for me.
(Actually it only cures a symptom, because the default value of 10% dirty cache should work just as well.)

Maybe this can help determine the underlying problem.

Revision history for this message
Konrad Materka (kmaterka) wrote :

I can confirm this on Oneiric with latest updates. Bug occurs on system with long uptime, because of memory fragmentation.

Problem is described in details here:
http://lwn.net/Articles/467328/

My solution was to disable synchronous memory defragmentation with:

echo never > /sys/kernel/mm/transparent_hugepage/defrag
or less restrictive:
echo madvise > /sys/kernel/mm/transparent_hugepage/defrag

This bug is found in other distributions, like Arch:
https://bbs.archlinux.org/viewtopic.php?id=112846&p=4

Revision history for this message
Sebastian Breier (tomcat42) wrote :

Thanks kmaterka - your solution also works (both never & madvise worked for me, but madvise still had some freezes).

However, it feels like USB is getting unbearably slow then.
So for now I've gone back to setting the dirty_ratio to 1% (defrag = always), which works a little bit better.

Revision history for this message
Bzzz (da-bzzz) wrote :

That's it. Smooth file transfer, no freezes, no excessive system load, no other problems. Haven't tried [never], as [madvise] just did the job.

Revision history for this message
penalvch (penalvch) wrote :

Bzzz, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available? 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

tags: added: needs-upstream-testing
description: updated
summary: - Natty almost freezes on USB transfers / slow transfers / Xorg freeze /
- caching lunacy
+ 0421:01c7 Natty almost freezes on USB transfers / slow transfers / Xorg
+ freeze / caching lunacy
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Bzzz (da-bzzz) wrote :

See #29.

If that is the default value in fresh installs, the bug is "fixed". If not, it is still present. I'm using this option (right now in Precise) and USB write performance still way behind Windows, but at least it is usable and doesn't stall everything.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.