<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:01 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-1779] &quot;finding median&quot; too slow.</title>
                <link>https://jira.mongodb.org/browse/SERVER-1779</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Here&apos;s some excerpt from the logs&lt;br/&gt;
Sun Sep 12 10:51:14 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 24430203 } and { : 25662603 } took 3161 ms.&lt;br/&gt;
Sun Sep 12 10:51:36 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 26814034 } and { : 27937206 } took 14448 ms.&lt;br/&gt;
Sun Sep 12 10:52:10 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 22297203 } and { : 23324407 } took 2012 ms.&lt;br/&gt;
Sun Sep 12 10:52:55 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 60706232 } and { : 62958603 } took 23454 ms.&lt;br/&gt;
Sun Sep 12 10:53:05 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 25662603 } and { : 26814034 } took 3050 ms.&lt;br/&gt;
Sun Sep 12 10:53:09 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 23324407 } and { : 24430203 } took 2804 ms.&lt;br/&gt;
Sun Sep 12 10:53:34 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 37270223 } and { : 38933407 } took 24029 ms.&lt;br/&gt;
Sun Sep 12 10:54:19 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 40766434 } and { : 42625800 } took 13718 ms.&lt;br/&gt;
Sun Sep 12 10:54:53 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 58696810 } and { : 60706232 } took 11311 ms.&lt;br/&gt;
Sun Sep 12 10:55:11 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 30362400 } and { : 31572033 } took 9520 ms.&lt;br/&gt;
Sun Sep 12 10:55:35 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 72665435 } and { : 96292200 } took 7396 ms.&lt;br/&gt;
Sun Sep 12 10:55:53 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 68727613 } and { : 72665435 } took 7880 ms.&lt;br/&gt;
Sun Sep 12 10:56:04 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 38933407 } and { : 40766434 } took 10045 ms.&lt;br/&gt;
Sun Sep 12 10:56:43 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 35630403 } and { : 37270223 } took 7486 ms.&lt;br/&gt;
Sun Sep 12 14:31:02 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn10&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 65599205 } and { : 68727613 } took 95402 ms.&lt;br/&gt;
Sun Sep 12 14:32:34 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn10&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 62958603 } and { : 65599205 } took 72608 ms.&lt;br/&gt;
Sun Sep 12 14:34:19 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 56850022 } and { : 58696810 } took 58778 ms.&lt;br/&gt;
Sun Sep 12 14:35:20 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 55276200 } and { : 56850022 } took 50957 ms.&lt;br/&gt;
Sun Sep 12 14:43:17 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 45860418 } and { : 47944851 } took 47859 ms.&lt;br/&gt;
Sun Sep 12 14:44:10 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 51170454 } and { : 52417803 } took 38282 ms.&lt;br/&gt;
Sun Sep 12 14:44:47 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 53762457 } and { : 55276200 } took 27610 ms.&lt;br/&gt;
Sun Sep 12 14:45:55 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 42625800 } and { : 44283041 } took 34589 ms.&lt;br/&gt;
Sun Sep 12 14:46:19 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 47944851 } and { : 49876203 } took 17147 ms.&lt;br/&gt;
Sun Sep 12 14:47:07 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 49876203 } and { : 51170454 } took 23866 ms.&lt;br/&gt;
Sun Sep 12 14:47:48 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 44283041 } and { : 45860418 } took 18224 ms.&lt;br/&gt;
Sun Sep 12 14:48:53 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 52417803 } and { : 53762457 } took 21154 ms.&lt;/p&gt;


&lt;p&gt;The indexes surely fit in memory. The whole DB does!&lt;/p&gt;

