Viktor, Thanks for the excellent write-up:
> > My question is if there is general impact that every new > > Postfix instance has? Assuming that the volume of mail > > would be handled on the same server one way or another, > > what kind of impact does it have to run one postfix instance > > on each IP address? Too many unnecessarily duplicated > > processes running? Is it eating more CPU than necessary? > > How about memory? > > > The extra costs are: > > * One lightweight master(8) process per instance. > This is a tiny fraction of the other costs. > > * One pickup(8) daemon that scans a maildir queue > once a minute. This is optional. Just set > authorized_submit_users empty, and comment out > pickup in master.cf. Good tip. This is locally (/usr/sbin/sendmail) submitted mail right? Only one of our instances needs to handle that. > * Finally, you end up with a lot more concurrent smtpd(8) > inbound listener processes and smtp(8) outbound delivery > agents. The impact of hundreds of processes competing for > the CPU and network is perhaps negative beyond a certain > point. What you lose with multiple instances is the > ability to scale any one traffic flow to reasonably > high concurrency, while others are "idle", without > paying the cost of peak concurrency for all flows. I don't follow last sentence. Dont the smtp(d) processes go away when an instance is idle? Given the following I guess you just mean that if some are idle it might work nice even with one busy instance tuned up for high process concurrency but if all instances are like that and become busy, it could be a disaster. ? So with a few instances expected to become moderately busy on moderate hardware, we might be alright. But if we plan to have 10-15 domains and IF they all might start to see moderate to heavy traffic, the price to pay just for having separate "personalities" might be too much? Or do people just throw hardware at it when it gets to that point? Is it overkill to go 10-20 multiple instances vs. single instance with: - one submission per IP - one smtp bound to each IP Isnt the second part there half of the problem you described? I mean, if I add a smtp line in master.cf for each IP isnt that going to generate same number of smtp processes as with multiple instances? You would save on shared smtpd though I think. Maybe a middle ground. OTOH the only real important point is client-facing SSL to match each domain name for submission so the most prudent answer is probably single instance with multiple submission ONLY. > So the main concern is what if each instance finds high demand, > and you're running 100s of smtpd/smtp processes for each instance. > > There is no global coordination between the various master processes, > to impose a global limit on the number of smtpd(8) processes. > > Think of multiple instances as a cheaper than lots of VMs solution. > If the hardware/network/CPU can support N VMs, it can probably > support at least N Postfix instances in a single (possibly bare-metal) > OS. Unless the network is saturated, that "N" may be higher by > some factor of 2 or more for multiple instances over multiple VMs. Side note dovecot seems to handle multiple certs for each IP by assinging the cert/key settings on a per IP basis (also per protocol if you want) so no worrying about have to start up more processes for handling separate certs on separate IPs. Downside must be no ability to tune one of the IPs/domains separately at least without hacking up two dovecot installs.
