[Xorp-hackers] XRL performance: UNIX domain sockets vs TCP sockets

Bruce Simpson bms at incunabulum.net
Tue Dec 1 11:01:29 PST 2009


Bruce Simpson wrote:
> Ben Greear wrote:
>>>
>>> UNIX domain sockets can be used in XRL as it stands, by passing 'env
>>> XORP_PF=x', without any patches.
>>
>> If these are faster, why not use them by default?
>
> How about this? 'scons check' runs to completion.

This is bork, because 'unix_socket' is never ignored as a compile-time 
default; the environment needs to be checked in all cases.

xrl_std_router.cc needs this diff chunk instead. Hitting getenv() twice 
in one shot isn't too bad, can clean up later, after feedback.

XrlStdRouter is not something which gets constructed a lot; typically 
once per process. libfeaclient, however, will build its own, 
independently of anything else the process is doing.

Using the attached script revealed this relatively quickly. BTW: I've 
seen the performance difference fall to around 15%. I was getting up to 
30% faster than TCP in some situations.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xrl-local-2.diff
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20091201/8c67df63/attachment.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xrlmark.sh
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20091201/8c67df63/attachment-0001.ksh 


More information about the Xorp-hackers mailing list