Skip to content

Commit

Permalink
Add comments explaining why max supported number of read-only threads…
Browse files Browse the repository at this point in the history
… can be increased
  • Loading branch information
linh2931 committed Sep 8, 2023
1 parent 8a571d8 commit 920f325
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/producer_plugin/producer_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,12 @@ class producer_plugin_impl : public std::enable_shared_from_this<producer_plugin
};

uint32_t _ro_thread_pool_size{0};
// In EOS VM OC tierup, 10 pages (11 slices) virtual memory is reserved for
// each read-only thread and 528 pages (529 slices) for the main-thread memory.
// With maximum 128 read-only threads, virtual memory required by OC is
// 15TB (OC's main thread uses 4TB VM (by 529 slices) and the read-only
// threads use 11TB (128 * 11 * 8GB)). It is about 11.7% of total VM space
// in a 64-bit Linux machine (about 128TB).
static constexpr uint32_t _ro_max_threads_allowed{128};
named_thread_pool<struct read> _ro_thread_pool;
fc::microseconds _ro_write_window_time_us{200000};
Expand Down

0 comments on commit 920f325

Please sign in to comment.