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/03/25 01:10:01 UTC

[kudu-CR] write transaction: allocate RowOp objects from the arena

Hello David Ribeiro Alves,

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

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

to review the following change.

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................

write_transaction: allocate RowOp objects from the arena

This improves the memory locality of write transactions by making all of
the RowOps in a batch come from the transaction's arena. Additionally
this reduces contention on tcmalloc since the arena grabs memory in
bulk.

I didn't benchmark this before/after, but in various write stress
testing this made a bit of a difference in cache miss rates and CPU time
spent in RowOp code.

Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/tablet/transactions/write_transaction.h
3 files changed, 18 insertions(+), 13 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>

[kudu-CR] write transaction: allocate RowOp objects from the arena

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6480/2/src/kudu/tablet/transactions/write_transaction.h
File src/kudu/tablet/transactions/write_transaction.h:

PS2, Line 161: void SetRowOps(std::vector<DecodedRowOperation> decoded_ops);
docs


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes

[kudu-CR] write transaction: allocate RowOp objects from the arena

Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6480/2/src/kudu/tablet/transactions/write_transaction.h
File src/kudu/tablet/transactions/write_transaction.h:

PS2, Line 161: void SetRowOps(std::vector<DecodedRowOperation> decoded_ops);
> docs
Done


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes

[kudu-CR] write transaction: allocate RowOp objects from the arena

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

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................


write_transaction: allocate RowOp objects from the arena

This improves the memory locality of write transactions by making all of
the RowOps in a batch come from the transaction's arena. Additionally
this reduces contention on tcmalloc since the arena grabs memory in
bulk.

I didn't benchmark this before/after, but in various write stress
testing this made a bit of a difference in cache miss rates and CPU time
spent in RowOp code.

Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Reviewed-on: http://gerrit.cloudera.org:8080/6480
Reviewed-by: David Ribeiro Alves <dr...@apache.org>
Tested-by: Kudu Jenkins
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/tablet/transactions/write_transaction.h
3 files changed, 19 insertions(+), 13 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] write transaction: allocate RowOp objects from the arena

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

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

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

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

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................

write_transaction: allocate RowOp objects from the arena

This improves the memory locality of write transactions by making all of
the RowOps in a batch come from the transaction's arena. Additionally
this reduces contention on tcmalloc since the arena grabs memory in
bulk.

I didn't benchmark this before/after, but in various write stress
testing this made a bit of a difference in cache miss rates and CPU time
spent in RowOp code.

Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
---
M src/kudu/tablet/tablet.cc
M src/kudu/tablet/transactions/write_transaction.cc
M src/kudu/tablet/transactions/write_transaction.h
3 files changed, 19 insertions(+), 13 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>

[kudu-CR] write transaction: allocate RowOp objects from the arena

Posted by "David Ribeiro Alves (Code Review)" <ge...@cloudera.org>.
David Ribeiro Alves has posted comments on this change.

Change subject: write_transaction: allocate RowOp objects from the arena
......................................................................


Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e7969423c057f9bf1169fe066819228c59ed269
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: David Ribeiro Alves <dr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No