yandrey321 commented on code in PR #11501:
URL: https://github.com/apache/ozone/pull/11501#discussion_r4303933174


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestEcParallelReadBenchmark.java:
##########
@@ -0,0 +1,442 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.client.rpc.read;
+
+import static org.apache.hadoop.hdds.client.ECReplicationConfig.EcCodec.RS;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.zip.CRC32;
+import org.apache.hadoop.hdds.client.ECReplicationConfig;
+import org.apache.hadoop.hdds.conf.OzoneConfiguration;
+import org.apache.hadoop.hdds.scm.OzoneClientConfig;
+import org.apache.hadoop.hdds.utils.IOUtils;
+import org.apache.hadoop.ozone.MiniOzoneCluster;
+import org.apache.hadoop.ozone.client.ObjectStore;
+import org.apache.hadoop.ozone.client.OzoneBucket;
+import org.apache.hadoop.ozone.client.OzoneClient;
+import org.apache.hadoop.ozone.client.OzoneClientFactory;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Nested;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Benchmark for reading the cells of a healthy EC block in parallel 
(HDDS-16867).
+ *
+ * <p>Every EC key is read through two sets of clients of the same cluster: 
with
+ * {@code ozone.client.ec.parallel.read.enabled=false} (cells are read one at 
a time) and with it set to true.
+ * Each client has its own datanode connections. Rounds alternate the order of 
the two arms, after a warm-up, and
+ * the median throughput of the rounds is reported; latency percentiles are 
taken over all measured rounds.
+ *
+ * <p>The benchmark runs on a 5 and on a 9 datanode cluster. rs-6-3 needs 9 
datanodes, so on 5 datanodes only
+ * rs-3-2 is measured; there every datanode holds a cell of every key, while 
on 9 datanodes the cells of rs-3-2
+ * keys are spread over more datanodes.
+ *
+ * <p>All datanodes run in this JVM and are reached over loopback, so a 
datanode round trip costs far less than
+ * on a real network. The speed-up measured here comes from overlapping the 
datanode read, the transfer and the
+ * client-side checksum verification of different cells; on a real network the 
serial round trips that the
+ * parallel path removes cost more, so this is a lower bound. With several 
readers, the readers and all the
+ * datanodes share the CPUs of one machine.
+ *
+ * <p>Run with:
+ * <pre>
+ *   mvn -pl :ozone-integration-test test -Dtest=TestEcParallelReadBenchmark \
+ *     -Dexcluded-test-groups= -DskipShade -DskipRecon
+ * </pre>
+ */
+@Tag("benchmark")
+public class TestEcParallelReadBenchmark {

Review Comment:
   its the first JIRA in the Epic I'd like to use this benchmark for validation 
of the future fork + on demand regression testing when we do changes that can 
affect EC read performance. 
   
   We might want to add on demand CI workflow for running tests with benchmark 
tag.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to