On 2013/7/24 13:42, Willy Tarreau wrote:
I agree and can confirm your results here. Also, if I replace the
calloc with a malloc, I still see mmap and we don't have the 300M
RSS anymore :
willy@pcw:~$ ps auxw|grep a.out
willy 31956 0.0 0.0 2880 632 pts/4 S+ 07:36 0:00 strace ./a.out
willy 31957 0.0 0.0 308764 320 pts/4 S+ 07:36 0:00 ./a.out
So... it's becoming increasingly likely that we have a bug in haproxy
or at least that we're overlooking something. That said I don't see
what the issue could be considering that we're initializing fdinfo and
fdtab with a calloc() just at one place. There's not even a realloc().
Best regards,
Willy
Yes, it is a strange behavior of haproxy as calloc is not replaced yet.
There is also another test I have done in haproxy-1.5-dev7:
#ps axuw|grep haproxy
root 6142 0.3 7.5 206196 115820 pts/4 S+ 15:48 0:00
./haproxy -f h.cfg -d
The RSS is 113Mbytes with maxconn is 1,048,576. If I decrease the
maxconn to be half, RSS is 55Mbytes.
It seems that dev7 is somehow different from lastest snapshot in the
same condition.
--
Best Regards,
Godbach