[logback-dev] Protobuf
Ceki Gulcu
ceki at qos.ch
Wed Mar 18 22:25:09 CET 2009
Are you using the standard corpus with 50'000? If so, 12MB for 50'000 elements
translates to about 240 bytes per message which is pretty good. The CPU times,
e.g. 1883 ms, are fantastic.
Maarten Bosteels wrote:
> 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
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://qos.ch/mailman/listinfo/logback-dev
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the logback-dev
mailing list