You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2021/06/08 11:37:20 UTC

[GitHub] [james-project] jeantil commented on a change in pull request #476: [PERFORMANCE] Reduce Cassandra chunk length for some read intensive t…

jeantil commented on a change in pull request #476:
URL: https://github.com/apache/james-project/pull/476#discussion_r647352874



##########
File path: mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraMailboxModule.java
##########
@@ -42,7 +42,8 @@
         .comment("Holds the mailboxes information.")
         .options(options -> options
             .caching(SchemaBuilder.KeyCaching.ALL,
-                SchemaBuilder.rows(CassandraConstants.DEFAULT_CACHED_ROW_PER_PARTITION)))
+                SchemaBuilder.rows(CassandraConstants.DEFAULT_CACHED_ROW_PER_PARTITION))
+            .compressionOptions(SchemaBuilder.lz4().withChunkLengthInKb(8)))

Review comment:
       how did you come to choose `8` Kb ? 
   is it based on BufferedReader's defaultCharBufferSize to align with memory page size or is based on the estimated size of a mailbox row ? 
   (https://stackoverflow.com/questions/37404068/why-is-the-default-char-buffer-size-of-bufferedreader-8192)
   
   a comment would be nice :D
   
   (if the answer is size of a mailbox row, the same question applies to all the following `8` that appear in the PR) 




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org