Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Essential column family performance


+
James Taylor 2013-04-07, 06:05
+
Ted Yu 2013-04-07, 14:44
+
James Taylor 2013-04-07, 18:37
+
Ted Yu 2013-04-07, 23:03
+
Ted Yu 2013-04-07, 23:13
+
lars hofhansl 2013-04-08, 03:52
+
Ted Yu 2013-04-08, 14:49
+
Anoop John 2013-04-08, 17:10
+
James Taylor 2013-04-08, 17:38
+
Ted Yu 2013-04-08, 17:42
+
Ted Yu 2013-04-08, 18:02
+
ramkrishna vasudevan 2013-04-08, 17:51
+
Sergey Shelukhin 2013-04-08, 20:34
+
Ted Yu 2013-04-08, 21:15
+
lars hofhansl 2013-04-08, 21:41
+
James Taylor 2013-04-09, 01:53
Copy link to this message
-
Re: Essential column family performance
We did some tests here.
I ran this through the profiler against a local RegionServer and found the part that causes the slowdown is a seek called here:
             boolean mayHaveData               (nextJoinedKv != null && nextJoinedKv.matchingRow(currentRow, offset, length))
              || (this.joinedHeap.seek(KeyValue.createFirstOnRow(currentRow, offset, length))
                  && joinedHeap.peek() != null
                  && joinedHeap.peek().matchingRow(currentRow, offset, length));

Looking at the code, this is needed because the joinedHeap can fall behind, and hence we have to catch it up.
The key observation, though, is that the joined heap can only ever be behind, and hence we do not need a seek, but only a reseek.

Deploying a RegionServer with the seek replaced with reseek we see an improvement in *all* cases.

I'll file a jira with a fix later.

-- Lars

________________________________
 From: James Taylor <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Monday, April 8, 2013 6:53 PM
Subject: Re: Essential column family performance
 
Good idea, Sergey. We'll rerun with larger non essential column family
values and see if there's a crossover point. One other difference for us
is that we're using FAST_DIFF encoding. We'll try with no encoding too.
Our table has 20 million rows across four regions servers.

Regarding the parallelization we do, we run multiple scans in parallel
instead of one single scan over the table. We use the region boundaries
of the table to divide up the work evenly, adding a start/stop key for
each scan that corresponds to the region boundaries. Our client then
does a final merge/aggregation step (i.e. adding up the count it gets
back from the scan for each region).

On 04/08/2013 01:34 PM, Sergey Shelukhin wrote:
> IntegrationTestLazyCfLoading uses randomly distributed keys with the
> following condition for filtering:
> 1 == (Long.parseLong(Bytes.toString(rowKey, 0, 4), 16) & 1); where rowKey
> is hex string of MD5 key.
> Then, there are 2 "lazy" CFs, each of which has a value of 4-64k.
> This test also showed significant improvement IIRC, so random distribution
> and high %%ge of values selected should not be a problem as such.
>
> My hunch would be that the additional cost of seeks/merging the results
> from two CFs outweights the benefit of lazy loading on such small values
> for the "lazy" CF with lots of data selected. This feature definitely makes
> no sense if you are selecting all values, because then extra work is being
> done for no benefit (everything is read anyway).
> So the use cases would be larger "lazy" CFs or/and low percentage of values
> selected.
>
> Can you try to increase the 2nd CF values' size and rerun the test?
>
>
> On Mon, Apr 8, 2013 at 10:38 AM, James Taylor <[EMAIL PROTECTED]>wrote:
>
>> In the TestJoinedScanners.java, is the 40% randomly distributed or
>> sequential?
>>
>> In our test, the % is randomly distributed. Also, our custom filter does
>> the same thing that SingleColumnValueFilter does.  On the client-side, we'd
>> execute the query in parallel, through multiple scans along the region
>> boundaries. Would that have a negative impact on performance for this
>> "essential column family" feature?
>>
>> Thanks,
>>
>>      James
>>
>>
>> On 04/08/2013 10:10 AM, Anoop John wrote:
>>
>>> Agree here. The effectiveness depends on what % of data satisfies the
>>> condition, how it is distributed across HFile blocks. We will get
>>> performance gain when the we will be able to skip some HFile blocks (from
>>> non essential CFs). Can test with different HFile block size (lower
>>> value)?
>>>
>>> -Anoop-
>>>
>>>
>>> On Mon, Apr 8, 2013 at 8:19 PM, Ted Yu <[EMAIL PROTECTED]> wrote:
>>>
>>>   I made the following change in TestJoinedScanners.java:
>>>> -      int flag_percent = 1;
>>>> +      int flag_percent = 40;
>>>>
>>>> The test took longer but still favors joined scanner.
>>>> I got some new results:
>>>>
>>>> 2013-04-08 07:46:06,959 INFO  [main] regionserver.**
+
Ted Yu 2013-04-10, 00:03
+
Ted Yu 2013-04-09, 02:51
+
Jean-Marc Spaggiari 2013-04-08, 17:19
+
Ted Yu 2013-04-08, 17:23
+
Michael Segel 2013-04-08, 18:07
+
lars hofhansl 2013-04-08, 21:29
+
Lars Hofhansl 2013-04-10, 01:17
+
Ted Yu 2013-04-10, 01:21
+
Ted Yu 2013-04-10, 04:03
+
lars hofhansl 2013-04-10, 04:16
+
Anoop Sam John 2013-04-10, 05:30
+
lars hofhansl 2013-04-10, 23:02
+
Stack 2013-04-10, 23:35
+
Ted Yu 2013-04-10, 23:05
+
Lars H 2013-04-10, 01:05