hash表大小的修改

IP Virtual Server version 1.0.11 (size=4096)

size=4096 是HASH表的大小吧?
怎么修改,改成多少合适,有何依据?

Forums:

Networking Options -->
  IP: Virtual Server Configuration -->
    <M> virtual server support (EXPERIMENTAL)
    [ ]   IP virtual server debugging
    (12)   IPVS connection table size (the Nth power of 2)
    --- IPVS scheduler
    <M>   round-robin scheduling
    <M>   weighted round-robin scheduling
    <M>   least-connection scheduling scheduling
    <M>   weighted least-connection scheduling
    <M>   locality-based least-connection scheduling
    <M>   locality-based least-connection with replication scheduling
    <M>   destination hashing scheduling
    <M>   source hashing scheduling
    <M>   shortest expected delay scheduling
    <M>   never queue scheduling
    --- IPVS application helper
    <M>   FTP protocol helper

把12调成16,就表示Hash的桶数为65536。

一般来说4096桶是够的。桶越多,可以降低Hash冲撞率。

---------------
Ourlinux杂志

具体可参考: http://my.oschina.net/anglix/blog/529619
表大小可根据并发访问量、内存大小来设置。

??

randomness