Welcome! Log In Create A New Profile

Advanced

Re: Memory Pool

Valentin V. Bartenev
April 09, 2014 10:12AM
On Wednesday 09 April 2014 08:22:10 nginxsantos wrote:
> Thank you for the reply.
>
> I know it is simple. But, will we not get more performance benefit if we
> create the pools before hand. Say I will create a memory pool for the
> connections (for example say with 4000 entries). Everytime I need one, I
> will go and get it from that pool and when I free it, I will free that to
> the pool. Will not that be more efficient rather than for every connection
> and request going and allocating a pool.
>
> I always feel the run time malloc calls are bad and for every connection and
> request are expensive when we handle thousands of connections per seconds.
>
> Please share your thoughts....
>

I think performance benefits will be negligible. There are lightweight web
servers like Lighttpd that doesn't use memory pools and known to be pretty
fast.

Also note, that allocation of connection pool is just a one small allocation,
that nginx does during request processing among number of allocations of
various buffers.

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Memory Pool

nginxsantos April 09, 2014 04:55AM

Re: Memory Pool

nginxsantos April 09, 2014 05:45AM

Re: Memory Pool

Valentin V. Bartenev April 09, 2014 06:26AM

Re: Memory Pool

nginxsantos April 09, 2014 08:22AM

Re: Memory Pool

Valentin V. Bartenev April 09, 2014 10:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready