Loading ...
Sorry, an error occurred while loading the content.

Proxymap tunning

Expand Messages
  • Luciana Moreira
    Hello guys, I am working on tunning our postfix server which is already much faster dues to the great input I got in this list :) I now have to configure our
    Message 1 of 5 , Jul 1, 2010
    • 0 Attachment
      Hello guys,

      I am working on tunning our postfix server which is already much faster
      dues to the great input I got in this list :)

      I now have to configure our proxymap to have the number of processes
      equal to the maximum required during a burst situation. My question is:
      could any of these functions bellow happen in parallel?

      On smtpd process
      * -o smtpd_sender_restrictions=check_sender_access,proxy:mysql: ...

      On cleanup process
      * -o header_checks=proxy:mysql: ...

      On main.cf
      * smtpd_sender_login_maps = proxy:mysql:...

      From what I read on the documentation bellow, the cleanup process would
      start after the smtpd process, so I believe there should be no parallel
      processign happening there. Nevertheless, I could not find information
      on the smtpd_sender_login_maps and smtpd_sender_restrictions that could
      give me indications if they are processed sequentially or in parallel.

      http://www.postfix.org/OVERVIEW.html

      Any ideas?

      Luciana
    • Victor Duchovni
      ... The cleanup and SMTP servers can work in parallel. If mysql is slow, make sure your tables are properly indexed, and queries are not so complex that they
      Message 2 of 5 , Jul 1, 2010
      • 0 Attachment
        On Thu, Jul 01, 2010 at 10:12:38AM +0200, Luciana Moreira wrote:

        > Hello guys,
        >
        > I am working on tunning our postfix server which is already much faster
        > dues to the great input I got in this list :)
        >
        > I now have to configure our proxymap to have the number of processes equal
        > to the maximum required during a burst situation. My question is: could any
        > of these functions bellow happen in parallel?

        The cleanup and SMTP servers can work in parallel. If mysql is slow,
        make sure your tables are properly indexed, and queries are not so
        complex that they can only be resolved via a "table scan".

        If you need to tune proxymap, something else is wrong, and you should
        fix that.

        --
        Viktor.
      • Luciana Moreira
        ... Is this also true for one single message? I know the cleanup server can process messages while smtpd is executing other tasks. But I expected the flow of a
        Message 3 of 5 , Jul 1, 2010
        • 0 Attachment
          Victor Duchovni wrote:
          > On Thu, Jul 01, 2010 at 10:12:38AM +0200, Luciana Moreira wrote:
          >
          >
          >> Hello guys,
          >>
          >> I am working on tunning our postfix server which is already much faster
          >> dues to the great input I got in this list :)
          >>
          >> I now have to configure our proxymap to have the number of processes equal
          >> to the maximum required during a burst situation. My question is: could any
          >> of these functions bellow happen in parallel?
          >>
          >
          > The cleanup and SMTP servers can work in parallel. If mysql is slow,
          > make sure your tables are properly indexed, and queries are not so
          > complex that they can only be resolved via a "table scan".
          >
          Is this also true for one single message?

          I know the cleanup server can process messages while smtpd is executing
          other tasks. But I expected the flow of a single message to be smtpd and
          then cleanup, i.e. for the same message we would not have parallel
          requests to cleanup and sender checks.

          Could you please confirm that?

          btw, mysql is not slow, it is just that we would like to avoid wasted
          memory allocation for processes that will be _always_ sitting there
          doing nothing since there are more processes assigned than actually needed.

          Another question also in regard to proxymap tuning: If I define less
          proxymap processes than what may be needed in a certain time period,
          will the postfix scheduler hold the request until a process is available
          or will there be an error returned to the function using mysql?

          Regards,
          Luciana
          > If you need to tune proxymap, something else is wrong, and you should
          > fix that.
          >
          >
        • Victor Duchovni
          ... This naive view is inaccurate. ... You are misdirecting your efforts, and probably doing more harm than good. The operating system does a good job of
          Message 4 of 5 , Jul 1, 2010
          • 0 Attachment
            On Thu, Jul 01, 2010 at 12:39:22PM +0200, Luciana Moreira wrote:

            >> The cleanup and SMTP servers can work in parallel. If mysql is slow,
            >> make sure your tables are properly indexed, and queries are not so
            >> complex that they can only be resolved via a "table scan".
            >>
            > Is this also true for one single message?
            >
            > I know the cleanup server can process messages while smtpd is executing
            > other tasks. But I expected the flow of a single message to be smtpd and
            > then cleanup, i.e. for the same message we would not have parallel requests
            > to cleanup and sender checks.

            This naive view is inaccurate.

            > btw, mysql is not slow, it is just that we would like to avoid wasted
            > memory allocation for processes that will be _always_ sitting there doing
            > nothing since there are more processes assigned than actually needed.

            You are misdirecting your efforts, and probably doing more harm than good.
            The operating system does a good job of managing idle memory pages, and
            the process count is small enough that you'd need extremely old hardware
            for this to be an issue.

            > Another question also in regard to proxymap tuning: If I define less
            > proxymap processes than what may be needed in a certain time period, will
            > the postfix scheduler hold the request until a process is available or will
            > there be an error returned to the function using mysql?

            Don't tune proxymap, it does not need tuning.

            --
            Viktor.
          • Luciana Moreira
            Thx a lot for the reply Victor, it clarified some of my doubts. From your response to my last question I am assuming the scheduler handles the proxymap process
            Message 5 of 5 , Jul 1, 2010
            • 0 Attachment
              Thx a lot for the reply Victor, it clarified some of my doubts.

              From your response to my last question I am assuming the scheduler
              handles the proxymap process allocation and I don't need to care about
              possible errors.

              Just to clarify, you recommend to "not tune proxymap". Our system
              requirement is to always have at least 1 proxymap process ready for use
              at any given time. This means:

              1) That I would leave the default value there (100).

              2) 3 functions may need proxymap in parallel for each message

              3) Postfix would be able to handle ~33 messages in parallel (respecting
              our requirement)

              4) We would define 33 smtpd processes

              5) Defining more smtpd processes will not result in an error but will
              not respect our system requirement. Defining less smtpd processes is
              definitely a "waste" of proxymaps (even though OS can handle it).

              Did I understand your valuable input right? :)

              Why do you believe I would be possible causing harm to the system, is
              there some side effect to the changes I am making which I am unaware of?

              Regards,
              Luciana

              Victor Duchovni wrote:
              > On Thu, Jul 01, 2010 at 12:39:22PM +0200, Luciana Moreira wrote:
              >
              >
              >>> The cleanup and SMTP servers can work in parallel. If mysql is slow,
              >>> make sure your tables are properly indexed, and queries are not so
              >>> complex that they can only be resolved via a "table scan".
              >>>
              >>>
              >> Is this also true for one single message?
              >>
              >> I know the cleanup server can process messages while smtpd is executing
              >> other tasks. But I expected the flow of a single message to be smtpd and
              >> then cleanup, i.e. for the same message we would not have parallel requests
              >> to cleanup and sender checks.
              >>
              >
              > This naive view is inaccurate.
              >
              >
              >> btw, mysql is not slow, it is just that we would like to avoid wasted
              >> memory allocation for processes that will be _always_ sitting there doing
              >> nothing since there are more processes assigned than actually needed.
              >>
              >
              > You are misdirecting your efforts, and probably doing more harm than good.
              > The operating system does a good job of managing idle memory pages, and
              > the process count is small enough that you'd need extremely old hardware
              > for this to be an issue.
              >
              >
              >> Another question also in regard to proxymap tuning: If I define less
              >> proxymap processes than what may be needed in a certain time period, will
              >> the postfix scheduler hold the request until a process is available or will
              >> there be an error returned to the function using mysql?
              >>
              >
              > Don't tune proxymap, it does not need tuning.
              >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.