You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by Chad Walters <Ch...@microsoft.com> on 2009/05/02 20:49:59 UTC

Post on Java Serialization Benchmarks

Some folks might want to take a look at these benchmarks that seem to be
making the rounds:
http://www.eishay.com/2009/03/more-on-benchmarking-java-serialization.html

I am puzzled by the results because naively I would expect Thrift and
protocol buffers to be much faster than json at serialization and
deserialization.

Either:
A. something is buggy about the way the tests are being run;
B. there is something very suboptimal about the way both of these libraries
are performing in Java, at least for the test cases presented here;
C. my intuitions about performance in Java are very poor;
D. some combination of the above

If I have time to dig into it a little, I may poke around but perhaps
others, particularly those with Java performance expertise, would like to
look into it as well.

I expect we are going to start seeing a lot of performance bakeoffs in Java
and we might want to do what we can to sort some of this out.

Chad


Re: Post on Java Serialization Benchmarks

Posted by Brandon Bickford <bi...@gmail.com>.
I ran this benchmark TBinaryProtocolAccelerated a few months ago when
I read that blog post; it puts Thrift much closer to cjson/simplejson
in terms of speed.    Here's my modified benchmark code (with the
output times): http://github.com/bickfordb/sertest/tree/master

 - Brandon

On Sat, May 2, 2009 at 12:54 PM, David Reiss <dr...@facebook.com> wrote:
>> http://twitter.com/etrepum/status/1581349624 is a bold challenge to
>> Python Thrift after this json/thrift/pb comparison:
>> http://www.bouncybouncy.net/ramblings/posts/more_on_json_vs_thrift_and_protocol_buffers/
> They should be using TBinaryProtocolAccelerated to take advantage
> of the C module for (de)serialization.
>
> --David
>

Re: Post on Java Serialization Benchmarks

Posted by Chad Walters <Ch...@microsoft.com>.
I imagine the erlang performance issues Cliff complains about are similarly related to the fact that the Thrift client for erlang is written in erlang.

To paraphrase Bart Simpson: Good old C, nothing beats C.

Chad


On 5/2/09 12:54 PM, "David Reiss" <dr...@facebook.com> wrote:

> http://twitter.com/etrepum/status/1581349624 is a bold challenge to
> Python Thrift after this json/thrift/pb comparison:
> http://www.bouncybouncy.net/ramblings/posts/more_on_json_vs_thrift_and_protocol_buffers/
They should be using TBinaryProtocolAccelerated to take advantage
of the C module for (de)serialization.

--David


Re: Post on Java Serialization Benchmarks

Posted by David Reiss <dr...@facebook.com>.
> http://twitter.com/etrepum/status/1581349624 is a bold challenge to
> Python Thrift after this json/thrift/pb comparison:
> http://www.bouncybouncy.net/ramblings/posts/more_on_json_vs_thrift_and_protocol_buffers/
They should be using TBinaryProtocolAccelerated to take advantage
of the C module for (de)serialization.

--David

Re: Post on Java Serialization Benchmarks

Posted by Michael Greene <mi...@gmail.com>.
Having tracked a few of these issues lately, here is a link dump for
other people willing to explore:

http://cliffmoon.tumblr.com/post/94744663/ludicrous-speed compares
Thrift vs native Erlang performance

http://twitter.com/etrepum/status/1581349624 is a bold challenge to
Python Thrift after this json/thrift/pb comparison:
http://www.bouncybouncy.net/ramblings/posts/more_on_json_vs_thrift_and_protocol_buffers/

https://issues.apache.org/jira/browse/HBASE-794 is a pending
comparison the HBase guys are going to be doing, and offers some
problems they might be having with Thrift

For what it's worth, I'll be looking a little more into the C#
serialization / deserialization side this week.

Michael

Chad Walters <Ch...@microsoft.com> wrote:
>
> Looking further, it appears that this work has migrated to:
> http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking
>
> The code is all there to run these tests and tweak them ourselves.
>
> Chad
>
> On 5/2/09 11:49 AM, "Chad Walters" <Ch...@microsoft.com> wrote:
> I am puzzled by the results because naively I would expect Thrift and
> protocol buffers to be much faster than json at serialization and
> deserialization.
>
> If I have time to dig into it a little, I may poke around but perhaps
> others, particularly those with Java performance expertise, would like to
> look into it as well.
>
> I expect we are going to start seeing a lot of performance bakeoffs in Java
> and we might want to do what we can to sort some of this out.
>
> Chad

Re: Post on Java Serialization Benchmarks

Posted by Chad Walters <Ch...@microsoft.com>.
Looking further, it appears that this work has migrated to:
http://code.google.com/p/thrift-protobuf-compare/wiki/Benchmarking

The code is all there to run these tests and tweak them ourselves.

Chad

On 5/2/09 11:49 AM, "Chad Walters" <Ch...@microsoft.com> wrote:

Some folks might want to take a look at these benchmarks that seem to be
making the rounds:
http://www.eishay.com/2009/03/more-on-benchmarking-java-serialization.html

I am puzzled by the results because naively I would expect Thrift and
protocol buffers to be much faster than json at serialization and
deserialization.

Either:
A. something is buggy about the way the tests are being run;
B. there is something very suboptimal about the way both of these libraries
are performing in Java, at least for the test cases presented here;
C. my intuitions about performance in Java are very poor;
D. some combination of the above

If I have time to dig into it a little, I may poke around but perhaps
others, particularly those with Java performance expertise, would like to
look into it as well.

I expect we are going to start seeing a lot of performance bakeoffs in Java
and we might want to do what we can to sort some of this out.

Chad