Skip to content
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

(feat) configure the number of processors #180 #181

Merged
merged 1 commit into from
Jun 13, 2019

Conversation

fengjiachun
Copy link
Contributor

Motivation:

In cases when an application is running in a container or is otherwise
constrained to the number of processors that it is using, the JVM
invocation Runtime#availableProcessors will not return the constrained value but rather the number of processors available to the virtual machine. SOFAJRaft uses this number in sizing various resources.
Additionally, some applications will constrain the number of threads
that they are using independenly of the number of processors available
on the system.
Thus, applications should have a way to globally configure the number of processors.

Modification:

Result:

Fixes #180

@killme2008 killme2008 merged commit 2da5c83 into feat/event_loop Jun 13, 2019
@killme2008 killme2008 deleted the feat/conf_num_of_processors branch June 13, 2019 09:50
killme2008 pushed a commit that referenced this pull request Jul 5, 2019
* (feat) add FixedThreadsExecutorGroup #168

* (feat) rename method

* (feat) add MpscSingleThreadExecutor and benchmark #168

* (fix) forget to warmup producers

* (fix) fix some bugs and add unit test

* (fix) add more unit test

* (fix) add more unit test

* (fix) add more unit test

* (fix) add some comments

* (fix) unit test

* (fix) add some comments

* (fix) refactoring Utils class

* (fix) refactoring Utils class

* (fix) jraft.closure.threadpool.size.max update default value

* (fix) fix unit test

* (fix) fix unit test

* (feat) refactor ThreadId and replicator (#169)

* (feat) refactor ThreadId and replicator

* (feat) Adds javadoc

* (feat) add pooled buf allocator (#161)

* (feat) add AdaptiveBufAllocator

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (fix) rename method name

* (fix) minor fix

* (fix) add metric for recyclers (#164)

* (fix) add metric for recyclers

* (fix) add metric for ByteBufferCollector.capacity

* (fix) code format

* (fix) by review comment

* feat/zero copy with replicator (#167)

* (fix) zero copy with replicator

* (fix) support zero copy and add benchmark

* (fix) rename field

* (fix) rm zero copy and unnecessary metric

* (fix) by review comment

* (feat) add unit test AdaptiveBufAllocatorTest

* (feat) add unit test RecyclersTest

* (feat) add unit test RecyclableByteBufferListTest

* (feat) add unit test ByteBufferCollectorTest

* Add unit tests for com.alipay.sofa.jraft.util.BytesUtil (#166)

These tests were written using Diffblue Cover.

* (fix) Utils.java format

* (feat) add FixedThreadsExecutorGroup #168

* (feat) rename method

* (feat) add MpscSingleThreadExecutor and benchmark #168

* (fix) forget to warmup producers

* (fix) fix some bugs and add unit test

* (fix) add more unit test

* (fix) add more unit test

* (fix) add more unit test

* (fix) add some comments

* (fix) unit test

* (fix) add some comments

* (fix) refactoring Utils class

* (fix) refactoring Utils class

* (fix) jraft.closure.threadpool.size.max update default value

* (fix) fix unit test

* (fix) fix unit test

* (feat) add pooled buf allocator (#161)

* (feat) add AdaptiveBufAllocator

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (feat) pooled for ByteBufferCollector #158

* (fix) rename method name

* (fix) minor fix

* (fix) add metric for recyclers (#164)

* (fix) add metric for recyclers

* (fix) add metric for ByteBufferCollector.capacity

* (fix) code format

* (fix) by review comment

* feat/zero copy with replicator (#167)

* (fix) zero copy with replicator

* (fix) support zero copy and add benchmark

* (fix) rename field

* (fix) rm zero copy and unnecessary metric

* (fix) by review comment

* (feat) add unit test AdaptiveBufAllocatorTest

* (feat) add unit test RecyclersTest

* (feat) add unit test RecyclableByteBufferListTest

* (feat) add unit test ByteBufferCollectorTest

* (fix) Utils.java format

* (fix) fix bad key with executor map

* (fix) bad import

* (fix) fix unit test

* (feat) add mor benchmark

* (fix) code format

* (fix) code format

* (fix) benchmark with jmh

* (fix) benchmark with jmh

* (fix) set common daemon

* (fix) fix unit test

* (fix) should be no radical changes, especially if they are not fully tested.

* (feat) add jctools

* (feat) configure the number of processors #180 (#181)

* (fix) format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants