I think I can shed a little light.

This seems to be a general kernel bug (I've seen it on Mageia too), as
well as the most recent Precise-64 system, affecting copying large
amounts of data onto a VFAT filesystem (especially if this system is an
SD card).  For example, trying to copy a 1GB backup, or a multi-GB
directory of images/music.

The system becomes nearly completely unresponsive (even a really high
end 8-core desktop with 16GB RAM hangs, after the first few seconds): it
has the symptoms of a swap-storm. I observe CPU and RAM usage going to
100%, and everything getting swapped out.

 If I force quit the copy (by pulling out the USB-device), then the
system immediately recovers [assuming the OOM-killer hasn't clobbered
anything].  If instead of copying (cp), I do a rate-limted copy (rsync
--bwlimit=500), everything is well-behaved.

So much for the facts. Let me now make a guess: I think that the kernel
is doing a false-optimisation: it's reading the whole source file into
RAM but only buffering the writing-out. As the source disk is vary fast,
and the destination USB key is relatively much much slower, this is
really wasteful of RAM. The kernel then thrashes the CPU on swapping.

I'm currently seeing this with a 650mb tar file, being copied from a
laptop internal SSD to 64GB class 10 micro-SD card (Vfat) connected over
SSD; I have 4GB of system RAM, a T7600 CPU, and kernel 3.2.0-23 (64-bit
precise pangolin)

Can we change the bug title to something more descriptive, perhaps
"Copying large file(s) to VFAT on USB-flash uses full CPU and RAM" ?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/777685

Title:
  Unity Desktop is very slow (almost freezed) when decompressing with
  tar a LZMA file onto a USB Device in vfat

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/777685/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to