You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Robert Coli (JIRA)" <ji...@apache.org> on 2010/07/01 01:36:50 UTC

[jira] Created: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

config file option DiskAccessMode has no-op option "mmap_index_only"
--------------------------------------------------------------------

                 Key: CASSANDRA-1241
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
             Project: Cassandra
          Issue Type: Bug
          Components: Core, Documentation & website
    Affects Versions: 0.6.1, 0.6, 0.5, 0.4, 0.3, 0.6.2, 0.6.3, 0.6.4, 0.7
            Reporter: Robert Coli


Per http://wiki.apache.org/cassandra/StorageConfiguration :
"
Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
"

The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
"
 public static enum DiskAccessMode {
        auto,
        mmap,
        mmap_index_only,
        standard,
    }
...
    private static DiskAccessMode diskAccessMode;
    private static DiskAccessMode indexAccessMode;
...
            if (diskAccessMode == DiskAccessMode.auto)
            {
                diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
                indexAccessMode = diskAccessMode;
                logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
            }
            else if (diskAccessMode == DiskAccessMode.mmap_index_only)
            {
                diskAccessMode = DiskAccessMode.standard;
                indexAccessMode = DiskAccessMode.mmap;
            }
            else
            {
                indexAccessMode = diskAccessMode;
            }
"

As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.

"
~/repos/cassandra$ grep -ri indexAccessMode .
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
"

If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1241:
--------------------------------------

    Fix Version/s: 0.7.0

> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.7 beta 1
>            Reporter: Robert Coli
>            Priority: Minor
>             Fix For: 0.7.0
>
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Stu Hood (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898311#action_12898311 ] 

Stu Hood commented on CASSANDRA-1241:
-------------------------------------

+1

> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.7 beta 1
>            Reporter: Robert Coli
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1241.patch
>
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Robert Coli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Coli updated CASSANDRA-1241:
-----------------------------------

    Affects Version/s:     (was: 0.3)
                           (was: 0.4)
                           (was: 0.5)
                           (was: 0.6.4)

> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.6, 0.6.1, 0.6.2, 0.6.3, 0.7
>            Reporter: Robert Coli
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1241:
--------------------------------------

    Attachment: 1241.patch

patch to restore use of mmap_index_only option

> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.7 beta 1
>            Reporter: Robert Coli
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1241.patch
>
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898577#action_12898577 ] 

Hudson commented on CASSANDRA-1241:
-----------------------------------

Integrated in Cassandra #514 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/514/])
    restore use of mmap_index_only option.  patch by jbellis; reviewed by Stu Hood for CASSANDRA-1241


> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.7 beta 1
>            Reporter: Robert Coli
>            Assignee: Jonathan Ellis
>            Priority: Minor
>             Fix For: 0.7 beta 2
>
>         Attachments: 1241.patch
>
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1241) config file option DiskAccessMode has no-op option "mmap_index_only"

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-1241:
--------------------------------------

    Affects Version/s:     (was: 0.6)
                           (was: 0.6.1)
                           (was: 0.6.2)
                           (was: 0.6.3)
             Priority: Minor  (was: Major)

> config file option DiskAccessMode has no-op option "mmap_index_only"
> --------------------------------------------------------------------
>
>                 Key: CASSANDRA-1241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1241
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Documentation & website
>    Affects Versions: 0.7
>            Reporter: Robert Coli
>            Priority: Minor
>
> Per http://wiki.apache.org/cassandra/StorageConfiguration :
> "
> Access mode. mmapped i/o is substantially faster, but only practical on a 64bit machine (which notably does not include EC2 "small" instances) or relatively small datasets. "auto", the safe choice, will enable mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only" (which may allow you to get part of the benefits of mmap on a 32bit machine by mmapping only index files) and "standard". (The buffer size settings that follow only apply to standard, non-mmapped i/o.)
> "
> The actual code referring to "mmap_index_only" is in src/java/org/apache/cassandra/config/DatabaseDescriptor.java :
> "
>  public static enum DiskAccessMode {
>         auto,
>         mmap,
>         mmap_index_only,
>         standard,
>     }
> ...
>     private static DiskAccessMode diskAccessMode;
>     private static DiskAccessMode indexAccessMode;
> ...
>             if (diskAccessMode == DiskAccessMode.auto)
>             {
>                 diskAccessMode = System.getProperty("os.arch").contains("64") ? DiskAccessMode.mmap : DiskAccessMode.standard;
>                 indexAccessMode = diskAccessMode;
>                 logger.info("Auto DiskAccessMode determined to be " + diskAccessMode);
>             }
>             else if (diskAccessMode == DiskAccessMode.mmap_index_only)
>             {
>                 diskAccessMode = DiskAccessMode.standard;
>                 indexAccessMode = DiskAccessMode.mmap;
>             }
>             else
>             {
>                 indexAccessMode = diskAccessMode;
>             }
> "
> As indicated by this snippet, IndexAccessMode is set to "mmap" if "mmap_index_only" is set in the conf file. However it does not appear that IndexAccessMode or getIndexAccessMode() are used by any other cassandra code.
> "
> ~/repos/cassandra$ grep -ri indexAccessMode .
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    private static Config.DiskAccessMode indexAccessMode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = Config.DiskAccessMode.mmap;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:                indexAccessMode = conf.disk_access_mode;
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:    public static Config.DiskAccessMode getIndexAccessMode()
> ./src/java/org/apache/cassandra/config/DatabaseDescriptor.java:        return indexAccessMode;
> "
> If I understand the code correctly, this means that setting DiskAccessMode to "mmap_index_only" is functionally the same as setting it to "standard." As people might be tempted to try/test "mmap_index_only" as a mode in-between "standard" and "mmap" in order to mitigate concerns about https://issues.apache.org/jira/browse/CASSANDRA-1214, it would probably be good to either complete the feature or remove the configuration option. I am willing to submit a patch for the latter and fix the docs if that's the decision.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.