Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323255 - disk flush utilize cpu to 100% and freeze system after copying large file
Summary: disk flush utilize cpu to 100% and freeze system after copying large file
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-08 20:55 UTC by Ondřej Šibřina
Modified: 2010-07-19 17:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kernel .config (.config,74.39 KB, text/plain)
2010-06-08 20:59 UTC, Ondřej Šibřina
Details
dmesg (dmesg,104.16 KB, text/plain)
2010-06-08 20:59 UTC, Ondřej Šibřina
Details
hdparm -I /dev/sda (hdparm,2.42 KB, text/plain)
2010-06-08 20:59 UTC, Ondřej Šibřina
Details
hdparm -tT /dev/sda (hdparmTt,148 bytes, text/plain)
2010-06-08 20:59 UTC, Ondřej Šibřina
Details
lspci (lspci,2.12 KB, text/plain)
2010-06-08 21:16 UTC, Ondřej Šibřina
Details
lsusb (lsusb,1.16 KB, text/plain)
2010-06-08 21:16 UTC, Ondřej Šibřina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondřej Šibřina 2010-06-08 20:55:11 UTC
Hi, I have no other idea how to solve my problem. So i'll glad if you write some idea about that.

When i copy larger file (like 100MB) my computer freeze when data are flushing to disk. It like:

1) I copy 100MB file to /dev/sda2 partition
2) waiting for disk flush while flush-8:0 process appears in "top" utility 
3) Then CPU rise to 100% utilization in wait and computer almost freeze about 5 seconds

When i copy larger file.. those lags are longer

My computer has Samsung SSD 64GB connected to SATA. I tried another kernels and another schedulers so but nothing helped to me.

Could you bring some new idea?

Reproducible: Always

Steps to Reproduce:
1) I copy 100MB file to /dev/sda2 partition
2) waiting for disk flush while flush-8:0 process appears in "top" utility 
3) Then CPU rise to 100% utilization in wait and computer almost freeze about 5 seconds
Comment 1 Ondřej Šibřina 2010-06-08 20:59:00 UTC
Created attachment 234589 [details]
kernel .config
Comment 2 Ondřej Šibřina 2010-06-08 20:59:14 UTC
Created attachment 234591 [details]
dmesg
Comment 3 Ondřej Šibřina 2010-06-08 20:59:34 UTC
Created attachment 234593 [details]
hdparm -I /dev/sda
Comment 4 Ondřej Šibřina 2010-06-08 20:59:52 UTC
Created attachment 234595 [details]
hdparm -tT /dev/sda
Comment 5 Ondřej Šibřina 2010-06-08 21:16:15 UTC
Created attachment 234601 [details]
lspci
Comment 6 Ondřej Šibřina 2010-06-08 21:16:25 UTC
Created attachment 234603 [details]
lsusb
Comment 7 Michael Weber (RETIRED) gentoo-dev 2010-06-09 00:53:10 UTC
Hello Ondřej,

have you tried to confirm the health of you RAM? Install sys-apps/memtest86+ and boot into it, run the normal test sets for some hours and hopefullz there's no error.

Michael
Comment 8 Michael Weber (RETIRED) gentoo-dev 2010-06-09 00:56:10 UTC
p.s. do you see SATA relatet errors on the kernels log? Run `dmesg` and watch for rediscoveries of you dist.

You can stress test the disks connection by installing tools like sys-block/buffer and run `buffer -i /dev/sda -o /dev/null -z 512k` and see the data rate. If it's low, try to debug the link by using another cable, clean the connections ...

Michael
Comment 9 Ondřej Šibřina 2010-06-09 09:01:42 UTC
Dear Michael, thank you for interest.

I tried memtest and i got not error after 5 passed. I don't think it's memory problem because there's no crashes.

Then i tried buffer `buffer -i /dev/sda -o /dev/null -z 512k` you suggest. I get result like 100000K/s constatly. During test my CPU was 60% (10% buffer process, 50% wait) and my computer wasn't stuck.

I can't see any errors in my dmesg while flushing ;-(

I'm not sure but it looks like connection works good. Don't you think?

Thank you for future steps.

Ondrej

Comment 10 Michael Weber (RETIRED) gentoo-dev 2010-06-09 12:54:13 UTC
(In reply to comment #9)
> I tried memtest and i got not error after 5 passed. I don't think it's memory
> problem because there's no crashes.
ok

> Then i tried buffer `buffer -i /dev/sda -o /dev/null -z 512k` you suggest. I
> get result like 100000K/s constatly. During test my CPU was 60% (10% buffer
> process, 50% wait) and my computer wasn't stuck.
this is ok, one processor is constntly waiting for the process in iowait state, which results in 50% (1 of 2 cpus) utilization.

> I'm not sure but it looks like connection works good. Don't you think?
Yes.

The starange thing is the relativley low average write speed of 20MB/s (5 seconds "freeze" for approx. 100MB) and that it affects both your cpu cores. One in waiting would be ok (other non io-wait processes would still be ran on this) and the other should be just free.

I looked up you IO_SCHED settings, nothing wrong with that.  
I just saw the SDD, can you please check if you partitions have strange boundaries which do not allign to the internal data format of the SDD (bug 320655)? But that would only lead to a bad write speed, not a frozen desktop.

You're using a ZEN kernel, is this the the host or the guest? Have you tried another kernel, like the stable gentoo-sources or just any LiveCD/DVD image?

Can you erase the disk or an partition? Would be nice to see if a non-destructive write test with badblocks lead to the same problem. If not, bonnie is the choice for write tests. Can you try these with another kernel?

Michael
Comment 11 Michael Weber (RETIRED) gentoo-dev 2010-06-15 14:31:04 UTC
Hi,

which kernel sources do you use? sys-kernel/zen-sources? which version?

Michael
Comment 12 Ondřej Šibřina 2010-06-20 20:13:32 UTC
Dear Micheal,
 I'm sorry for late response, but I had bachalor final exams, so i had another point to think about.

Actually i have kernel from zen-sources linux-2.6.33-zen2.I started with gentoo-sources 2.6.34 and then try kernel from zen sources to solve my problem but it doesn't work.

It's not possible (too complicated) to erase my partition. It's system partition and i haven't disc to store my data.

I'll try run some live-distribution CD and mount my partition with that and let you know it'll work.

I'll add emerge --info file in attachment.

Thank you for help

Ondrej Sibrina