danielrod08 commented on PR #27806: URL: https://github.com/apache/flink/pull/27806#issuecomment-4353257743
Hello. I used the existing benchmarks from [flink-benchmarks](https://github.com/apache/flink-benchmarks) to test local builds of Apache Flink with Avro 1.11.4 and 1.12.1 (with the fast reader both enabled and disabled). The project was always built using this commit. ## Details ## Machine Benchmarks were run on a MacBook M4 Pro with 48GB RAM. I shut down all non-essential tasks beforehand to keep the environment as stable as possible. ## Benchmarks I ran all existing Avro-related benchmarks in the repo. I also extended the [PojoSerializationBenchmark](https://github.com/apache/flink-benchmarks/blob/master/src/main/java/org/apache/flink/benchmark/full/PojoSerializationBenchmark.java) to cover the conditions mentioned in the comments. Specifically, I added the following: ```java @Benchmark public void readAvroDeserializationSchema() throws IOException { avroSchemaDeserializer.deserialize(avroSchemaBuffer); } ``` The `avroSchemaBuffer` and `avroSchemaDeserializer` are defined as: ```java DeserializationSchema<org.apache.flink.benchmark.avro.MyPojo> avroSchemaDeserializer = AvroDeserializationSchema.forSpecific(org.apache.flink.benchmark.avro.MyPojo.class); SerializationSchema<org.apache.flink.benchmark.avro.MyPojo> avroSchemaSerializer = AvroSerializationSchema.forSpecific(org.apache.flink.benchmark.avro.MyPojo.class); byte[] avroSchemaBuffer = avroSchemaSerializer.serialize(avroPojo); ``` Each benchmark consisted of 10 warmup iterations and 10 measurement iterations. ## Results | Benchmark | 1.11.4 | 1.12.1D | 1.12.1E | 1.12.1E vs 1.11.4 | 1.12.1E vs 1.12.1D | | :--- | :--- | :--- | :--- | :--- | :--- | | **full.PojoSerializationBenchmark.readAvroDeserializationSchema** | 2586.27 | 2698.63 | 2386.07 | 0.92x | 0.88x | | SerializationFrameworkMiniBenchmarks.serializerAvro | 1,743.60 | 1,816.83 | 3,037.34 | 1.74x | 1.67x | | full.PojoSerializationBenchmark.readAvro | 2,354.80 | 2,410.03 | 4,633.79 | 1.97x | 1.92x | | full.PojoSerializationBenchmark.writeAvro | 2,851.08 | 3,475.00 | 3,285.10 | 1.15x | 0.95x | | full.SerializationFrameworkAllBenchmarks.serializerAvro | 1,943.66 | 1,920.06 | 3,082.73 | 1.59x | 1.61x | | full.SerializationFrameworkAllBenchmarks.serializerAvroGeneric | 1,939.33 | 1,905.50 | 2,435.44 | 1.26x | 1.28x | | full.SerializationFrameworkAllBenchmarks.serializerAvroReflect | 209.67 | 912.81 | 950.18 | 4.53x | 1.04x | | full.SerializationFrameworkAllBenchmarks.serializerKryoWithoutRegistration | 208.11 | 968.39 | 928.18 | 4.46x | 0.96x | ### Legend * **1.11.4**: Flink with Avro 1.11.4 * **1.12.1D**: Flink with Avro 1.12.1 (Fast Reader Disabled) * **1.12.1E**: Flink with Avro 1.12.1 (Fast Reader Enabled) You can check the benchmark code at the [flink-benchmarks](https://github.com/apache/flink-benchmarks) repo. Note: - I've truncated the benchmark full paths in the table for readability (flink-benchmarks/src/main/java/org/apache/flink/benchmark). - **The first row (full.PojoSerializationBenchmark.readAvroDeserializationSchema) is the only benchmark specifically tailored for the discussion.** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