&lt;p&gt;&amp;gt; db.answers.stats()&lt;br/&gt;
{&lt;br/&gt;
	&quot;sharded&quot; : true,&lt;br/&gt;
	&quot;ns&quot; : &quot;pravdorub_production.answers&quot;,&lt;br/&gt;
	&quot;count&quot; : 273039209,&lt;br/&gt;
	&quot;size&quot; : 33919877756,&lt;br/&gt;
	&quot;avgObjSize&quot; : 124.23079410547223,&lt;br/&gt;
	&quot;storageSize&quot; : 39745093120,&lt;br/&gt;
	&quot;nindexes&quot; : 2,&lt;br/&gt;
	&quot;nchunks&quot; : 92,&lt;br/&gt;
	&quot;shards&quot; : {&lt;br/&gt;
		&quot;brussels&quot; : {&lt;br/&gt;
			&quot;ns&quot; : &quot;pravdorub_production.answers&quot;,&lt;br/&gt;
			&quot;count&quot; : 136990615,&lt;br/&gt;
			&quot;size&quot; : 17019609560,&lt;br/&gt;
			&quot;avgObjSize&quot; : 124.23923755652896,&lt;br/&gt;
			&quot;storageSize&quot; : 19872546560,&lt;br/&gt;
			&quot;numExtents&quot; : 40,&lt;br/&gt;
			&quot;nindexes&quot; : 2,&lt;br/&gt;
			&quot;lastExtentSize&quot; : 1991168256,&lt;br/&gt;
			&quot;paddingFactor&quot; : 1,&lt;br/&gt;
			&quot;flags&quot; : 1,&lt;br/&gt;
			&quot;totalIndexSize&quot; : 14175980928,&lt;br/&gt;
			&quot;indexSizes&quot; : &lt;/p&gt;
{
				&quot;_id_&quot; : 6682338992,
				&quot;uiq_1&quot; : 7493641936
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;ok&quot; : 1&lt;br/&gt;
		},&lt;br/&gt;
		&quot;moscow&quot; : {&lt;br/&gt;
			&quot;ns&quot; : &quot;pravdorub_production.answers&quot;,&lt;br/&gt;
			&quot;count&quot; : 136048594,&lt;br/&gt;
			&quot;size&quot; : 16900268196,&lt;br/&gt;
			&quot;avgObjSize&quot; : 124.22229219068592,&lt;br/&gt;
			&quot;storageSize&quot; : 19872546560,&lt;br/&gt;
			&quot;numExtents&quot; : 40,&lt;br/&gt;
			&quot;nindexes&quot; : 2,&lt;br/&gt;
			&quot;lastExtentSize&quot; : 1991168256,&lt;br/&gt;
			&quot;paddingFactor&quot; : 1,&lt;br/&gt;
			&quot;flags&quot; : 1,&lt;br/&gt;
			&quot;totalIndexSize&quot; : 13670329728,&lt;br/&gt;
			&quot;indexSizes&quot; : &lt;/p&gt;
{
				&quot;_id_&quot; : 6047942320,
				&quot;uiq_1&quot; : 7622387408
			}
&lt;p&gt;,&lt;br/&gt;
			&quot;ok&quot; : 1&lt;br/&gt;
		}&lt;br/&gt;
	},&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;


&lt;p&gt;&amp;gt; db.stats()&lt;br/&gt;
{&lt;br/&gt;
	&quot;raw&quot; : {&lt;br/&gt;
		&quot;brussels/moskau8:27018&quot; : &lt;/p&gt;
{
			&quot;collections&quot; : 3,
			&quot;objects&quot; : 137156015,
			&quot;avgObjSize&quot; : 124.23939636916398,
			&quot;dataSize&quot; : 17040180512,
			&quot;storageSize&quot; : 19872554752,
			&quot;numExtents&quot; : 42,
			&quot;indexes&quot; : 2,
			&quot;indexSize&quot; : 14192291200,
			&quot;fileSize&quot; : 45009076224,
			&quot;ok&quot; : 1
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;moscow/moskau7:27018&quot; : &lt;/p&gt;
{
			&quot;collections&quot; : 3,
			&quot;objects&quot; : 136252914,
			&quot;avgObjSize&quot; : 124.22246986952514,
			&quot;dataSize&quot; : 16925673504,
			&quot;storageSize&quot; : 19872554496,
			&quot;numExtents&quot; : 42,
			&quot;indexes&quot; : 2,
			&quot;indexSize&quot; : 13691178368,
			&quot;fileSize&quot; : 45009076224,
			&quot;ok&quot; : 1
		}
&lt;p&gt;	},&lt;br/&gt;
	&quot;objects&quot; : 273408929,&lt;br/&gt;
	&quot;avgObjSize&quot; : 124.23096107442782,&lt;br/&gt;
	&quot;dataSize&quot; : 33965854016,&lt;br/&gt;
	&quot;storageSize&quot; : 39745109248,&lt;br/&gt;
	&quot;numExtents&quot; : 84,&lt;br/&gt;
	&quot;indexes&quot; : 4,&lt;br/&gt;
	&quot;indexSize&quot; : 27883469568,&lt;br/&gt;
	&quot;fileSize&quot; : 90018152448,&lt;br/&gt;
	&quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;</description>
                <environment>ubuntu 9.10&lt;br/&gt;
24G RAM&lt;br/&gt;
&lt;br/&gt;
the db is on a RAID0 of 2 disks</environment>
        <key id="13074">SERVER-1779</key>
            <summary>&quot;finding median&quot; too slow.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="eliot">Eliot Horowitz</assignee>
                                    <reporter username="sergei.tulentsev@gmail.com">Sergei Tulentsev</reporter>
                        <labels>
                    </labels>
                <created>Sun, 12 Sep 2010 10:55:48 +0000</created>
                <updated>Tue, 16 Nov 2021 15:37:19 +0000</updated>
                            <resolved>Mon, 13 Sep 2010 17:04:39 +0000</resolved>
                                    <version>1.6.2</version>
                    <version>1.7.0</version>
                                    <fixVersion>1.7.1</fixVersion>
                                    <component>Performance</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="18095" author="eliot" created="Mon, 13 Sep 2010 17:12:37 +0000"  >&lt;p&gt;They won&apos;t block.&lt;br/&gt;
Its possible it could make the split point non-ideal - but the system already expects that can happen.&lt;/p&gt;</comment>
                            <comment id="18094" author="sergei.tulentsev@gmail.com" created="Mon, 13 Sep 2010 17:10:23 +0000"  >&lt;p&gt;Here&apos;s a question: after splitVector yielded, what happens to writes that affect records in the key range? Will they wait in the queue, not affecting other queries? Or will they block?&lt;/p&gt;</comment>
                            <comment id="18093" author="eliot" created="Mon, 13 Sep 2010 16:54:13 +0000"  >&lt;p&gt;Made splitVector yield - so even when it takes a long time - won&apos;t block.&lt;/p&gt;</comment>
                            <comment id="18092" author="auto" created="Mon, 13 Sep 2010 16:53:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: yield in splitVector so even if it takes a while won&apos;t block &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1779&quot; title=&quot;&amp;quot;finding median&amp;quot; too slow.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1779&quot;&gt;&lt;del&gt;SERVER-1779&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/5a4bfedb88fe94ed1a8de5eeeaf0b4985c22b4d8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/5a4bfedb88fe94ed1a8de5eeeaf0b4985c22b4d8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="18091" author="sergei.tulentsev@gmail.com" created="Mon, 13 Sep 2010 15:23:10 +0000"  >&lt;p&gt;That file doesn&apos;t even show up in the project tree. Interesting.&lt;/p&gt;


&lt;p&gt;And here is the new data from the field. 4 splits in a row.&lt;/p&gt;

&lt;p&gt;Mon Sep 13 19:17:12 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; Finding the split vector for pravdorub_production.answers over &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; keyCount: 845625 numSplits: 4 took 7238 ms.&lt;br/&gt;
Mon Sep 13 19:17:12 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { splitVector: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 22297203 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 22764634 }
&lt;p&gt;, maxChunkSizeBytes: 209715200 } reslen:137 7239ms&lt;/p&gt;


&lt;p&gt;Mon Sep 13 19:17:21 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; Finding the split vector for pravdorub_production.answers over &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; keyCount: 845625 numSplits: 4 took 5989 ms.&lt;br/&gt;
Mon Sep 13 19:17:21 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { splitVector: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 25036348 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 25662603 }
&lt;p&gt;, maxChunkSizeBytes: 209715200 } reslen:137 5990ms&lt;/p&gt;


&lt;p&gt;Mon Sep 13 19:17:28 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; Finding the split vector for pravdorub_production.answers over &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; keyCount: 845625 numSplits: 4 took 5955 ms.&lt;br/&gt;
Mon Sep 13 19:17:28 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { splitVector: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 25662603 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 26296816 }
&lt;p&gt;, maxChunkSizeBytes: 209715200 } reslen:137 5955ms&lt;/p&gt;


&lt;p&gt;Mon Sep 13 19:17:39 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; Finding the split vector for pravdorub_production.answers over &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; keyCount: 845625 numSplits: 4 took 10032 ms.&lt;br/&gt;
Mon Sep 13 19:17:39 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn15&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { splitVector: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 26296816 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 26814034 }
&lt;p&gt;, maxChunkSizeBytes: 209715200 } reslen:137 10033ms&lt;/p&gt;



