java 6 Jikes RVM results - lynus/jvm-serialization-network-benchmark GitHub Wiki
OS:Linux
JVM:jikes rvm production config
Cores (incl HT):8
Size, Compressed size [light] in bytes
Size, Compressed size [light] in bytes
Size, Compressed size [light] in bytes
Size, Compressed size [light] in bytes
Size, Compressed size [light] in bytes
Size, Compressed size [light] in bytes
This test focusses on en/decoding of a cyclefree data structure, but the featureset of the libraries compared differs a lot:
- some serializers support cycle detection/object sharing others just write non-cyclic tree structures
- some include full metadata in serialized output, some don't
- some are cross platform, some are language specific
- some are text based, some are binary,
- some support versioning forward/backward, both, some don't
(See "ToolBehavior":wiki/ToolBehavior) Other test data will yield different results (e.g. adding a non ascii char to every string :-) ). However the results give a raw estimation of library performance.
Benchmarks serializers- Only cycle free tree structures. An object referenced twice will be serialized twice.
- no manual optimizations.
- schema is known in advance (pre registration or even class generation). (Not all might make use of that)
Size, Compressed size [light] in bytes
create ser deser total size +dfl kryo-registered-flat 147 1240 1508 2748 216 136 protobuf 526 1909 1025 2934 242 151 colfer 131 835 3100 3935 241 152 kryo-auto-flat 108 1915 2141 4056 272 189 protostuff 172 1018 5354 6372 242 152 flatbuffers 156 4064 3703 7767 424 241 json/protostuff-runtime 149 2716 5243 7959 472 252 msgpack/databind 147 5711 4354 10065 236 150 json/jackson-jr/databind 148 4343 5986 10329 471 263 thrift-compact 113 6593 5846 12438 243 152 thrift 115 7044 5788 12832 352 205 json/gson/databind 108 12348 11514 23862 489 268 xml/exi-manual 113 34763 31363 66126 340 331 json/json-lib/databind 112 43310 235522 278832 488 273Contains serializer(-configurations)
- supporting full object graph write/read. Object graph may contain cycles. If an Object is referenced twice, it will be so after deserialization.
- nothing is known in advance, no class generation, no preregistering of classes. Everything is captured at runtime using e.g. reflection.
- note this usually cannot be used cross language, however JSON/XML formats may enable cross language deserialization.
Size, Compressed size [light] in bytes
create ser deser total size +dfl kryo-registered 136 2432 2540 4972 234 146 kryo-auto 107 3184 3160 6343 290 200 protostuff-graph 134 1239 5583 6822 242 152 protostuff-graph-runtime 108 1762 7322 9084 244 154 java-built-in-serializer 113 25044 123100 148144 892 520 stephenerialization 555 27080 141436 168516 1096 522 json/flexjson/databind 109 30748 179262 210010 506 282Contains serializer(-configurations)
- Only cycle free tree structures. An object referenced twice will be serialized twice.
- schema is known in advance (pre registration, intermediate message description languages, class generation).
Size, Compressed size [light] in bytes
create ser deser total size +dfl protobuf 526 1909 1025 2934 242 151 colfer 131 835 3100 3935 241 152 protobuf/protostuff 134 920 5424 6344 242 151 flatbuffers 156 4064 3703 7767 424 241 protobuf/protostuff-runtime 148 1527 7107 8635 244 153 msgpack/databind 147 5711 4354 10065 236 150 thrift-compact 113 6593 5846 12438 243 152 thrift 115 7044 5788 12832 352 205
- text format based. Usually can be read by anybody. Frequently inline schema inside data.
- Mixed regarding required preparation, object graph awareness (references).
Size, Compressed size [light] in bytes
create ser deser total size +dfl json/protostuff-runtime 149 2716 5243 7959 472 252 json/jackson-jr/databind 148 4343 5986 10329 471 263 json/gson/databind 108 12348 11514 23862 489 268 xml/exi-manual 113 34763 31363 66126 340 331 json/flexjson/databind 109 30748 179262 210010 506 282 json/json-lib/databind 112 43310 235522 278832 488 273all flavours of manually optimized serializers. Handcoded and hardwired to exactly the benchmark's message structures.
- illustrates what's possible, at what level generic approaches can be optimized in case
Size, Compressed size [light] in bytes
create ser deser total size +dfl kryo-manual 151 958 1170 2128 211 132 kryo-opt 108 1159 1498 2657 213 133 json/jackson/manual 108 1688 3338 5026 471 262 json/protostuff-manual 109 2102 3515 5617 452 242 protostuff-manual 142 958 5454 6412 242 152 java-manual 144 4401 2161 6562 258 151 avro-specific 144 6733 2906 9639 224 135 avro-generic 776 7320 2388 9708 224 135 msgpack/manual 108 5617 4386 10003 236 150 xml/aalto-manual 112 3663 6653 10316 656 314 wobly-compact 59 5246 5226 10472 228 143 wobly 59 5375 5256 10631 254 155 datakernel 830 5912 5066 10978 228 137 xml/woodstox-manual 108 5495 9684 15179 656 314 xml/fastinfo-manual 113 6992 10069 17061 380 290 xml/javolution/manual 108 7665 11062 18727 507 273 json/gson/manual 149 10683 10720 21403 471 262 bson/mongodb/manual 150 4623 17893 22516 498 285 json/gson/manual-tree 108 12610 14624 27234 488 268 json/json-smart/manual-tree 113 14141 13388 27530 498 279 json/json.simple/manual 113 15826 18418 34244 498 279 json/org.json/manual-tree 108 15966 24262 40229 488 268 json/svenson/databind 112 10672 36514 47186 501 281 json/jsonij/manual-jpath 108 48993 26956 75949 484 268 json/argo/manual-tree 109 135344 141012 276356 488 273shows performance vs convenience of manually-selected libs.
- cycle free, schema known at compile time, manual optimization: kryo-manual, msgpack/manual
- cycle free, schema known at compile time: protostuff, fst-flat-pre, kryo-flat-pre. (note: protostuff uses class generation while the other two just require a list of classes to be written)
- cycle free, schema UNKNOWN at compile time: fst-flat, kryo-flat, protostuff-runtime, msgpack/databind
- full object graph awareness, schema UNKNOWN at compile time: fst, kryo.
Size, Compressed size [light] in bytes
create ser deser total size +dfl kryo-manual 151 958 1170 2128 211 132 protostuff 172 1018 5354 6372 242 152 protostuff-runtime 143 1595 6806 8401 244 154 msgpack/manual 108 5617 4386 10003 236 150 msgpack/databind 147 5711 4354 10065 236 150
create ser deser total size +dfl kryo-manual 151 958 1170 2128 211 132 kryo-opt 108 1159 1498 2657 213 133 kryo-registered-flat 147 1240 1508 2748 216 136 protobuf 526 1909 1025 2934 242 151 colfer 131 835 3100 3935 241 152 kryo-auto-flat 108 1915 2141 4056 272 189 kryo-registered 136 2432 2540 4972 234 146 json/jackson/manual 108 1688 3338 5026 471 262 json/protostuff-manual 109 2102 3515 5617 452 242 kryo-auto 107 3184 3160 6343 290 200 protobuf/protostuff 134 920 5424 6344 242 151 protostuff 172 1018 5354 6372 242 152 protostuff-manual 142 958 5454 6412 242 152 java-manual 144 4401 2161 6562 258 151 protostuff-graph 134 1239 5583 6822 242 152 flatbuffers 156 4064 3703 7767 424 241 json/protostuff-runtime 149 2716 5243 7959 472 252 protostuff-runtime 143 1595 6806 8401 244 154 protobuf/protostuff-runtime 148 1527 7107 8635 244 153 protostuff-graph-runtime 108 1762 7322 9084 244 154 avro-specific 144 6733 2906 9639 224 135 avro-generic 776 7320 2388 9708 224 135 msgpack/manual 108 5617 4386 10003 236 150 msgpack/databind 147 5711 4354 10065 236 150 xml/aalto-manual 112 3663 6653 10316 656 314 json/jackson-jr/databind 148 4343 5986 10329 471 263 wobly-compact 59 5246 5226 10472 228 143 wobly 59 5375 5256 10631 254 155 datakernel 830 5912 5066 10978 228 137 thrift-compact 113 6593 5846 12438 243 152 thrift 115 7044 5788 12832 352 205 xml/woodstox-manual 108 5495 9684 15179 656 314 xml/fastinfo-manual 113 6992 10069 17061 380 290 xml/javolution/manual 108 7665 11062 18727 507 273 json/gson/manual 149 10683 10720 21403 471 262 bson/mongodb/manual 150 4623 17893 22516 498 285 json/gson/databind 108 12348 11514 23862 489 268 json/gson/manual-tree 108 12610 14624 27234 488 268 json/json-smart/manual-tree 113 14141 13388 27530 498 279 json/json.simple/manual 113 15826 18418 34244 498 279 json/org.json/manual-tree 108 15966 24262 40229 488 268 json/svenson/databind 112 10672 36514 47186 501 281 xml/exi-manual 113 34763 31363 66126 340 331 json/jsonij/manual-jpath 108 48993 26956 75949 484 268 java-built-in-serializer 113 25044 123100 148144 892 520 stephenerialization 555 27080 141436 168516 1096 522 json/flexjson/databind 109 30748 179262 210010 506 282 json/argo/manual-tree 109 135344 141012 276356 488 273 json/json-lib/databind 112 43310 235522 278832 488 273
Effort Format Structure Misc kryo-manual MANUAL_OPT BINARY FLAT_TREE [] complete manual optimization kryo-opt MANUAL_OPT BINARY FLAT_TREE [] manual optimization kryo-registered-flat CLASSES_KNOWN BINARY FLAT_TREE [] class registration, no references (typical usage) protobuf CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] colfer CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] generated code kryo-auto-flat ZERO_KNOWLEDGE BINARY FLAT_TREE [] no class registration, no references kryo-registered CLASSES_KNOWN BINARY FULL_GRAPH [] class registration, references (typical usage) json/jackson/manual MANUAL_OPT JSON FLAT_TREE [] json/protostuff-manual MANUAL_OPT JSON FLAT_TREE [] json + manual kryo-auto ZERO_KNOWLEDGE BINARY FULL_GRAPH [] no class registration, references protobuf/protostuff CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] protobuf + generated code protostuff CLASSES_KNOWN BINARY FLAT_TREE [] generated code protostuff-manual MANUAL_OPT BINARY FLAT_TREE [] manual java-manual MANUAL_OPT BINARY FLAT_TREE [] protostuff-graph CLASSES_KNOWN BINARY FULL_GRAPH [] graph + generated code flatbuffers CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] json/protostuff-runtime ZERO_KNOWLEDGE JSON FLAT_TREE [] json + reflection protostuff-runtime ZERO_KNOWLEDGE BINARY FLAT_TREE [] reflection protobuf/protostuff-runtime ZERO_KNOWLEDGE BIN_CROSSLANG FLAT_TREE [] protobuf + reflection protostuff-graph-runtime ZERO_KNOWLEDGE BINARY FULL_GRAPH [] graph + reflection avro-specific MANUAL_OPT BIN_CROSSLANG UNKNOWN [] avro-generic MANUAL_OPT BIN_CROSSLANG FLAT_TREE [] msgpack/manual MANUAL_OPT BIN_CROSSLANG FLAT_TREE [] uses positional (column) layout (instead of Maps std impl uses) to eliminate use of names msgpack/databind CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] uses positional (column) layout (instead of Maps std impl uses) to eliminate use of names xml/aalto-manual MANUAL_OPT XML UNKNOWN [] json/jackson-jr/databind ZERO_KNOWLEDGE JSON FLAT_TREE [] wobly-compact MANUAL_OPT BINARY FLAT_TREE [] wobly MANUAL_OPT BINARY FLAT_TREE [] datakernel MANUAL_OPT BINARY FLAT_TREE [] manually optimized thrift-compact CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] thrift CLASSES_KNOWN BIN_CROSSLANG FLAT_TREE [] xml/woodstox-manual MANUAL_OPT XML UNKNOWN [] xml/fastinfo-manual MANUAL_OPT XML UNKNOWN [] xml/javolution/manual MANUAL_OPT XML FLAT_TREE [] json/gson/manual MANUAL_OPT JSON FLAT_TREE [] bson/mongodb/manual MANUAL_OPT BIN_CROSSLANG FLAT_TREE [] json/gson/databind ZERO_KNOWLEDGE JSON FLAT_TREE [] json/gson/manual-tree MANUAL_OPT JSON FLAT_TREE [] json/json-smart/manual-tree MANUAL_OPT JSON FLAT_TREE [] json/json.simple/manual MANUAL_OPT JSON FLAT_TREE [] json/org.json/manual-tree MANUAL_OPT JSON FLAT_TREE [] json/svenson/databind MANUAL_OPT JSON FLAT_TREE [] xml/exi-manual ZERO_KNOWLEDGE XML UNKNOWN [] json/jsonij/manual-jpath MANUAL_OPT JSON FLAT_TREE [] java-built-in-serializer ZERO_KNOWLEDGE BINARY FULL_GRAPH [] stephenerialization ZERO_KNOWLEDGE BINARY FULL_GRAPH [] null json/flexjson/databind ZERO_KNOWLEDGE JSON FULL_GRAPH [] json/argo/manual-tree MANUAL_OPT JSON FLAT_TREE [] json/json-lib/databind ZERO_KNOWLEDGE JSON FLAT_TREE []