Yep, you can see the size of connection, items by make test.

--
Blog: http://www.chenzongzhi.info
Twitter: https://twitter.com/baotiao
Git: https://github.com/baotiao

On 2012-3-9, at 上午1:24, Wendy Cheng wrote:

> 2012/3/8 陈 宗志 <[email protected]>:
>> I think you are right.
>> each connection will contain a conn.a conn contain many data. I guess a conn
>> is about 5KB by add the data of struct conn. so, the more connections, the
>> more memory is needed.
> 
> Yep, it looks like this way .. On storage engine branch, the "conn"
> structure itself is 648 bytes, DATA_BUFFER_SIZE is 2048. Adding these
> togather, we have 2048*2 (both read / write = 4096) bytes of buffer +
> 648 conn structure = 4744 bytes total. Adding TCP/IP system stack,
> "5K" looks like a good estimate.
> 
> Thanks for the response !
> 
> -- Wendy
> 
> 
>> 
>> --
>> Blog: http://www.chenzongzhi.info
>> Twitter: https://twitter.com/baotiao
>> Git: https://github.com/baotiao
>> 
>> On 2012-3-8, at 上午8:40, Wendy Cheng wrote:
>> 
>> As part of the tuning work, it is noticed that the maximum connection
>> count is controlled by "settings.maxconns". There is a comment next to
>> the default setting:
>> 
>> settings.maxconns = 1024;         /* to limit connections-related
>> memory to about 5MB */
>> 
>> I'm wondering how the 5MB was calculated. Could I assume that if I
>> allow 2048 connections, then the network would take ~10MB :) ?
>> 

Reply via email to