File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 3
3
* Fixed example broker's invalid sync connack call (#869 )
4
4
* Added no CONNACK sending mode to the example broker (#869 )
5
5
* Added posting code to acceptors (#867 )
6
- * Added io_context and threads setting options for example broker (#866 , #871 )
6
+ * Added io_context and threads setting options for example broker (#866 , #871 , # 872 )
7
7
* Fixed moved from object access (#865 )
8
8
* <<<< breaking change >>>> Removed ioc_con() and ioc_accept() (#866 )
9
9
* <<<< breaking change >>>> Unified automatic async/sync choosing flag. (#857 , #862 )
Original file line number Diff line number Diff line change @@ -3,8 +3,13 @@ verbose=1
3
3
certificate=server.crt.pem
4
4
private_key=server.key.pem
5
5
6
- iocs=1
7
- threads_per_ioc=1
6
+ # 0 means automatic
7
+ # Num of vCPU
8
+ iocs=0
9
+
10
+ # 0 means automatic
11
+ # min(4 or Num of vCPU)
12
+ threads_per_ioc=0
8
13
9
14
# Reload interval for the certificate and private key files (hours)
10
15
# When configured the broker will perform automatic loading of
Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ void run_broker(boost::program_options::variables_map const& vm) {
350
350
return 1 ;
351
351
} ();
352
352
if (threads_per_ioc == 0 ) {
353
- threads_per_ioc = std::max (std::size_t (std::thread::hardware_concurrency ()), std::size_t (4 ));
353
+ threads_per_ioc = std::min (std::size_t (std::thread::hardware_concurrency ()), std::size_t (4 ));
354
354
MQTT_LOG (" mqtt_broker" , info) << " threads_per_ioc set to auto decide (0). Automatically set to " << threads_per_ioc;
355
355
}
356
356
You can’t perform that action at this time.
0 commit comments