You are not logged in.

#1 2013-12-24 17:39:57

hca777
Member
Registered: 2013-02-12
Posts: 4

Strange hard disk activity on idle time

Hi Arch Community.
I recently installed Arch Linux in a new desktop pc. It's the first time I used lvm, luks encryption and raid1. After doing a lot of research, I finally managed to complete the installation. But there's a very annoying issue. Everything seems to be working fine, but there's strange hard disk actitity. It's persistent and it starts just after the partitions have been mounted, even if I'm not logged. I don't know what the system might be doing. I did another fresh install, deleted all partitions and didn't use raid1 this time, only lvm and luks,  but the issue persists. Every two or three second, the hdd led turns on and the hard disk emits sound, as is were reading or writing something.
Sorry for my poor English
Thanks in advance

Offline

#2 2013-12-24 18:12:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Strange hard disk activity on idle time

Run iotop to see what's going on.

Offline

#3 2013-12-24 18:48:43

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,793

Re: Strange hard disk activity on idle time

I see that sort of activity on my system, but no noise and no perceivable latency.  Check the APM level on your drive using sudo hdparm -B /dev/sda
You might try setting it to 254 using sudo hdparm -B 254 /dev/sda


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2013-12-24 20:32:30

hca777
Member
Registered: 2013-02-12
Posts: 4

Re: Strange hard disk activity on idle time

I got this:

Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:    2015.02 K/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND                                                                                                                                                                                                         
  513 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.47 % [ext4lazyinit]
12050 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.24 % [kworker/0:0]
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init
    2 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]
    3 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/0]
    5 be/0 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/0:0H]
    7 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/0]
    8 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [rcu_preempt]
    9 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [rcu_bh]
   10 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [rcu_sched]
   11 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [watchdog/0]
   12 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [watchdog/1]
   13 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/1]
   14 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/1]
   16 be/0 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/1:0H]
   17 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [watchdog/2]
   18 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/2]
   19 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/2]
   21 be/0 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/2:0H]
   22 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [watchdog/3]
   23 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/3]
   24 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [ksoftirqd/3]
   26 be/0 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kworker/3:0H]
   27 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [watchdog/4]
   28 rt/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [migration/4]
   29 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % 
/dev/sda:
 APM_level      = not supported

When I was using raid, this was more evident and annoying. Now it's not as evident as with raid, but still a little more than normal. Before Arch Linux, I was using Linux Mint in this pc, and disk activity on idle time was not like this.

Offline

#5 2013-12-24 21:25:10

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Strange hard disk activity on idle time

513 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.47 % [ext4lazyinit]

It will stop once your ext4 partitions have been fully initialized.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2014-04-25 22:50:12

SysGhost
Member
From: Stockholm
Registered: 2012-11-09
Posts: 62

Re: Strange hard disk activity on idle time

Old thread yes, but I suspect this information might still be relevant.
( I googled around a bit, and found this thread among the first hits. I suspect others might do that as well.)

The reason for this "strange activity" (due to ext4lazyinit), is suggested by the processes own name: "Lazy Init".
From the manpage of "mkfs.ext4":

...the inode table will not be fully initialized by mke2fs.  This speeds up filesystem initialization noticeably, but it requires the kernel to finish initializing the filesystem in the background when the filesystem is first mounted.

...and there "ext4lazyinit" comes into the picture.
To prevent this, one can format a storage device with the lazy init feature turned off. The only drawback with it that it takes longer for mkfs.ext4 (mke2fs) to finish its job. The advantage is that a drive won't be kept awake during the first few hours or so. Once a drive has been fully initialized, either by mke2fs or ext4lazyinit, this feature makes no whatsoever difference. (A.F.A.I.K)

This feature isn't something specific to Arch Linux. It's a feature of the ext4 filesystem and its toolset.
Arch is a "bleeding edge" distribution... and "bleeding edge" distributions tend to get the new features before other more common distributions.

To format a drive with the "lazy init" feature turned off:

mkfs.ext4 -E lazy_itable_init=0 /dev/sdXn

(Replace sdXn with the actual dev-node, for instance "sdg1")

Last edited by SysGhost (2014-04-25 22:51:53)

Offline

Board footer

Powered by FluxBB