-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 7303: Adding changes for elastic thread pool for LTS processing #7304
base: master
Are you sure you want to change the base?
Issue 7303: Adding changes for elastic thread pool for LTS processing #7304
Conversation
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7304 +/- ##
=========================================
Coverage 85.97% 85.97%
- Complexity 16310 16313 +3
=========================================
Files 1042 1042
Lines 60994 61004 +10
Branches 6191 6191
=========================================
+ Hits 52437 52451 +14
+ Misses 5354 5353 -1
+ Partials 3203 3200 -3
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that both the PR and the original issue need more description of the purpose and expectations of this change. Also, I don't see how the tests are actually verifying the correct behavior of the thread pool dynamic number of threads. Finally, I think it would be required a performance comparison of Pravega with and without this change to see if it induces any regression.
common/src/main/java/io/pravega/common/concurrent/ThreadPoolExecutorConfig.java
Show resolved
Hide resolved
@@ -42,7 +42,9 @@ public class ServiceConfig { | |||
public static final Property<Integer> CONTAINER_COUNT = Property.named("container.count", null, "containerCount"); | |||
public static final Property<Integer> PARALLEL_CONTAINER_STARTS = Property.named("container.parallelStarts", 2); | |||
public static final Property<Integer> THREAD_POOL_SIZE = Property.named("threadPool.core.size", 30, "threadPoolSize"); | |||
public static final Property<Integer> STORAGE_THREAD_POOL_SIZE = Property.named("threadPool.storage.size", 200, "storageThreadPoolSize"); | |||
public static final Property<Integer> STORAGE_THREAD_POOL_SIZE = Property.named("threadPool.storage.size", 50, "storageThreadPoolSize"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are changing default thread pool sizes without any evidence on how this is going to impact the performance of moving data to LTS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raised this PR for review, meanwhile I will be running the performance.
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceConfig.java
Outdated
Show resolved
Hide resolved
@@ -64,7 +64,7 @@ public void testGetDetectionLevel() { | |||
|
|||
@Test | |||
public void testScheduledThreadPoolLeak() { | |||
testLeaks(factory -> (ThreadPoolScheduledExecutorService) factory.newScheduledThreadPool(1, "test", 1)); | |||
testLeaks(factory -> (ThreadPoolScheduledExecutorService) factory.newScheduledThreadPool(new ThreadPoolExecutorConfig(1, 1), "test", 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be testing the "dynamic change" of threads. I think you may need to add new tests to check if the threads in the pool are changing according to what you expect.
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me.
I have some minor style/format related comments.
Please update the PR with basic details of outcome of performance verification/experiments.
Please add more unit tests to more directly verify case of elastic threadpool
common/src/main/java/io/pravega/common/concurrent/ThreadPoolExecutorConfig.java
Outdated
Show resolved
Hide resolved
common/src/main/java/io/pravega/common/concurrent/ExecutorServiceHelpers.java
Outdated
Show resolved
Hide resolved
common/src/main/java/io/pravega/common/concurrent/ThreadPoolExecutorConfig.java
Show resolved
Hide resolved
common/src/main/java/io/pravega/common/concurrent/ThreadPoolScheduledExecutorService.java
Outdated
Show resolved
Hide resolved
common/src/main/java/io/pravega/common/concurrent/ThreadPoolScheduledExecutorService.java
Outdated
Show resolved
Hide resolved
segmentstore/server/src/main/java/io/pravega/segmentstore/server/store/ServiceBuilder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Signed-off-by: Amit-Singh40 <amit.singh30@dell.com>
Change log description
Currently we use fixed sized to thread pool for the LTS which needs to changed to elastic thread pool which can grow and shrink accordingly.
Purpose of the change
Fixes #7303
What the code does
Enables elastic thread pool for LTS.
How to verify it
NA