lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 1 Jan 2009 14:18:26 -0500
From:	Dave Johnson <dave-lkml-01@...terclick.org>
To:	Bart Samwel <bart@...wel.tk>
Cc:	linux-kernel@...r.kernel.org, linux-ext4@...r.kernel.org
Subject: Re: [ext3] kjournald writing after each read despite noatime,commit=nnn

Bart Samwel writes:
> This looks like it's a generic property of syncing an ext3 file system.
> Try turning off laptop_mode and then running "sync". You will probably
> see the same behaviour.

yep, every sync() causes a gratuitous write to disk N seconds later
even when no data has been read or written since the last sync().

$ while sleep 5; do sync; done
^C
$ 

Jan  1 14:09:31 gw kernel: kjournald(760): WRITE block 2662 on hda1 
Jan  1 14:09:36 gw kernel: kjournald(760): WRITE block 2664 on hda1 
Jan  1 14:09:42 gw kernel: kjournald(760): WRITE block 2666 on hda1 
Jan  1 14:09:47 gw kernel: kjournald(760): WRITE block 2668 on hda1 
Jan  1 14:09:52 gw kernel: kjournald(760): WRITE block 2670 on hda1 

> > Note, the reason I ask is this is a SSD so just because a physical
> > read has taken place recently unneeded writes should be avoided.
> > 
> > Turning laptop_mode to 0, but leaving other settings the same
> > resolves the uneeded write:
> 
> For your SSD I guess you need to get rid of the
> sync-after-disk-activity, but keep the other VM behaviours of
> laptop_mode (such as avoiding swapping out pages / writing back dirty
> pages in order to free memory as long as it is also possible to just
> drop pages that are not dirty).
> 
> You can probably achieve this by:
> - having a large commit interval etc., like you have now
> - setting laptop_mode to a very large value, e.g. a couple of hours.
> That will trigger a sync if and only if there has been *no* disk
> activity at all for hours on end -- i.e., pretty much never. And the
> other write-reducing VM features of laptop_mode will still be enabled.
> 
> It would perhaps be a good thing to split these mechanisms into separate
> knobs. Write batching (the sync-after-disk-activity stuff and also the
> dirty_ratio / dirty_background_ratio changes) are a completely separate
> mechanism from write avoidance (the other mechanism I mentioned).

I'm going to run without laptop mode for a while to see how this
goes.  This system is a small router/firewall with most writes going
to a tmpfs so the number of writes to the ext3 fs is only a few a
month (provided no one logs into the system to do a config change).

Thanks for the help.

-- 
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists