impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailesh Mukil (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4456: Address scalability issues of qs map lock and client request state map lock
Date Wed, 25 Oct 2017 22:48:30 GMT
Sailesh Mukil has posted comments on this change. ( )

Change subject: IMPALA-4456: Address scalability issues of qs_map_lock_ and client_request_state_map_lock_

Patch Set 4:


> Feel free to ignore, but I'm curious if you tried out SpinLock too.
 > be/src/benchmarks/ shows that it is somehow more
 > efficient than boost::mutex under contention.

Using SpinLock shows better performance in the general case. So, I've switched qs_map_lock_
to use spin locks. I haven't done the same for client_request_state_map_lock_, since the access
patterns may be different, and it would be best to confirm with a benchmark first before making
a decision. I can add a benchmark in a follow on patch.
Commit Message:
PS3, Line 30: sharded to a default of 4 buckets initally.
> nit: sharded
File be/src/runtime/
PS3, Line 84: DEFINE_int32(log_mem_usage_interval, 0, "If non-zero, impalad will output memory
usage "
            :     "every log_mem_usage_interval'th fragment complet
> Would it make sense to write a helper so that this code could look like:
Yup, that would make more sense. I've added a ScopedQueryStateMap {} class that locks/unlocks
the appropriate map(bucket) on scope entry/exit respectively.

I added a similar class ScopedCRSMap in impala-server.h/cc.
File be/src/service/
PS3, Line 244:   stringstream ss;
> 4 should be the constant here, no?
Yup, changed it.
File be/src/service/impala-server.h:
PS3, Line 562:   /// ClientRequestState's deletion. Also writes the query profile to the profile
> nit: corresponding

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I61089090e1095da45a8a64ed3ccc78bd310807f1
Gerrit-Change-Number: 8363
Gerrit-PatchSet: 4
Gerrit-Owner: Sailesh Mukil <>
Gerrit-Reviewer: Philip Zeyliger <>
Gerrit-Reviewer: Sailesh Mukil <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-Comment-Date: Wed, 25 Oct 2017 22:48:30 +0000
Gerrit-HasComments: Yes

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message