On Thu, Mar 31, 2016 at 03:37:56PM +0800, Huang Lei wrote:
> From: Huang Lei <[email protected]>
> 
> During our scalability test '2k HVs + 20k lports' we found that lexer is a
> major user of heap memory:
> -   5.22%  ovn-controller  libjemalloc.so.1    [.] free
>    - free
>       + 27.46% lexer_get
>       + 18.00% ofctrl_put
>       ...
> -   1.85%  ovn-controller  libjemalloc.so.1    [.] malloc
>    - malloc
>    - xmalloc
>       - 55.03% xmemdup0
>          - 90.58% lex_parse_id.isra.0
>             - lexer_get
>       ...
> 
> So lex_token is modified to usage a 'buffer' defined in it for tokens smaller
> than 128 bytes, and for tokens bigger than 128 bytes it turn to use heap
> memory. This change makes our test case run at least 10% faster.
> 
> Tested with 'ovn -- lexer' case.
> 
> Signed-off-by: Huang Lei <[email protected]>

Thanks.  I tweaked a lot of details of the code and pushed this to
master.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to