You are not logged in.

#1 2016-04-17 02:20:00

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

[SOLVED] journald writing MB/sec logs on laptop

Am seing journald writing >1MB/sec under i686 kernels, and similar messages at a lower rate on x86_64 on a Dell Mini 1012 laptop.
Is somebody else having journald filling up disk on his or her laptop?

While it might be a result of battery life optimizations I've done recently (TLP, sysctl dirty writes, ext4's realatime and 'commit=300'), the log writes happen on both battery and ac modes --whether most optimizations are on or off.

kernel linux-mainline 4.6.0.rc3 i686 

Here while doing essentialy nothing (cli only with iotop running):

# uptime                                                                            
 02:47:11 up 10 min,  3 users,  load average: 0.18, 0.43, 0.28                      
                                                                                    
# iotop -oPa                                                                        
Total DISK READ :       0.00 B/s | Total DISK WRITE :       0.00 B/s                
Actual DISK READ:       0.00 B/s | Actual DISK WRITE:       0.00 B/s                
  PID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND              
    48 be/4 root          0.00 B      0.00 B  0.00 % 17.42 % [kworker/u4:1]         
    85 be/4 root          4.00 K      0.00 B  0.00 %  4.36 % [kworker/u4:2]         
   129 be/4 root          0.00 B      0.00 B  0.00 %  3.72 % [kworker/u4:3]         
   232 be/3 root          0.00 B    692.00 K  0.00 %  3.28 % [jbd2/dm-1-8]          
   261 be/4 root          8.00 K    655.43 M  0.00 %  2.01 % systemd-journald       
     1 be/4 root       1256.00 K      0.00 B  0.00 %  0.23 % init                   
   823 be/4 root          0.00 B      0.00 B  0.00 %  0.18 % smartd -n              
   726 be/4 root        172.00 K      0.00 B  0.00 %  0.06 % -bash                  
   308 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/0:3]          
    35 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [kworker/1:1]

         
journalctl (1000 first lines) 's raging with

...
avril 17 01:28:56 gwenael kernel: systemd-random-(271): READ block 12585496 on dm-1 (8 sectors)
avril 17 01:28:56 gwenael kernel: systemd-random-(271): READ block 12991984 on dm-1 (8 sectors)
avril 17 01:28:56 gwenael kernel: systemd-random-(271): dirtied inode 397882 (random-seed) on dm-1
avril 17 01:28:56 gwenael kernel: systemd-random-(271): dirtied inode 397882 (random-seed) on dm-1
avril 17 01:28:56 gwenael kernel: systemd(1): dirtied inode 44 (systemd-random-seed.service) on cgroup
avril 17 01:28:56 gwenael kernel: systemd(1): dirtied inode 51 (systemd-random-seed.service) on cgroup
avril 17 01:28:56 gwenael systemd[1]: Started Load/Save Random Seed.
avril 17 01:28:56 gwenael kernel: (udevadm)(278): dirtied inode 195754 (udevadm) on dm-1
avril 17 01:28:56 gwenael kernel: udevadm(278): READ block 5558128 on dm-1 (136 sectors)
avril 17 01:28:56 gwenael kernel: udevadm(278): READ block 5557440 on dm-1 (256 sectors)
avril 17 01:28:56 gwenael kernel: udevadm(278): READ block 5557696 on dm-1 (256 sectors)
avril 17 01:28:56 gwenael kernel: udevadm(278): READ block 5557952 on dm-1 (144 sectors)
avril 17 01:28:56 gwenael kernel: udevadm(278): dirtied inode 33 (drivers) on sysfs
avril 17 01:28:56 gwenael kernel: udevadm(278): dirtied inode 191 (drivers) on sysfs
...

                                                       
And whatever active process add dozen or more like above.

 
Kernel 4.07-ARCH x86_64 shows much less disk activity (here first 1000 lines), but similar WRITE and READ block logs:

...
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660040 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660048 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660056 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660064 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660072 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660080 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660088 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660096 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660104 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660112 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660120 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660128 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660136 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: systemd-journal(219): dirtied inode 14607 (system.journal) on tmpfs
avril 17 02:59:05 gwenael kernel: updatedb(521): READ block 20981128 on dm-6 (8 sectors)
avril 17 02:59:05 gwenael kernel: mandb(529): WRITE block 5480720 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: mandb(529): WRITE block 5440240 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660144 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660152 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660160 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660168 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660176 on dm-0 (8 sectors)
avril 17 02:59:05 gwenael kernel: jbd2/dm-0-8(185): WRITE block 8660184 on dm-0 (8 sectors)
avril 17 02:59:06 gwenael kernel: updatedb(521): READ block 25167616 on dm-6 (8 sectors)

Disk looks fine:

# smartctl -a /dev/sda                                                              
smartctl 6.4 2015-06-04 r4109 [i686-linux-4.6.0-rc3-mainline] (local build)         
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org         
                                                                                    
