[ 
https://issues.apache.org/jira/browse/LUCENE-5951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14253307#comment-14253307
 ] 

Michael McCandless commented on LUCENE-5951:
--------------------------------------------

Actually, I run BTRFS on my current dev box.  It is a symlink, but spins() gets 
through that:

{noformat}
  mike@haswell:/$ df -h .
  Filesystem                    Size  Used Avail Use% Mounted on
  /dev/mapper/haswell--vg-root  466G  138G  324G  30% /
  mike@haswell:/$ ls -l /dev/mapper/haswell--vg-root 
  lrwxrwxrwx 1 root root 7 Dec 14 17:08 /dev/mapper/haswell--vg-root -> ../dm-0
  mike@haswell:/$ cat /sys/block/dm-0/queue/rotational 
  0
{noformat}

To verify spins() is working, I just run:

{noformat}
  ant test -Dtestcase=TestConcurrentMergeScheduler 
-Dtestmethod=testDynamicDefaults -Dtests.verbose=true 
-Dtests.directory=MMapDirectory
{noformat}

and then look for the line where CMS logs the "spins" result:

{noformat}
 [junit4]   1> CMS 1 [Fri Dec 19 16:36:47 UZT 2014; main]: 
initMaxMergesAndThreads spins=false maxThreadCount=3 maxMergeCount=5
{noformat}

> Detect when index is on SSD and set dynamic defaults
> ----------------------------------------------------
>
>                 Key: LUCENE-5951
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5951
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>         Attachments: LUCENE-5951.patch, LUCENE-5951.patch, LUCENE-5951.patch, 
> LUCENE-5951.patch, LUCENE-5951.patch, LUCENE-5951.patch, LUCENE-5951.patch
>
>
> E.g. ConcurrentMergeScheduler should default maxMergeThreads to 3 if it's on 
> SSD and 1 if it's on spinning disks.
> I think the new NIO2 APIs can let us figure out which device we are mounted 
> on, and from there maybe we can do os-specific stuff e.g. look at  
> /sys/block/dev/queue/rotational to see if it's spinning storage or not ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to