On 04/02/17 21:35, A. Schulze wrote:
if i will run Debian, Postfix + Dovecot on a VPS Machine what i
need about memeory that this application can run without any
Problem, 256Mb are not enough?

works as long you avoid antivirus snakeoil and perl based spam
filtering.

Totally agree with this, then MySQL (or PG) are the next big ram
killers. If one can work with SQLite then I have tested small 256Mb
containers with 3 domains plus php7.1-fpm and got it down to around
120Mb of RSS (real) ram usage at almost idle... with spam filtering
using dovecot-antispam and spamprobe...

       total    used    free  shared  buff/cache  available
Mem:  262144  116128  146016  215336           0     146016
Swap: 675836    5980  669856

~ ps -eo rss:10,vsz:10,cmd --sort=rss | tail

      7020     428928 /usr/sbin/opendkim -P [...]
      7192     373420 php-fpm: master process
      7500     145296 /usr/bin/perl -w /usr/sbin/mailgraph [...]
      7616     373828 php-fpm: pool domain1
      7684     373832 php-fpm: pool domain1
      7712     373884 php-fpm: pool domain2
      7804     373520 php-fpm: pool domain2
      7904     373520 php-fpm: pool domain3
      8124     374260 php-fpm: pool domain3
      8232     374752 php-fpm: pool domain3

Of course if the websites need Wordpress then MySQL is mandatory
but even then, with a bit of tuning and by not using innodb, 2 or
3 lightly used vhost domains could (just) run in 256Mb ram and
quite easily survive in 512Mb ram (ie; a DO droplet.)

In contrast a "full service" mailcow install requires 800Mb at the
very least and 1Gb with some usage. Clamav is the real ram killer.

        total    used    free  shared  buff/cache  available
Mem:  1014064  696476  148480    8916      169108     170016
Swap: 1048572  169648  878924

And these are the top 10 ram users according to ps...

      6088     393308 php-fpm: pool domain1
      7184      94532 dovecot/dict
      8028     395432 php-fpm: pool domain2
      8028     395464 php-fpm: pool domain3
      8812      85280 smtpd -t pass -u -o stress= -o [...]
     26544     620088 /usr/sbin/mysqld
    108120     207532 spamd child
    108124     207532 spamd child
    113140     207532 /usr/sbin/spamd -d [...]
    481504     777468 /usr/sbin/clamd --foreground=true

And to the above I'd say roughly add about 1Gb ram per 50 users for
a real world web/mail hosting service.


Reply via email to