[logback-dev] Protobuf
Maarten Bosteels
mbosteels.dns at gmail.com
Wed Mar 18 22:09:48 CET 2009
Hi Ceki,
Keep in mind that I still have to double check my LoggingEvent-to-protobuf
converter.
Serializing the corpus with different formats:
java serialization => 16 MB (16108602)
protobuf => 33 MB (34385867 bytes)
protobuf + gzip => 9.9 MB (10354646 bytes)
protbuf + deflater => 12 MB (12006206 bytes)
speed:
java serialization: 4330 ms
protobuf 928 ms
protobuf + gzip 3146 ms
protobuf + deflater 1883 ms
So I would choose for protobuf + deflater : 25% smaller than java
serilaization and twice as fast.
Deflater means using java.util.zip.Deflater.BEST_SPEED
regards,
Maarten
On Wed, Mar 18, 2009 at 9:49 PM, Ceki Gulcu <ceki at qos.ch> wrote:
>
> Hello Maarten,
>
> It's interesting to learn that protobuf is faster than plain old java
> serialization. Thanks.
>
> How about the size of the stored data? How many bytes does a logging event
> use on average?
>
> Maarten Bosteels wrote:
>
>> Hi,
>>
>> No objections at all.
>>
>> Looking at my .proto file it's indeed pretty obvious that CallerData and
>> StackTraceElement are quite similar :-)
>>
>> http://code.google.com/p/firewood/source/browse/trunk/compare-formats/src/main/java/com/googlecode/firewood/protobuf/logging.proto
>>
>> I've done some benchmarking with protobuf (using the Corpus), and it seems
>> to be at least 4 times faster than Java serialization.
>> Will soon post the results and the code.
>>
>> regards,
>> Maarten
>>
>>
> --
> Ceki Gülcü
> Logback: The reliable, generic, fast and flexible logging framework for
> Java.
> http://logback.qos.ch
> _______________________________________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://qos.ch/mailman/listinfo/logback-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-dev/attachments/20090318/4d9dd65b/attachment.htm>
More information about the logback-dev
mailing list