Skip to content

Commit

Permalink
fix(iobuf): fixup large iobuf pool size
Browse files Browse the repository at this point in the history
Addresses warning from spdk itself:
mayastor::spdk:transport.c:282]
The num_shared_buffers value (2048) is larger than the available iobuf pool size (1024).
 Please increase the iobuf pool sizes.

Also reduce size to power of 2 - 1 as recommended in spdk ticket:
It’s always best to specify a value for –n that is one less than a power of two (2^x -1)
because of the way rings work in DPDK. You end up allocating a ring twice the size for
the one extra element between 511 and 512 for example.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
  • Loading branch information
tiagolobocastro committed Nov 23, 2023
1 parent d7d71f9 commit a822638
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io-engine/src/subsys/config/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl Default for NvmfTcpTransportOpts {
"NVMF_TCP_MAX_QPAIRS_PER_CTRL",
32,
),
num_shared_buf: try_from_env("NVMF_TCP_NUM_SHARED_BUF", 2048),
num_shared_buf: try_from_env("NVMF_TCP_NUM_SHARED_BUF", 2047),
buf_cache_size: try_from_env("NVMF_TCP_BUF_CACHE_SIZE", 64),
dif_insert_or_strip: false,
max_aq_depth: 32,
Expand Down Expand Up @@ -668,7 +668,7 @@ impl Default for IoBufOpts {
fn default() -> Self {
Self {
small_pool_count: try_from_env("IOBUF_SMALL_POOL_COUNT", 8192),
large_pool_count: try_from_env("IOBUF_LARGE_POOL_COUNT", 1024),
large_pool_count: try_from_env("IOBUF_LARGE_POOL_COUNT", 2047),
small_bufsize: try_from_env("IOBUF_SMALL_BUFSIZE", 8 * 1024),
large_bufsize: try_from_env("IOBUF_LARGE_BUFSIZE", 132 * 1024),
}
Expand Down

0 comments on commit a822638

Please sign in to comment.