&lt;p&gt;On another shard, however, it&apos;s a bit worse.&lt;br/&gt;
Mon Sep 13 19:17:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn11&amp;#93;&lt;/span&gt; Finding the split vector for pravdorub_production.answers over &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; keyCount: 845625 numSplits: 4 took 73671 ms.&lt;br/&gt;
Mon Sep 13 19:17:38 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn11&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { splitVector: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 21323400 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 21776428 }
&lt;p&gt;, maxChunkSizeBytes: 209715200 } reslen:137 74327ms&lt;/p&gt;


&lt;p&gt;Just to remind: this is happening under heavy write load. One mongos is mongoimporting data as fast as he can.&lt;/p&gt;</comment>
                            <comment id="18090" author="eliot" created="Mon, 13 Sep 2010 14:27:04 +0000"  >&lt;p&gt;xcode...&lt;/p&gt;


&lt;p&gt;erh@erh-tm1 ~/work/mongo -&amp;gt; git grep &quot;doing delete inline&quot;&lt;br/&gt;
s/d_migrate.cpp:                    log() &amp;lt;&amp;lt; &quot;doing delete inline&quot; &amp;lt;&amp;lt; endl;&lt;/p&gt;</comment>
                            <comment id="18089" author="sergei.tulentsev@gmail.com" created="Mon, 13 Sep 2010 14:23:51 +0000"  >&lt;p&gt;Nope, mongos didn&apos;t get upgraded. &lt;br/&gt;