=== START OF INFORMATION SECTION ===                                                
Model Family:     Seagate Momentus 5400.6                                           
Device Model:     ST9160314AS                                                       
Serial Number:    6VC5CYZ1                                                          
LU WWN Device Id: 5 000c50 02795059e                                                
Firmware Version: D005DEM1                                                          
User Capacity:    160,041,885,696 bytes [160 GB]                                    
Sector Size:      512 bytes logical/physical                                        
Rotation Rate:    5400 rpm                                                          
Device is:        In smartctl database [for details use: -P show]                   
ATA Version is:   ATA8-ACS T13/1699-D revision 4                                    
SATA Version is:  SATA 2.6, 3.0 Gb/s                                                
Local Time is:    Sun Apr 17 02:43:30 2016 CEST                                     
SMART support is: Available - device has SMART capability.                          
SMART support is: Enabled                                                           
                                                                                    
=== START OF READ SMART DATA SECTION ===                                            
SMART overall-health self-assessment test result: PASSED                            
See vendor-specific Attribute list for marginal Attributes.                         
                                                                                    
General SMART Values:                                                               
Offline data collection status:  (0x82) Offline data collection activity            
          was completed without error.                                              
          Auto Offline Data Collection: Enabled.                                    
Self-test execution status:      (   0) The previous self-test routine completed 
          without error or no self-test has ever                                    
          been run.                                                                 
Total time to complete Offline          
data collection:    (    0) seconds.                                             
Offline data collection                                                          
capabilities:        (0x7b) SMART execute Offline immediate.                     
          Auto Offline data collection on/off support.                           
          Suspend Offline collection upon new                                    
          command.                                                               
          Offline surface scan supported.                                        
          Self-test supported.                                                   
          Conveyance Self-test supported.                                        
          Selective Self-test supported.                                         
SMART capabilities:            (0x0003) Saves SMART data before entering         
          power-saving mode.                                                     
          Supports SMART auto save timer.                                        
Error logging capability:        (0x01) Error logging supported.                 
          General Purpose Logging supported.                                     
Short self-test routine                                                          
recommended polling time:    (   2) minutes.                                     
Extended self-test routine                                                       
recommended polling time:    (  55) minutes.                                     
Conveyance self-test routine                                                     
recommended polling time:    (   3) minutes.                                     
SCT capabilities:          (0x103f) SCT Status supported.                        
          SCT Error Recovery Control supported.                                  
          SCT Feature Control supported.                                         
          SCT Data Table supported.                                              
                                                                                 
