You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by ma...@bestweb.net on 2010/03/08 04:57:01 UTC

Performance of Thrift C++ client



Does anyone have any performance metrics for Thrift generated
client-side code? C++ would be nice.
As you might guess, I'm trying
to estimate the difference in the performance of the Thrift generated C++
code for TBinaryProtocol over TSockets or TBufferedTransports and the C
code generated by cthrift.

Thanks!
Mayan



Re: Performance of Thrift C++ client

Posted by ma...@bestweb.net.


FWIW:
I measured the performance of the client-side scribe 
interface in cthrift for a few different data-points. I'm only reporting
the serialization times, not the time spent in the single write per
call.
list size 1 category="" msg="": 2755
ticks
list size 100 category="" msg="":  122489
ticks
list size 1 category="" msg=1000B: 2904
ticks
list size 100 category="" msg=1000B: 198899
ticks
I'm running a 2.6GHz Pentium dual-core E5300 with cygwin on
top of Vista Home Premium. All numbers are measured using RDTSC.  Numbers
are the average of a 1000 message sends.
The scribe interface
is:
enum ResultCode{
  OK,
  TRY_LATER
}

struct LogEntry{
  1: string category,
  2: string message
}
ResultCode Log(1: list<LogEntry> messages),

> I don't have metrics on hand, but you almost always want to wrap
your base
> transport with a buffered or framed transport. At
least in my experience
> with Ruby and Java, a buffer makes all
the difference.
> 
> -Bryan
> 
> On Sun,
Mar 7, 2010 at 7:57 PM, <ma...@bestweb.net> wrote:
> 
>>
>>
>>
>> Does anyone have any
performance metrics for Thrift generated
>> client-side code?
C++ would be nice.
>> As you might guess, I'm trying
>> to estimate the difference in the performance of the Thrift
generated
>> C++
>> code for TBinaryProtocol over
TSockets or TBufferedTransports and the C
>> code generated by
cthrift.
>>
>> Thanks!
>> Mayan
>>
>>
>>
> 

Re: Performance of Thrift C++ client

Posted by Bryan Duxbury <br...@rapleaf.com>.
I don't have metrics on hand, but you almost always want to wrap your base
transport with a buffered or framed transport. At least in my experience
with Ruby and Java, a buffer makes all the difference.

-Bryan

On Sun, Mar 7, 2010 at 7:57 PM, <ma...@bestweb.net> wrote:

>
>
>
> Does anyone have any performance metrics for Thrift generated
> client-side code? C++ would be nice.
> As you might guess, I'm trying
> to estimate the difference in the performance of the Thrift generated C++
> code for TBinaryProtocol over TSockets or TBufferedTransports and the C
> code generated by cthrift.
>
> Thanks!
> Mayan
>
>
>