Will report later. &lt;/p&gt;

&lt;p&gt;By the way, I tried searching in the sources by the message text, like &quot;Finding median&quot; or &quot;doing delete inline&quot; and founc nothing. Either my XCode can&apos;t search or these strings are not there. Which is it? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="18088" author="eliot" created="Mon, 13 Sep 2010 14:19:41 +0000"  >&lt;p&gt;Did you upgrade mongos and mongod?&lt;br/&gt;
Shouldn&apos;t be getting that medianKey message at all with this build&lt;/p&gt;</comment>
                            <comment id="18087" author="sergei.tulentsev@gmail.com" created="Mon, 13 Sep 2010 14:11:38 +0000"  >&lt;p&gt;Yes, I saw your commit.&lt;/p&gt;

&lt;p&gt;sergio@cs2607:~$ mongod --version&lt;br/&gt;
db version v1.7.1-pre-, pdfile version 4.5&lt;br/&gt;
Mon Sep 13 18:10:46 git version: 03a596e18b839a452b935141c329e4a1a6fa9b9f&lt;/p&gt;</comment>
                            <comment id="18086" author="eliot" created="Mon, 13 Sep 2010 14:10:00 +0000"  >&lt;p&gt;Can you send the git hash of the version you&apos;re running.&lt;br/&gt;
It got pushed at 7:30 am eastern today&lt;/p&gt;</comment>
                            <comment id="18085" author="sergei.tulentsev@gmail.com" created="Mon, 13 Sep 2010 14:07:01 +0000"  >&lt;p&gt;There&apos;s nothing new in logs from the last nightly. I guess, your change didn&apos;t make it in.&lt;/p&gt;


