* Kworker and jbd2 constantly writing to hdd
@ 2014-04-25 6:52 Jay Aurabind
2014-04-25 12:18 ` Mulyadi Santosa
0 siblings, 1 reply; 3+ messages in thread
From: Jay Aurabind @ 2014-04-25 6:52 UTC (permalink / raw)
To: kernelnewbies
Hi,
My kernel is 3.13.0-24, ubuntu 14.04. I have an ext4 root partition, and
I can see 2 threads (kworker,jbd2) periodically writing to hdd at about
roughly (1,5) second interval.
I disabled journalling so that jbd2 is gone. Still, the kworker thread
is bugging me. Is it really necessary for the system to work properly?
cat /proc/<PID>/stack of the kworker is:
[<ffffffff810846f1>] worker_thread+0x1d1/0x410
[<ffffffff8108b312>] kthread+0xd2/0xf0
[<ffffffff8172637c>] ret_from_fork+0x7c/0xb0
[<ffffffffffffffff>] 0xffffffffffffffff
It doesnt make any sense to me.
On tracing this kworker, I found this line:
kworker/u8:1-68 [000] d... 1135.724955: workqueue_queue_work: \
work struct=ffff8800701e00b8 function= \
ata_sff_pio_task workqueue=ffff880073e6f600 req_cpu=256 cpu=0
So it seems the function ata_sff_pio_task in
drivers/ata/libata-sff.c#L1343 is being run. Why is it getting called
periodically? Is it possible to suppress it ?
Someone else has also posted about it in arch linux forum:
https://bbs.archlinux.org/viewtopic.php?id=178632, smelling a kernel
bug. But I dont feel it could be a bug, because some other kernel thread
must be requesting some operation, which could be the reason for a
"generic" ata code to pop up.
I'm concerned because my harddisk heats up unnecessarily (though not
violently), and I never had such a situation while using windows (couple
of years ago). I am a noob when it comes to kernel programming, (just
started ldd3), so please correct me if I'm wrong. Please also suggest
something to fix this issue, or to investigate more into this.
Thanks and Regards,
Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 278 bytes
Desc: OpenPGP digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140425/7124c090/attachment.bin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Kworker and jbd2 constantly writing to hdd
2014-04-25 6:52 Kworker and jbd2 constantly writing to hdd Jay Aurabind
@ 2014-04-25 12:18 ` Mulyadi Santosa
2014-04-25 14:11 ` Jay Aurabind
0 siblings, 1 reply; 3+ messages in thread
From: Mulyadi Santosa @ 2014-04-25 12:18 UTC (permalink / raw)
To: kernelnewbies
On Fri, Apr 25, 2014 at 1:52 PM, Jay Aurabind <jay.aurabind@gmail.com> wrote:
> Hi,
>
> My kernel is 3.13.0-24, ubuntu 14.04. I have an ext4 root partition, and
> I can see 2 threads (kworker,jbd2) periodically writing to hdd at about
> roughly (1,5) second interval.
>
> I disabled journalling so that jbd2 is gone. Still, the kworker thread
> is bugging me. Is it really necessary for the system to work properly?
>
> cat /proc/<PID>/stack of the kworker is:
>
> [<ffffffff810846f1>] worker_thread+0x1d1/0x410
> [<ffffffff8108b312>] kthread+0xd2/0xf0
> [<ffffffff8172637c>] ret_from_fork+0x7c/0xb0
> [<ffffffffffffffff>] 0xffffffffffffffff
>
> It doesnt make any sense to me.
>
> On tracing this kworker, I found this line:
>
> kworker/u8:1-68 [000] d... 1135.724955: workqueue_queue_work: \
> work struct=ffff8800701e00b8 function= \
> ata_sff_pio_task workqueue=ffff880073e6f600 req_cpu=256 cpu=0
>
>
> So it seems the function ata_sff_pio_task in
> drivers/ata/libata-sff.c#L1343 is being run. Why is it getting called
> periodically? Is it possible to suppress it ?
Could it be a power management system trying to spin down your disk to
save power?
Try to alter the power management variable from your desktop
environment settings. Try to make it less aggresive.
ALso, it could be the I/O scheduler too. Try to switch to noop and see
if it change the situation
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Kworker and jbd2 constantly writing to hdd
2014-04-25 12:18 ` Mulyadi Santosa
@ 2014-04-25 14:11 ` Jay Aurabind
0 siblings, 0 replies; 3+ messages in thread
From: Jay Aurabind @ 2014-04-25 14:11 UTC (permalink / raw)
To: kernelnewbies
On Friday 25 April 2014 05:48 PM, Mulyadi Santosa wrote:
>
>
> Could it be a power management system trying to spin down your disk to
> save power?
>
> Try to alter the power management variable from your desktop
> environment settings. Try to make it less aggresive.
Tried setting APM to 254, so as not to attempt a spin down, but no
change in the situation. But even if its the system trying to spin down,
would it get listed as a write operation? Isnt it supposed to be an
ioctl ? Does iotop consider ioctls as a write ? Its man page doesnt
mention anything about ioctls.
>
>
> ALso, it could be the I/O scheduler too. Try to switch to noop and see
> if it change the situation
>
Under noop, deadline and cfq, the situation remains the same. Dont have
any other schedulers.
The kworker I mentioned was spotted from the output of iotop -o. I kept
"watching" /proc/meminfo while kworker was popping up. I found that even
though the same kworker showed up periodically at 1 second, meminfo's
"dirty" entry was getting modified only at about 45 seconds, with 8KB,
and subsequently after 1 minute, dirty would roll back to zero,
(probably indicating a real disk write?).
Iotop says it reports acutal I/O happening, and this seems consistent
with the above observation. But in reality, my HDD indicator is blinking
at 1 second, synchronous to kworker. Does the hdd indicator blink under
any circumstances other than a read or write? BTW its a light blink, not
a strong one like when we do some serious I/O. Can you please do an
"iotop -o" and see if you also have the same kworker popping up?
Thanks and Regards,
Jay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 278 bytes
Desc: OpenPGP digital signature
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140425/48565801/attachment.bin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-25 14:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-25 6:52 Kworker and jbd2 constantly writing to hdd Jay Aurabind
2014-04-25 12:18 ` Mulyadi Santosa
2014-04-25 14:11 ` Jay Aurabind
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.