Re: MUA's, Maildir and folder formats

2000-01-12 Thread Scott Lystig Fritchie

 "s" == Sam  [EMAIL PROTECTED] writes:

s On Wed, 12 Jan 2000, Len Budney wrote:
 For asynchrony, maildir rules the world. But uses space and inodes,
 and scans slowly.

s Perhaps that's true on some some platform that uses a substandard
s filesystem.  The default allocation of the Linux ext2 filesystem
s suits Maildirs just fine.  And I can't wait to see what ext3 will
s do...

The default policy for ext2 is to perform directory updates
asynchronously.  That's great for performance, but not so great if
you're concerned about file loss in an ugly crash.  I have no idea how
close that ext3's performance, with its log enabled, will come to
ext2's async behavior.

-Scott
---
Scott Lystig Fritchie
Professional Governing: Is It Faked?



Re: Denial of service process table attacks

1999-02-23 Thread Scott Lystig Fritchie

 "md" == Mark Delany [EMAIL PROTECTED] writes:

md Whilst some inetd implementations have crude forms of DOS
md protection (initially created for other reasons) I'm not aware of
md too many that protect against concurrency - most do it by rate.

Heh.  If I may take a slight detour to tell an inetd-related war
story, even if it isn't directly qmail-related

In a former life, I was the sysadmin for a cable-based ISP in the US.
One customer was in the middle of transitioning email services from
machines they ran to our machines.  Their boxes were using an older
Red Hat distribution and were using Sendmail + the Qualcomm POP
daemon.  I avoided working on those machines (they weren't really
mine), but the transition wasn't going fast enough ... so I had to
grease the squeaky wheel.

In the evenings, the POP service would become unavailable due to
inetd's rate-limiting.  Spending as little time as possible to "fix"
the problem, I had a cron job check the POP service every minute and
SIGHUP inetd every time it was unavailable.  But during the busy
evening times, the SIGHUPs were remarkably frequent.  Oh, 40-50
times/hour, with 5-minute load averages rising into the teens.

Trying another quick fix, I simply dropped qmail's tcpserver in place
of inetd for starting the POP server.  I set the session limit at 60.
This killed the machine performance-wise.  Thrash-O-Matic.  Unlike
before, when the machine started thrashing now, it was pretty obvious
that syslog was a huge problem.

I finally discovered that syslogd was the cause.  As syslog was
logging events from Sendmail and the POP daemon's login/logout events,
it used fsync() after each event.  The disk couldn't keep up during
busy times, so openlog() calls started blocking ... causing load
averages to rise, delays in SMTP and POP server initial greetings, POP
client retries making things worse.  Until the inetd throttle kicked
in.  Then enough syslog could finally catch up, the number of blocked
processes dropped, and life returned to (near) normal.  Then my cron
job would HUP inetd, and the cycle repeated.  When I started using
tcpserver, things went to hell because there was no emergency escape
valve (namely that !@#$! inetd) to keep syslog from getting too busy.

I recompiled syslogd without the fsync() call, and the system gently
purred through the busiest times thereafter.

A lot of people don't know about inetd's throttle mechanism.  I didn't
know there were any modern UNIXen which still used it.  Live and
learn.

-Scott
---
Scott Lystig Fritchie
5401 - 10th Ave S, Minneapolis, MN 55417 USA
Professional Governing: Is It Faked?