| Summary: | `noatime' should be discouraged on /var as well | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | gene <gene> |
| Component: | Books & Articles | Assignee: | freebsd-doc (Nobody) <doc> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
gene
2001-09-19 22:50:00 UTC
A quick grep -Ri "atime" /usr/src/contrib/sendmail/ shows that sendmail does not use file atime's for any operations. Mail program often use *modification timestamps* (mtime), which is not changed by the noatime option. Generally speaking, mtime is updated every time a file's contents is changed, atime is changed whenever a file is accessed. If my memory serves me correctly, postfix does not make use of atime either--I safely run a postfix server with noatime enabled on /var. - chern Chern,
Your observation is correct. Sendmail does not explicitly manipulate
the mtime nor the atime.
What happens is, when sendmail has something to deliver to a mailbox, it
just opens the mailbox file as write-only. This operation updates only
the mtime of the mailbox, and its atime is preserved. Result: the
mailbox now has an mtime more recent than its atime, which is the
indication of new mail.
See also tcsh(1), under the description of `mail' variable.
Regards,
Eugene
A mail-reader resets that condition by reading from the mailbox.
On Wed, Sep 19, 2001 at 05:52:32PM -0700, Chern Lee wrote:
> A quick grep -Ri "atime" /usr/src/contrib/sendmail/ shows that sendmail
> does not use file atime's for any operations. Mail program often use
> *modification timestamps* (mtime), which is not changed by the noatime
> option.
>
> Generally speaking, mtime is updated every time a file's contents is
> changed, atime is changed whenever a file is accessed.
>
> If my memory serves me correctly, postfix does not make use of atime
> either--I safely run a postfix server with noatime enabled on /var.
>
> - chern
>
>
.. So, can someone provide an example sentence or two that they would
like to add to tuning(7)? A diff would be even better.
- Murray
State Changed From-To: open->feedback Awaiting updated text from the originator. State Changed From-To: feedback->closed Thanks, Giorgos' patch was applied with minor modifications. |