~ubuntu-branches/ubuntu/maverick/postfix/maverick-security

« back to all changes in this revision

Viewing changes to README_FILES/SCHEDULER_README

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, Wietse Venema, LaMont Jones
  • Date: 2009-06-03 14:17:08 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20090603141708-o9u59xlor7nmd2x1
[Wietse Venema]

* New upstream release: 2.6.2~rc1

[LaMont Jones]

* move postfix-add-{filter,policy} manpages to section 8, and deliver
* provide: default-mta on ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
algorithm are a) the option of less-than-1 positive feedback per delivery to
105
105
avoid overwhelming servers, b) the option of less-than-1 negative feedback per
106
106
delivery to avoid giving up too fast, c) feedback hysteresis to avoid rapid
107
 
oscillation, and c) a "reverse" hysteresis cycle for negative feedback, so that
 
107
oscillation, and d) a "reverse" hysteresis cycle for negative feedback, so that
108
108
it can correct for overload quickly.
109
109
 
110
110
SSuummmmaarryy ooff tthhee PPoossttffiixx 22..55 ""ddeeaadd ddeessttiinnaattiioonn"" ddeetteeccttiioonn aallggoorriitthhmm
178
178
            if (concurrency < 1)
179
179
                concurrency = 1
180
180
 
181
 
RReessuullttss ffoorr ddeelliivveerryy ttoo ccoonnccuurrrreennccyy lliimmiitteedd sseerrvveerrss
 
181
RReessuullttss ffoorr ddeelliivveerryy ttoo ccoonnccuurrrreennccyy--lliimmiitteedd sseerrvveerrss
182
182
 
183
183
Discussions about the concurrency scheduler redesign started early 2004, when
184
184
the primary goal was to find alternatives that did not exhibit exponential
296
296
 
297
297
IImmppaacctt ooff aaccttiivvee sseerrvveerr ccoonnccuurrrreennccyy lliimmiitteerr
298
298
 
299
 
The final concurrency limited result shows what happens when SMTP connections
 
299
The final concurrency-limited result shows what happens when SMTP connections
300
300
don't time out, but are rejected immediately with the Postfix server's
301
301
smtpd_client_connection_count_limit feature (the server replies with a 421
302
302
status and disconnects immediately). Similar results can be expected with
333
333
    variants, the defer rate decreases with increasing concurrency. See text
334
334
    for a discussion of results.
335
335
 
336
 
DDiissccuussssiioonn ooff ccoonnccuurrrreennccyy lliimmiitteedd sseerrvveerr rreessuullttss
 
336
DDiissccuussssiioonn ooff ccoonnccuurrrreennccyy--lliimmiitteedd sseerrvveerr rreessuullttss
337
337
 
338
338
All results in the previous sections are based on the first delivery runs only;
339
339
they do not include any second etc. delivery attempts. It's also worth noting
479
479
  * The structures used by nqmgr
480
480
  * What happens when nqmgr picks up the message - how it is assigned to
481
481
    transports, jobs, peers, entries
482
 
  * How does the entry selection work
483
 
  * How does the preemption work - what messages may be preempted and how and
484
 
    what messages are chosen to preempt them
 
482
  * How the entry selection works
 
483
  * How the preemption works - what messages may be preempted and how and what
 
484
    messages are chosen to preempt them
485
485
  * How destination concurrency limits affect the scheduling algorithm
486
486
  * Dealing with memory resource limits
487
487
 
571
571
couple of messages was picked up, what is the relation between all those job,
572
572
peer, queue and entry structures.]
573
573
 
574
 
HHooww ddooeess tthhee eennttrryy sseelleeccttiioonn wwoorrkk
 
574
HHooww tthhee eennttrryy sseelleeccttiioonn wwoorrkkss
575
575
 
576
576
Having prepared all those above mentioned structures, the task of the nqmgr's
577
577
scheduler is to choose the recipient entries one at a time and pass them to the
605
605
except for the preemption, under ideal conditions - that is, no recipient
606
606
resource limits and no destination concurrency problems.]
607
607
 
608
 
HHooww ddooeess tthhee pprreeeemmppttiioonn wwoorrkk
 
608
HHooww tthhee pprreeeemmppttiioonn wwoorrkkss
609
609
 
610
610
As you might perhaps expect by now, the transport's job list does not remain
611
611
sorted by the job's message enqueue time all the time. The most cool thing
698
698
default_delivery_slot_cost parameter which is set to 5 by default. This is the
699
699
k from the paragraph above. Each time k entries of the job are selected for
700
700
delivery, this counter is incremented by one. Once there are some slots
701
 
accumulated, job which requires no more than that amount of slots to be fully
 
701
accumulated, job which requires no more than that number of slots to be fully
702
702
delivered can preempt this job.
703
703
 
704
704
[Well, the truth is, the counter is incremented every time an entry is selected
722
722
already used some when it was preempted before (remember a job can be preempted
723
723
several times). In either case, we know how many are accumulated and how many
724
724
are left to deliver, so we know how many it may yet accumulate at maximum.
725
 
Every other job which may be delivered by less than that amount of slots is a
 
725
Every other job which may be delivered by less than that number of slots is a
726
726
valid candidate for preemption. How do we choose among them?
727
727
 
728
728
The answer is - the one with maximum enqueue_time/recipient_entry_count. That
734
734
 
735
735
Now let's recap the previous two paragraphs. Isn't it too complicated? Why
736
736
don't the candidates come only among the jobs which can be delivered within the
737
 
amount of slots the current job already accumulated? Why do we need to estimate
 
737
number of slots the current job already accumulated? Why do we need to estimate
738
738
how much it has yet to accumulate? If you found out the answer, congratulate
739
739
yourself. If we did it this simple way, we would always choose the candidate
740
740
with least recipient entries. If there were enough single recipient mails
775
775
and transport_delivery_slot_loan come from (they default to
776
776
default_delivery_slot_discount and default_delivery_slot_loan, whose values are
777
777
by default 50 and 3, respectively). The discount (resp. loan) specifies how
778
 
many percent (resp. how many slots) one "gets in advance", when the amount of
779
 
slots required to deliver the best candidate is compared with the amount of
 
778
many percent (resp. how many slots) one "gets in advance", when the number of
 
779
slots required to deliver the best candidate is compared with the number of
780
780
slots the current slot had accumulated so far.
781
781
 
782
782
And it pretty much concludes this chapter.