Skip to content

Commit

Permalink
recover processing threads calc and hardcode num connections
Browse files Browse the repository at this point in the history
  • Loading branch information
ljblancoredborder committed Jan 24, 2025
1 parent 85aec2e commit 902b389
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/providers/broker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@
heap_broker_memory_kb = 0

# Compute the number of processing threads based on CPUs
processing_threads = 50
processing_threads = cpu_num > 1 ? [ [cpu_num, 8].min.to_i - 1, 1 ].max : 1 if processing_threads.nil?

# Compute http server num threads
http_num_threads = 20

# Compute the number of http connections
http_num_connections = 50

# Compute the heap memory, the processing buffer memory and the offheap memory
heap_broker_memory_kb, processing_memory_buffer_b = compute_memory(memory_kb, processing_threads)
offheap_broker_memory_kb = (processing_memory_buffer_b * (processing_threads + 1) / 1024).to_i
Expand Down

0 comments on commit 902b389

Please sign in to comment.