You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2017/10/09 21:28:03 UTC

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Hello Dan Burkert,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/8239

to review the following change.


Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
12 files changed, 19 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/8239/1
-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 1:

(1 comment)

Just passing through...

http://gerrit.cloudera.org:8080/#/c/8239/1/src/kudu/util/memory/arena.cc
File src/kudu/util/memory/arena.cc:

http://gerrit.cloudera.org:8080/#/c/8239/1/src/kudu/util/memory/arena.cc@50
PS1, Line 50:                             max_buffer_size,
Shouldn't this be initial_buffer_size?



-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Comment-Date: Mon, 09 Oct 2017 21:36:47 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, David Ribeiro Alves, Kudu Jenkins, Adar Dembo, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8239

to look at the new patch set (#5).

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
12 files changed, 19 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/8239/5
-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 5
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc
File src/kudu/util/memory/arena.cc:

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc@42
PS4, Line 42: 1024 * 1024
> I don't have a notion of whats the proportion of the places where you chang
yea, I thought about changing this to either use a default value or to not have the parameter at all (and just use 1MB everywhere). But I think there are actually some reasons to prefer small or large for different arena use cases so I wanted to leave it. Mind if I defer this so that this can be a simple change that's backportable?



-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 5
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Oct 2017 21:14:31 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 3:

> Patch Set 3: Verified-1
> 
> Build Failed 
> 
> http://jenkins.kudu.apache.org/job/kudu-gerrit/10261/ : FAILURE

appears that RaftConsensusITest.TestLargeBatches fails reliably in TSAN with this patch. Odd...


-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Oct 2017 07:31:34 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc
File src/kudu/util/memory/arena.cc:

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc@42
PS4, Line 42: 1024 * 1024
> yea, I thought about changing this to either use a default value or to not 
I see the point of allowing this to be set to specific values in some places, though it seems the default is used in most places.
Makes sense to keep this one back-portable but it'd be nice to also have the cleanup handy so that we can fix this on master. Think it'll be too much work to also post that patch instead of deferring indeterminately?



-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 4
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Oct 2017 22:29:55 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 5:

ok, posted the patch here: http://gerrit.cloudera.org:8080/8269


-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 5
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Fri, 13 Oct 2017 01:57:43 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc
File src/kudu/util/memory/arena.cc:

http://gerrit.cloudera.org:8080/#/c/8239/4/src/kudu/util/memory/arena.cc@42
PS4, Line 42: 1024 * 1024
I don't have a notion of whats the proportion of the places where you changed this vs the rest. If it's high, i.e. if you've changed this in the majority of places maybe we should come up with a flag or something that would set this for most cases and maybe justify when we chose a different value? it's messy to have all these magical numbers sprinkled all over the code base



-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 4
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Oct 2017 20:50:21 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, Adar Dembo, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8239

to look at the new patch set (#2).

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
12 files changed, 19 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/8239/2
-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 5: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 5
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Tue, 10 Oct 2017 22:47:21 +0000
Gerrit-HasComments: No

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, Kudu Jenkins, Adar Dembo, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8239

to look at the new patch set (#4).

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/integration-tests/raft_consensus-itest.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
13 files changed, 23 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/8239/4
-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 4
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/8239/1/src/kudu/util/memory/arena.cc
File src/kudu/util/memory/arena.cc:

http://gerrit.cloudera.org:8080/#/c/8239/1/src/kudu/util/memory/arena.cc@50
PS1, Line 50:                             max_buffer_size,
> Shouldn't this be initial_buffer_size?
woops. yes.



-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Comment-Date: Mon, 09 Oct 2017 22:26:09 +0000
Gerrit-HasComments: Yes

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/8239 )

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Reviewed-on: http://gerrit.cloudera.org:8080/8239
Tested-by: Kudu Jenkins
Reviewed-by: David Ribeiro Alves <da...@gmail.com>
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
12 files changed, 19 insertions(+), 20 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  David Ribeiro Alves: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 6
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <da...@gmail.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] KUDU-2184. Avoid allocations larger than 1MB

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Dan Burkert, Kudu Jenkins, Adar Dembo, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/8239

to look at the new patch set (#3).

Change subject: KUDU-2184. Avoid allocations larger than 1MB
......................................................................

KUDU-2184. Avoid allocations larger than 1MB

tcmalloc doesn't perform well for allocations larger than 1MB[1]. We
currently use large allocations for full arenas (in particular the MRS)
which can cause large latency blips when a thread tries to allocate a
new arena component.

This just changes the max buffer size for all arenas to be 1MB and adds
a DCHECK so we avoid this problem in the future.

Additionally I increased the buffer size for the /memz output so that we
can get more stats on the occupancy of different allocator size classes.

[1] https://github.com/gperftools/gperftools/issues/535

Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
---
M src/kudu/cfile/binary_dict_block.cc
M src/kudu/cfile/cfile-test-base.h
M src/kudu/cfile/cfile-test.cc
M src/kudu/cfile/cfile_util.cc
M src/kudu/server/default-path-handlers.cc
M src/kudu/tablet/concurrent_btree.h
M src/kudu/tablet/deltamemstore.cc
M src/kudu/tablet/memrowset.cc
M src/kudu/tablet/tablet-test-base.h
M src/kudu/tablet/tablet_random_access-test.cc
M src/kudu/tablet/transactions/transaction.cc
M src/kudu/util/memory/arena.cc
12 files changed, 19 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/8239/3
-- 
To view, visit http://gerrit.cloudera.org:8080/8239
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I19c8ae9ce268e2623a89624e19db673931a093c0
Gerrit-Change-Number: 8239
Gerrit-PatchSet: 3
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <da...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>