Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Overloaded mail spool causing memory instability?
- Date: Sat, 18 Aug 2007 21:22:59 +0900 (JST)
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] Overloaded mail spool causing memory instability?
- References: <46C695D2.2030402@articlass.org> <87fy2h2t4z.fsf@uwakimon.sk.tsukuba.ac.jp>
On Sat, 18 Aug 2007, Stephen J. Turnbull wrote:
Thus, opening a file for append takes a millisecond at most, and only a few KB of memory, mostly for buffers.
Assuming it does append that way. Which I'm guessing is the case, but if there were a local delivery agent using uwimap or something like that, it could well be different. (For example, there might be some sort of check to see what the format of the mail file is.)
By the way, if you don't need to preserve the spam, just stop the mail server (typically with something like "sudo /etc/init.d/exim stop"), rm the file, and restart the mail server. If during those ten seconds a mail is presented for delivery (to any mailbox), you'll have to wait an about extra 15 minutes for it, until the remote MTA retries.
If you do want to preserve the spam, use mv to rename the file.
Why stop the server for rm but not mv? Both have the same effect on the source directory entry. If mv is fine without stopping, rm ought to be as well. After all, rm does an unlink on the original name, mv makes a hard link before doing an unlink on the original name (unless you're moving the file to a different filesystem).
(Note, I'm assuming FFS or one of its lookalikes (ext2fs, posixy-things, whatever) here.)
Both rm and rename are millisecond operations.
In fact, the time doesn't matter, because they are both atomic. At worst, a few extra e-mail messages are appended to the file after it's deleted but before the disk storage space is freed, for which we're quite heiki in this situation.
cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] Overloaded mail spool causing memory instability?
- From: Stephen J. Turnbull
- References:
- [tlug] Overloaded mail spool causing memory instability?
- From: Dave M G
- [tlug] Overloaded mail spool causing memory instability?
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: RE: [tlug] Re: [CoLoCo] RESPECT MICROSOFT
- Next by Date: RE: [tlug] Re: [CoLoCo] RESPECT MICROSOFT
- Previous by thread: [tlug] Overloaded mail spool causing memory instability?
- Next by thread: Re: [tlug] Overloaded mail spool causing memory instability?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links