Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
b628ea47
Commit
b628ea47
authored
Mar 06, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit number of BASP workers to 1-4 by default
parent
15a0b49f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
examples/caf-application.ini
examples/caf-application.ini
+3
-2
libcaf_core/src/defaults.cpp
libcaf_core/src/defaults.cpp
+4
-2
No files found.
examples/caf-application.ini
View file @
b628ea47
...
...
@@ -56,8 +56,9 @@ manual-multiplexing=false
disable-tcp
=
false
; enable communication via UDP
enable-udp
=
false
; configures how many background workers are spawned for deserialization
workers
=
<number of cores / 4>
; configures how many background workers are spawned for deserialization,
; by default CAF uses 1-4 workers depending on the number of cores
workers
=
<max(3, number of cores / 4) + 1>
; when compiling with logging enabled
[logger]
...
...
libcaf_core/src/defaults.cpp
View file @
b628ea47
...
...
@@ -23,6 +23,8 @@
#include <limits>
#include <thread>
using
std
::
max
;
namespace
{
using
us_t
=
std
::
chrono
::
microseconds
;
...
...
@@ -54,7 +56,7 @@ namespace scheduler {
const
atom_value
policy
=
atom
(
"stealing"
);
string_view
profiling_output_file
=
""
;
const
size_t
max_threads
=
std
::
max
(
std
::
thread
::
hardware_concurrency
(),
4u
);
const
size_t
max_threads
=
max
(
std
::
thread
::
hardware_concurrency
(),
4u
);
const
size_t
max_throughput
=
std
::
numeric_limits
<
size_t
>::
max
();
const
timespan
profiling_resolution
=
ms
(
100
);
...
...
@@ -92,7 +94,7 @@ const size_t max_consecutive_reads = 50;
const
size_t
heartbeat_interval
=
0
;
const
size_t
cached_udp_buffers
=
10
;
const
size_t
max_pending_msgs
=
10
;
const
size_t
workers
=
std
::
thread
::
hardware_concurrency
()
/
4
;
const
size_t
workers
=
max
(
3u
,
std
::
thread
::
hardware_concurrency
()
/
4u
)
+
1
;
}
// namespace middleman
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment