web-yogini has asked for the wisdom of the Perl Monks concerning the following question:

Brethren,

This one currently moderates a list of about 20k email users, and once a night a reminder is sent out to about 1k of them. The email system is based on mySQL and the machine while dual 800's and a gig of ram, still goes on it's knees while sending these reminders. I can only hope it's in prayer.

In an attempt to slow this process of banging out the mails, then to sendmail thru procmail to the mail code, I tried Mail:Mailer to send thru a seperate mailserver on the network. This has appeared to drop the server load a bit, and I am only losing about .05% of the mail. I would like to not lose a single one, as I believe we should all aim towards perfection.

So, I am curious of a nice little pause routine I could place in the code that would give the server a bit more breathing room before writes.

Any suggestions for this helpless seeker?

Sad Gurunath Maharaj ki jai!

Replies are listed 'Best First'.
Re: Pausing while using Mail:Mailer
by grinder (Bishop) on Oct 09, 2001 at 18:20 UTC

    The idea of writing a pause routine to give the server breathing room is laudable, but ultimately pointless.

    You should be *happy* that the server is working solidly, hammering out those messages. It's not going to "suffer" if the run queue is full for a couple of hours.

    On the other hand, if other people want to use the server at the same time with reasonable performance, then your mail reminder program should be run at a nice priority.

    If your local MTA is sendmail, I would strongly recommend using a drop-in replacement with better performance (postfix springs to mind). To tell the truth, banging out 1000 emails doesn't strike as a particularly big deal. If you were sending out 100k messages, that might be cause for concern.

    --
    g r i n d e r