> >
> > I would like to make such a calculation:
> > there are 1000 people online, everyone open 5 connections in hash
table,
> > and every connection last for 360s(the default ppc time), then the size
is:
> > 1000x5x360=1,800,000.
> > that means only 1000 people can be online at the same time if it is
2^20?
> > Is that right? I wish I am wrong. ;-)
>
> With CONFIG_IP_MASQUERADE_VS_TAB_BITS we specify not the max
> number of the entries (connections in your case) but the number of the
> rows in a hash table. This table has columns which are unlimited. You can
> set your table to 256 rows and to have 1,800,000 connections in
> 7000 columns average. But the lookup is slower. The lookup function
> chooses one row using hash function and starts to search all these
> 7000 entries for match. So, by increasing the number of rows we want
> to speedup the lookup. There is _no_ connection limit. It depends on the
> free memory. Try to tune the number of rows in this way that the
> columns will not exceed 16 (average), for example. It is not fatal if
> the columns are more (average) but if your CPU is fast enough this is not
> a problem.
>
>
> Regards
>
> --
> Julian Anastasov <uli@xxxxxxxxxxxxxxxxxxxxxx>
Thanks. I understand it absolutely and know how to do it now. ;-)
Regards
ttao.
|