You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2021/12/05 20:17:31 UTC

[GitHub] [cassandra] dpoluyanov commented on a change in pull request #1354: [16436] - Added startup check for read_ahead_kb setting.

dpoluyanov commented on a change in pull request #1354:
URL: https://github.com/apache/cassandra/pull/1354#discussion_r762609774



##########
File path: src/java/org/apache/cassandra/service/StartupChecks.java
##########
@@ -285,6 +286,49 @@ public void execute()
         }
     };
 
+    public static final StartupCheck checkReadAheadKbSetting = new StartupCheck()
+    {
+        // This value is in KB.
+        private static final long EXPECTED_READ_AHEAD_KB_SETTING = 8;
+        private static final String READ_AHEAD_KB_SETTING_PATH = "/sys/block/sda/queue/read_ahead_kb";

Review comment:
       Probably should be checked not only on `sda` device, but on all data directories (not sure that it's reasonable to check `read_ahead_kb` for commit log directory)
   It's common to set more than one directory in `data_file_directories` property in `cassandra.yaml`
   ```
   data_file_directories:
     - /srv/disk01
     - /srv/disk02
   ```
   
   `lsblk` could be used to find mount point on common hardware (and to match device name with directory)
   ```
   $ lsblk
   NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
   sda                            8:0    0   1.5T  0 disk  /srv/disk01
   sdb                            8:16   0   1.5T  0 disk  
   `-md0                          9:0    0   5.8T  0 raid0 
     `-md0p1                    259:2    0   5.8T  0 part  /srv/disk02
   ...
   ```
   but pay special attention for case with software raid, where mount point could be on raid partition like on example above
   software raid also could have it's own `read_ahead_kb` and makes sense to check it too.




-- 
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: pr-unsubscribe@cassandra.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org