On Fri, 07 Nov 2014 01:19:45 +0900 (JST)
YASUOKA Masahiko <yasu...@openbsd.org> wrote:
> On Tue, 4 Nov 2014 14:50:49 +1000
> David Gwynne <da...@gwynne.id.au> wrote:
>> this uses siphash to protect the in_pcb hashes. this is pretty much
>> a textbook example of what siphash should be used for.
>> 
>> tests? ok?
> 
> Giving inpcb_hash() to LIST_* macros via INPCB*HASH() caused calling
> inpcb_hash() multiple times unintentionally.  Fixed.  Diff is as
> follows.
> 
> Otherwise ok yasuoka.  test yasuoka.

I put kernel gprof results on

  http://yasuoka.net/~yasuoka/oldhash-gprof.txt.gz
  http://yasuoka.net/~yasuoka/siphash-gprof.txt.gz

tested on

  - load: 4,000 HTTP connections / sec by IxLoad
    - 1 HTTP transaction / connection
    - HTTP response body size = 1 byte
  - relayd(8) relays them with below config
    http protocol "http" {
        tcp backlog 32
    }
    relay "HTTP_relay" {
        listen on 127.0.0.1 port 80
        protocol http
        forward to destination
    }
  - pf.conf
    pass in quick inet proto tcp to port 80 divert-to localhost port 80
  - profiling is enabled 10 seconds
  - OpenBSD 5.6 (amd64) + diff 
  - Intel Xeon E3-1220 v3 @ 3.10GHz (4 CPUs)

short result

  compare to pf_test(), it was 57%

    % egrep '^\[(62|45)]' siphash-gprof.txt
    [45]     1.0    0.03        0.37  682175         pf_test [45]
    [62]     0.5    0.00        0.21  501212         in_pcbhash [62]
    %

Reply via email to