SMART Attributes Data Structure revision number: 10                              
Vendor Specific SMART Attributes with Thresholds:                          
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   110   099   006    Pre-fail  Always       -       26912400
  3 Spin_Up_Time            0x0003   099   099   085    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   098   098   020    Old_age   Always       -       2423
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   081   060   030    Pre-fail  Always       -       156062388
  9 Power_On_Hours          0x0032   065   065   000    Old_age   Always       -       31293
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1947
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   095   000    Old_age   Always       -       524
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   056   045   045    Old_age   Always   In_the_past 44 (Min/Max 23/45)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       305
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       3
193 Load_Cycle_Count        0x0032   001   001   000    Old_age   Always       -       556751
194 Temperature_Celsius     0x0022   044   055   000    Old_age   Always       -       44 (0 9 0 0 0)
195 Hardware_ECC_Recovered  0x001a   071   061   000    Old_age   Always       -       26912400
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       25230 (194 217 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       2142159597
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       2485972817
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0
                                                                                 
SMART Error Log Version: 1                                                       
No Errors Logged                                                                 
                                                                                 
SMART Self-test log structure revision number 1                                  
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     31293         -   
# 2  Short offline       Completed without error       00%     29700         -   
# 3  Conveyance offline  Completed without error       00%     29559         -   
# 4  Short offline       Completed without error       00%     29559         -   
# 5  Short offline       Completed without error       00%     29015         -   
# 6  Short offline       Completed without error       00%         0         -   
# 7  Short offline       Aborted by host               90%         0         -   
# hdparm -I                                                                      
/dev/sda:                                                                        
                                                                                 
ATA device, with non-removable media                                             
  Model Number:       ST9160314AS                                                
  Serial Number:      6VC5CYZ1                                                   
  Firmware Revision:  D005DEM1                                                   
  Transport:          Serial                                                     
Standards:                                                                       
  Used: unknown (minor revision code 0x0029)                                     
  Supported: 8 7 6 5                                                             
  Likely used: 8                                                                 
Configuration:                                                                   
  Logical   max current                                                          
  cylinders 16383 16383                                                          
  heads   16  16                                                                 
  sectors/track 63  63                                                           
  --                                                                             
  CHS current addressable sectors:   16514064                                    
  LBA    user addressable sectors:  268435455                                    
  LBA48  user addressable sectors:  312581808                                    
  Logical/Physical Sector size:           512 bytes                              
  device size with M = 1024*1024:      152627 MBytes                             
  device size with M = 1000*1000:      160041 MBytes (160 GB)                    
  cache/buffer size  = 8192 KBytes                                               
  Nominal Media Rotation Rate: 5400                                              
Capabilities:                                                                    
  LBA, IORDY(can be disabled)                                                    
  Queue depth: 32                                                                
  Standby timer values: spec'd by Standard, no device specific minimum           
  R/W multiple sector transfer: Max = 16  Current = 16                           
  Advanced power management level: 254                                           
  Recommended acoustic management value: 208, current value: 208                 
  DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6              
       Cycle time: min=120ns recommended=120ns                                   
  PIO: pio0 pio1 pio2 pio3 pio4                                                  
       Cycle time: no flow control=120ns  IORDY flow control=120ns               
Commands/features:                                                               
  Enabled Supported:                                                             
     *  SMART feature set                                                        
        Security Mode feature set                                                
     *  Power Management feature set                                             
     *  Write cache                                                              
     *  Look-ahead                                                               
     *  Host Protected Area feature set             
     *  WRITE_BUFFER command                                                     
     *  READ_BUFFER command                                                      
     *  NOP cmd                                                                  
     *  DOWNLOAD_MICROCODE                                                       
     *  Advanced Power Management feature set                                    
        SET_MAX security extension                                               
     *  Automatic Acoustic Management feature set                                
     *  48-bit Address feature set                                               
     *  Device Configuration Overlay feature set                                 
     *  Mandatory FLUSH_CACHE                                                    
     *  FLUSH_CACHE_EXT                                                          
     *  SMART error logging                                                      
     *  SMART self-test                                                          
     *  General Purpose Logging feature set                                      
     *  64-bit World wide name                                                   
     *  IDLE_IMMEDIATE with UNLOAD                                               
        Write-Read-Verify feature set                                            
     *  WRITE_UNCORRECTABLE_EXT command                                          
     *  {READ,WRITE}_DMA_EXT_GPL commands                                        
     *  Segmented DOWNLOAD_MICROCODE                                             
     *  Gen1 signaling speed (1.5Gb/s)                                           
     *  Gen2 signaling speed (3.0Gb/s)                                           
     *  Native Command Queueing (NCQ)                                            
     *  Host-initiated interface power management                                
     *  Phy event counters                                                       
     *  Idle-Unload when NCQ is active                                           
        Device-initiated interface power management                              
     *  Software settings preservation                                           
     *  SMART Command Transport (SCT) feature set                                
     *  SCT Read/Write Long (AC1), obsolete                                      
     *  SCT Write Same (AC2)                                                     
     *  SCT Error Recovery Control (AC3)                                         
     *  SCT Features Control (AC4)                                               
     *  SCT Data Tables (AC5)                
        unknown 206[12] (vendor specific)                                        
Security:                                                                        
  Master password revision code = 65534                                          
    supported                                                                    
  not enabled                                                                    
  not locked                                                                     
    frozen                                                                       
  not expired: security count                                                    
    supported: enhanced erase                                                    
  52min for SECURITY ERASE UNIT. 52min for ENHANCED SECURITY ERASE UNIT.         
Logical Unit WWN Device Identifier: 5000c5002795059e                             
  NAA   : 5                                                                      
  IEEE OUI  : 000c50                                                             
  Unique ID : 02795059e                                                          
 checksum: correct

Correct me if am wrong it looks similar to » kworker constantly using 15/20% of CPU since upgrade to 2.6.36-ARCH.
Otherwise what may cause this? Won't use the laptop if it's hammering the drive like a mad boy until I begin to get where that comes from. Also defeats battery life.

Last edited by kozaki (2016-04-26 12:56:18)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#2 2016-04-17 13:06:32

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] journald writing MB/sec logs on laptop

Following the five years old thread I rebooted with 'pcie_ports=native'; which kept  the writing and reading as above.
Booting with 'pcie_ports=compat'  seems to be slowing down the read/write logs *a bit*. But there are still 130-220 wakeups/sec  minimum in powertop - idle. Vs ~30 before. And these filling up logs:

 avril 17 14:55:03 gwenael kernel: kworker/u4:3(108): WRITE block 13779056 on dm-2 (8 sectors)
avril 17 14:55:03 gwenael kernel: systemd-journal(225): dirtied inode 395866 (system.journal) on dm-2
avril 17 14:55:06 gwenael kernel: Xorg(732): dirtied inode 16289 (?) on tmpfs
avril 17 14:55:09 gwenael kernel: jbd2/dm-2-8(196): WRITE block 8654224 on dm-2 (8 sectors)

Does someone having a similar issue? Or have seen it before?


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#3 2016-04-17 13:38:53

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

Re: [SOLVED] journald writing MB/sec logs on laptop

You seem to have something logging what seems to be some debug output on read/write. I would check any module/debug options you may have set somewhere.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2016-04-17 22:34:55

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] journald writing MB/sec logs on laptop

ROOKIE's totaly logic here. That'd be good news for my hardware.
I'll search. Since I used the kernels' default config, and it does the logging on both i686 kernels but not on x86_64, there are little points that I know to check.

EDIT: Thank you ROOKIE I found it:

/etc/sysctl.d/99-disks.conf
---vm.block_dump=1

I had confused vm.block_dump with the hdd spindown settings based on a misguiding page. One more on my 'worst sysadmin actions' smile

Last edited by kozaki (2016-04-26 12:55:58)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

Board footer

Powered by FluxBB