This problem of todo had created a havoc with my site and qmail was unable
to cope up with the volume of incoming mails which my site was getting. In
fact
I had starting cursing the design of the todo processing. But with a slight
change to qmail-queue I have managed to get the queue (both
remote and local to zeror). I have done the following

Created 5 instances of qmail (by changing conf-qmail and compiling)
1 (/var/qmail, /var/qmail2, /var/qmail3, /var/qmail4, /var/qmail5)
2 linked the control, alias and users directory of /var/qmail2, /var/qmail3,
   /var/qmail4, /var/qmail5
   to /var/qmail/control, /var/qmail/alias, /var/qmail/users.
   By doing this I have to change configuration only in /var/qmail
3. Created directory /usr/qmail/bin, /usr/qmail2/bin, /usr/qmail3/bin, etc
4. Moved the original qmail-queue from /var/qmail/bin to /usr/qmail/bin
    and similarly for all the other qmail installations
5. Wrote the following qmail-queue program in /var/qmail/bin,
/var/qmail2/bin
    /var/qmail3/bin, /var/qmail4/bin, /var/qmail5/bin and started 5
instances
   of qmail-deliver (qmail-send). qmail-smtp now can be run from any
   one of the 5 instances

listing of qmail-queue.c wrapper
#include <sys/param.h>
main(int argc, char **argv)
{
    int              tmval;
    char             path[MAXPATHLEN];
    char            *qmail_queue[] = { "/usr/qmail", "/usr/qmail2",
"/usr/qmail3",
                                                     "/usr/qmail4",
"/usr/qmail5"};

     tmval = time(0) % 5;
    sprintf(path, "%s/bin/qmail-queue", qmail_queue[tmval]);
    /*- printf("%s\n", path); -*/
    execv(path, argv);
}

The above program depending on the time distributes the queue across the
five queues. Thus even with each qmail instance giving me a low concurrency,
I am achieving high concurrency by running 5 instances of qmail



----- Original Message -----
From: Peter van Dijk <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 28, 2001 6:04 PM
Subject: Re: qmail-send progress with large queue/todo


> On Wed, Feb 28, 2001 at 01:50:36AM -0700, Sean Reifschneider wrote:
> > On Tue, Feb 27, 2001 at 02:13:47PM -0600, Bruce Guenter wrote:
> > >I've been thinking about this issue, and was wondering if it would be
> > >possible to fix this in some simple way.  Would it be possible to
modify
> >
> > If one has big-todo, is there any point in spending so much time
> > working the todo?  Switching the priority so that todo isn't processed
> > until the loop runs without starting any qmail-remotes (meaning
> > we're either at concurrency, or we have no more messages to deal with).
>
> With or without big-todo, you risk ending up with a f*cking big todo
> queue after that. Switching off todo-handling for a while,
> automatically, sounds like a *very* bad idea to me.
>
> Greetz, Peter.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Reply via email to