"Mccauliff, Sean D. (ARC-PX)[Lockheed Martin Space OPNS]"
High CPU Utilization When Copying to Ext4
Sorry if this is not the correct mailing list for ext4 questions.
I'm copying terabytes of data from an ext3 file system to a new ext4 file system. I'm seeing high CPU usage from the processes flush-253:2, kworker-3:0, kworker-2:2, kworker-1:1, and kworker-0:0. Does anyone on the list have any idea what these processes do, why they are consuming so much cpu time and if there is something that can be done about it? This is using Fedora 15.
Thanks!
Sean
_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
07-21-2011, 01:38 PM
Carlos Maiolino
High CPU Utilization When Copying to Ext4
> I'm copying terabytes of data from an ext3 file system to a new ext4 file system. I'm seeing high CPU usage from the processes flush-253:2, kworker-3:0, kworker-2:2, kworker-1:1, and kworker-0:0. Does anyone on the list have any idea what these processes do, why they are consuming so much cpu time and if there is something that can be done about it? This is using Fedora 15.
>
Hi, the flush thread is used to flush page cache out to disk, and kworker threads, iirc are general threads responsible to complete workqueue jobs (see workqueues in kernel).
Looks like it's behaving as expected, once you're copying terabytes of data, the flush will have to do a lot of job to send cached data to disk, and kworker threads should be being used to do some kind of job related.
I found this in kernel documentation at linux-2.6/Documentation/workqueue.txt:
-------------------------------------
If kworkers are going crazy (using too much cpu), there are two types
of possible problems:
1. Something beeing scheduled in rapid succession
2. A single work item that consumes lots of cpu cycles
The first one can be tracked using tracing:
$ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
$ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
(wait a few secs)
^C
If something is busy looping on work queueing, it would be dominating
the output and the offender can be determined with the work item
function.
For the second type of problems it should be possible to just check
the stack trace of the offending worker thread.
$ cat /proc/THE_OFFENDING_KWORKER/stack
The work item's function should be trivially visible in the stack
trace.
------------------------------------
Cheers.
--
-Carlos
_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
07-21-2011, 01:38 PM
Carlos Maiolino
High CPU Utilization When Copying to Ext4
> I'm copying terabytes of data from an ext3 file system to a new ext4 file system. I'm seeing high CPU usage from the processes flush-253:2, kworker-3:0, kworker-2:2, kworker-1:1, and kworker-0:0. Does anyone on the list have any idea what these processes do, why they are consuming so much cpu time and if there is something that can be done about it? This is using Fedora 15.
>
Hi, the flush thread is used to flush page cache out to disk, and kworker threads, iirc are general threads responsible to complete workqueue jobs (see workqueues in kernel).
Looks like it's behaving as expected, once you're copying terabytes of data, the flush will have to do a lot of job to send cached data to disk, and kworker threads should be being used to do some kind of job related.
I found this in kernel documentation at linux-2.6/Documentation/workqueue.txt:
-------------------------------------
If kworkers are going crazy (using too much cpu), there are two types
of possible problems:
1. Something beeing scheduled in rapid succession
2. A single work item that consumes lots of cpu cycles
The first one can be tracked using tracing:
$ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
$ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
(wait a few secs)
^C
If something is busy looping on work queueing, it would be dominating
the output and the offender can be determined with the work item
function.
For the second type of problems it should be possible to just check
the stack trace of the offending worker thread.
$ cat /proc/THE_OFFENDING_KWORKER/stack
The work item's function should be trivially visible in the stack
trace.
------------------------------------
Cheers.
--
-Carlos
_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
11-05-2011, 12:06 PM
Kristen Eisenberg
High CPU Utilization When Copying to Ext4
Sorry if this is not the correct mailing list for ext4 questions.
Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Deutschland
Telefon: +49 (33)
5310967
Email:
utebachmeier at
gmail.com
Site:
http://flug.airego.de
- Billige Flüge vergleichen
_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
11-05-2011, 04:21 PM
"Ted Ts'o"
High CPU Utilization When Copying to Ext4
On Sat, Nov 05, 2011 at 06:06:57AM -0700, Kristen Eisenberg wrote:
> Sorry if this is not the correct mailing list for ext4 questions.
You might get a better discussion going on the
linux-ext4@vger.kernel.org developer's list, but I do listen in on
ext3-users. What do you consider high CPU utilization, and how are
you writing to ext4? And what kernel version are you using?
Regards,
- Ted
_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users