&lt;p&gt;Mon Sep 13 16:39:57 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding median for index: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt; between { : 51170454 } and { : 52417803 } took 29713 ms.&lt;br/&gt;
Mon Sep 13 16:39:57 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; query admin.$cmd ntoreturn:1 command: { medianKey: &quot;pravdorub_production.answers&quot;, keyPattern: &lt;/p&gt;
{ uiq: 1.0 }
&lt;p&gt;, min: &lt;/p&gt;
{ uiq: 51170454 }
&lt;p&gt;, max: &lt;/p&gt;
{ uiq: 52417803 }
&lt;p&gt; } reslen:75 29743ms&lt;br/&gt;
Mon Sep 13 16:39:57 &lt;span class=&quot;error&quot;&gt;&amp;#91;conn6&amp;#93;&lt;/span&gt; Finding size for ns: pravdorub_production.answers between { : 51170454 } and { : 52417803 } took 432 ms.&lt;/p&gt;


&lt;p&gt;When you test it on your laptop, do you have some other activity going on? Like heavy writing? &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

&lt;p&gt;I don&apos;t really mind if it takes a minute to find median key. I just hate that it blocks the whole thing.&lt;/p&gt;

&lt;p&gt;We definitely need some better granularity for locks.&lt;/p&gt;</comment>
                            <comment id="18084" author="eliot" created="Mon, 13 Sep 2010 13:58:24 +0000"  >&lt;p&gt;Counted b-trees are a possibility - but a long term thing to look at.&lt;/p&gt;

&lt;p&gt;Your case still doesn&apos;t make sense because on my laptop - i can scan the equivalent number of index nodes in &amp;lt; 2 secs consistently.&lt;/p&gt;

&lt;p&gt;Can you try last night&apos;s nightly?  The change above should tell us what the problem is even if it doesn&apos;t fix it.&lt;/p&gt;</comment>
                            <comment id="18076" author="hmeiser" created="Mon, 13 Sep 2010 07:24:43 +0000"  >&lt;p&gt;I guess  the main problem is the search for the media. In d_split a complete index scan is made (exactly 1 + 1/2) to find the median.&lt;br/&gt;
I think this can be slow with many entries in btree.&lt;br/&gt;
Could you use a solution as mentioned in &lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/algorithms/cbtree.html?&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.chiark.greenend.org.uk/~sgtatham/algorithms/cbtree.html?&lt;/a&gt;&lt;br/&gt;
This also could speedup the skip&lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/thumbs_down.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; command with large n&lt;br/&gt;
If you only store counts in the nodes then overhead is negligible.&lt;/p&gt;</comment>
                            <comment id="18067" author="auto" created="Sun, 12 Sep 2010 22:24:53 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;login&apos;: &apos;erh&apos;, &apos;name&apos;: &apos;Eliot Horowitz&apos;, &apos;email&apos;: &apos;eliot@10gen.com&apos;}
&lt;p&gt;Message: use splitVector instead of datasize and mediankey.  1 command vs. 2 and should be faster and more extensible.&lt;br/&gt;
still some code cleanup to do probably&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1550&quot; title=&quot;Reorder ops in Chunk::_splitIfShould&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1550&quot;&gt;&lt;del&gt;SERVER-1550&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1779&quot; title=&quot;&amp;quot;finding median&amp;quot; too slow.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1779&quot;&gt;&lt;del&gt;SERVER-1779&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;http://github.com/mongodb/mongo/commit/2418da510eaf2fc5d1661ba816942086dfc9090e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://github.com/mongodb/mongo/commit/2418da510eaf2fc5d1661ba816942086dfc9090e&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>14.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sun, 12 Sep 2010 22:24:53 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 23 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 23 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>hmeiser</customfieldvalue>
            <customfieldvalue>sergei.tulentsev@gmail.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpf9j:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrijbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>21782</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht0hlb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>