Re: Optimizing nginx mail proxy

2018-02-21 Thread Azusa Taroura
Hello!

The "request" means  send mail request on the SMTP/SMTPS connection.
The "performance result" means the speed per minutes for the mail sending.

So you're right about the following point.

> Most critical parts from 
> performance point of view are your auth_http backend and your SMTP 
> backend.

I understand that worker_connections and ssl_session_cache are seems to be
useful as the performance of mail.
 Thank you for your answer:)


Maxim Dounin Wrote:
---
> Hello!
> 
> On Tue, Feb 20, 2018 at 02:56:40AM -0500, Azusa Taroura wrote:
> 
> > I’m trying to optimize mail-proxy. 
> > My performance test is 1 client sends many request to 1 nginx
> server.
> 
> [...]
> 
> > Low cpu usage, but the performance result is not good.
> > Do yoy know how to take full advantage of nginx?
> 
> It is not clear what do you mean by "request", as there are no 
> requests in SMTP, and what do you mean by "performance result".
> 
> In general, there is no need to optimize anything in nginx mail 
> proxy except very basic things like worker_connections and 
> ssl_session_cache if you use SSL.  Most critical parts from 
> performance point of view are your auth_http backend and your SMTP 
> backend.
> 
> -- 
> Maxim Dounin
> http://mdounin.ru/
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,278656,278695#msg-278695

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Optimizing nginx mail proxy

2018-02-21 Thread Azusa Taroura
Thank you for your reply!

I would like to authenticate each connection. 
If I use Postfix for mail proxy, it authenticates each e-mail not for each
connection.


alexsamad Wrote:
---
> Silly question why not use postfix for this ?
> 
> 
> On 20 February 2018 at 18:56, Azusa Taroura
> 
> wrote:
> 
> > Hi everyone,
> >
> > I’m trying to optimize mail-proxy.
> > My performance test is 1 client sends many request to 1 nginx
> server.
> >
> >
> > This is my current settings:
> >
> > worker_processes auto;
> > worker_rlimit_nofile  10;
> >
> > #error_log  /var/log/nginx/error.log debug;
> > #error_log  /var/log/nginx/error.log warn;
> > error_log /var/log/nginx/error.log crit;
> > events {
> >   worker_connections 1024;
> >   #worker_connections 4000;
> >   #multi_accept on;
> >   #use epoll;
> > }
> >
> > mail {
> >   auth_http localhost:80/auth/smtp;
> >   proxy_pass_error_message on;
> >   proxy on;
> >   smtp_auth login plain;
> >   xclient   on;
> >   server {
> >   listen25;
> >   protocol  smtp;
> >   }
> >   server {
> >   listen465;
> >   protocol  smtp;
> >   ssl   on;
> >   ssl_certificate  /etc/nginx/ssl/server.crt;
> >   ssl_certificate_key  /etc/nginx/ssl/server.key;
> >
> >   ssl_session_cache shared:SSL:20m;
> >   ssl_session_timeout 180m;
> >
> >   #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
> >   #ssl_prefer_server_ciphers on;
> >   #ssl_ciphers
> > ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
> >   #ssl_dhparam /etc/nginx/cert/dhparam.pem;
> >   #ssl_stapling on;
> >   #ssl_stapling_verify on;
> >   #ssl_trusted_certificate /etc/nginx/cert/trustchain.crt;
> >   #resolver 8.8.8.8 8.8.4.4;
> >   }
> > }
> >
> >
> > Question>>
> > Low cpu usage, but the performance result is not good.
> > Do yoy know how to take full advantage of nginx?
> >
> > Thank you for your time.
> > Azusa Taroura
> >
> > Posted at Nginx Forum: https://forum.nginx.org/read.
> > php?2,278656,278656#msg-278656
> >
> > ___
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,278656,278694#msg-278694

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Optimizing nginx mail proxy

2018-02-20 Thread Maxim Dounin
Hello!

On Tue, Feb 20, 2018 at 02:56:40AM -0500, Azusa Taroura wrote:

> I’m trying to optimize mail-proxy. 
> My performance test is 1 client sends many request to 1 nginx server.

[...]

> Low cpu usage, but the performance result is not good.
> Do yoy know how to take full advantage of nginx?

It is not clear what do you mean by "request", as there are no 
requests in SMTP, and what do you mean by "performance result".

In general, there is no need to optimize anything in nginx mail 
proxy except very basic things like worker_connections and 
ssl_session_cache if you use SSL.  Most critical parts from 
performance point of view are your auth_http backend and your SMTP 
backend.

-- 
Maxim Dounin
http://mdounin.ru/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Optimizing nginx mail proxy

2018-02-20 Thread Alex Samad
Silly question why not use postfix for this ?


On 20 February 2018 at 18:56, Azusa Taroura 
wrote:

> Hi everyone,
>
> I’m trying to optimize mail-proxy.
> My performance test is 1 client sends many request to 1 nginx server.
>
>
> This is my current settings:
>
> worker_processes auto;
> worker_rlimit_nofile  10;
>
> #error_log  /var/log/nginx/error.log debug;
> #error_log  /var/log/nginx/error.log warn;
> error_log /var/log/nginx/error.log crit;
> events {
>   worker_connections 1024;
>   #worker_connections 4000;
>   #multi_accept on;
>   #use epoll;
> }
>
> mail {
>   auth_http localhost:80/auth/smtp;
>   proxy_pass_error_message on;
>   proxy on;
>   smtp_auth login plain;
>   xclient   on;
>   server {
>   listen25;
>   protocol  smtp;
>   }
>   server {
>   listen465;
>   protocol  smtp;
>   ssl   on;
>   ssl_certificate  /etc/nginx/ssl/server.crt;
>   ssl_certificate_key  /etc/nginx/ssl/server.key;
>
>   ssl_session_cache shared:SSL:20m;
>   ssl_session_timeout 180m;
>
>   #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
>   #ssl_prefer_server_ciphers on;
>   #ssl_ciphers
> ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DHE+AES128:!ADH:!AECDH:!MD5;
>   #ssl_dhparam /etc/nginx/cert/dhparam.pem;
>   #ssl_stapling on;
>   #ssl_stapling_verify on;
>   #ssl_trusted_certificate /etc/nginx/cert/trustchain.crt;
>   #resolver 8.8.8.8 8.8.4.4;
>   }
> }
>
>
> Question>>
> Low cpu usage, but the performance result is not good.
> Do yoy know how to take full advantage of nginx?
>
> Thank you for your time.
> Azusa Taroura
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,278656,278656#msg-278656
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx