You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ascherbakoff (via GitHub)" <gi...@apache.org> on 2025/07/18 13:54:30 UTC

[PR] IGNITE-25872 Enable FlushConsolidationHandler for client-server IO. [ignite-3]

ascherbakoff opened a new pull request, #6280:
URL: https://github.com/apache/ignite-3/pull/6280

   Benchmark results (on a laptop):
   
   Without consolidation:
   ```
   Benchmark                 (fsync)  (keysPerThread)  (loadBatchSize)  (offset)  (partitionCount)  (threads)  Mode  Cnt    Score   Error  Units
   ClientKvGetBenchmark.get    false           100000            10000         0                32          1  avgt   20  184,955 ± 2,465  us/op
   ```
   ```
   Benchmark                 (fsync)  (keysPerThread)  (loadBatchSize)  (offset)  (partitionCount)  (threads)   Mode  Cnt      Score     Error  Units
   ClientKvGetBenchmark.get    false           100000            10000         0                32          8  thrpt   20  25766,993 ± 624,214  ops/s
   ```
   
   With consolidation:
   ```
   Benchmark                 (fsync)  (keysPerThread)  (loadBatchSize)  (offset)  (partitionCount)  (threads)  Mode  Cnt    Score   Error  Units
   ClientKvGetBenchmark.get    false           100000            10000         0                32          1  avgt   20  187,306 ± 3,773  us/op
   ```
   ```
   Benchmark                 (fsync)  (keysPerThread)  (loadBatchSize)  (offset)  (partitionCount)  (threads)   Mode  Cnt      Score      Error  Units
   ClientKvGetBenchmark.get    false           100000            10000         0                32          8  thrpt   20  28113,619 ± 1040,303  ops/s
   ```
   
   Throughput gain about 10%, latency seems not affected.


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25872 Enable FlushConsolidationHandler for client-server IO [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #6280:
URL: https://github.com/apache/ignite-3/pull/6280#discussion_r2218928555


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientHandlerModule.java:
##########
@@ -351,6 +352,7 @@ protected void initChannel(Channel ch) {
                             handler = messageHandler;
 
                             ch.pipeline().addLast(
+                                    new FlushConsolidationHandler(FlushConsolidationHandler.DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES, true),

Review Comment:
   Ignore my comments - it is already enabled in `NettyClientConnectionMultiplexer`.



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientHandlerModule.java:
##########
@@ -351,6 +352,7 @@ protected void initChannel(Channel ch) {
                             handler = messageHandler;
 
                             ch.pipeline().addLast(
+                                    new FlushConsolidationHandler(FlushConsolidationHandler.DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES, true),

Review Comment:
   Ignore my comment - it is already enabled in `NettyClientConnectionMultiplexer`.



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25872 Enable FlushConsolidationHandler for client-server IO [ignite-3]

Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on PR #6280:
URL: https://github.com/apache/ignite-3/pull/6280#issuecomment-3103621435

   @ascherbakoff  branch is incorrect - IGNITE-25872 about another issue


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25872 Enable FlushConsolidationHandler for client-server IO [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #6280:
URL: https://github.com/apache/ignite-3/pull/6280#discussion_r2216176319


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientHandlerModule.java:
##########
@@ -351,6 +352,7 @@ protected void initChannel(Channel ch) {
                             handler = messageHandler;
 
                             ch.pipeline().addLast(
+                                    new FlushConsolidationHandler(FlushConsolidationHandler.DEFAULT_EXPLICIT_FLUSH_AFTER_FLUSHES, true),

Review Comment:
   Should we enable this on the client side too, in `TcpClientChannel`?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25872 Enable FlushConsolidationHandler for client-server IO. [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #6280:
URL: https://github.com/apache/ignite-3/pull/6280#discussion_r2216169466


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/ClientInboundMessageHandler.java:
##########
@@ -999,46 +999,14 @@ clockService, notificationSender(requestId)
         }
     }
 
-    private static boolean isPartitionOperation(int opCode) {
-        return opCode == ClientOp.TABLES_GET
-                || opCode == ClientOp.TUPLE_UPSERT
-                || opCode == ClientOp.TUPLE_GET
-                || opCode == ClientOp.TUPLE_GET_AND_UPSERT
-                || opCode == ClientOp.TUPLE_INSERT
-                || opCode == ClientOp.TUPLE_REPLACE
-                || opCode == ClientOp.TUPLE_REPLACE_EXACT
-                || opCode == ClientOp.TUPLE_GET_AND_REPLACE
-                || opCode == ClientOp.TUPLE_DELETE
-                || opCode == ClientOp.TUPLE_DELETE_EXACT
-                || opCode == ClientOp.TUPLE_GET_AND_DELETE
-                || opCode == ClientOp.TUPLE_CONTAINS_KEY
-                || opCode == ClientOp.STREAMER_BATCH_SEND
-                || opCode == ClientOp.TX_COMMIT
-                || opCode == ClientOp.TX_ROLLBACK;
-
-                // Sql-related operation must do some bookkeeping first on the client's thread to avoid races
-                // (for instance, cancellation must not be processed until execution request is registered).
-                // || opCode == ClientOp.SQL_EXEC
-                // || opCode == ClientOp.SQL_EXEC_BATCH
-                // || opCode == ClientOp.SQL_EXEC_SCRIPT
-                // || opCode == ClientOp.SQL_QUERY_META;
-
-                // TODO: IGNITE-23641 The batch operations were excluded because fast switching leads to performance degradation for them.
-                // || opCode == ClientOp.TUPLE_UPSERT_ALL
-                // || opCode == ClientOp.TUPLE_GET_ALL
-                // || opCode == ClientOp.TUPLE_INSERT_ALL
-                // || opCode == ClientOp.TUPLE_DELETE_ALL
-                // || opCode == ClientOp.TUPLE_DELETE_ALL_EXACT
-                // || opCode == ClientOp.TUPLE_CONTAINS_ALL_KEYS;
-    }
-
     private void processOperationInternal(
             ChannelHandlerContext ctx,
             ClientMessageUnpacker in,
             long requestId,
             int opCode
     ) {
         CompletableFuture<ResponseWriter> fut;
+        // TODO: Dont' need atomic tracker

Review Comment:
   Ticket?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org