Skip to content

Conversation

@lyppg
Copy link
Collaborator

@lyppg lyppg commented Jan 28, 2025

  • add mempool usage info
  • extend mempool
  • add autoincrease arg

@lyppg lyppg requested a review from thesues January 28, 2025 01:22
src/config.h Outdated
std::string link_type;
int minimal_allocate_size; // unit: KB
int num_stream; // can only be 1,2,4, number of stream for each client
bool autoincrease;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auto_increase?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@lyppg lyppg requested a review from rainj-me January 28, 2025 22:18
ibv_mtu active_mtu;

bool extend_in_flight = false;
std::atomic<unsigned int> opened_ipc{0};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a comment to indicate the define and usage of opened_ipc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

src/mempool.cpp Outdated

auto total_blocks = mempools_[i]->get_total_blocks();
auto allocated_blocks = mempools_[i]->get_allocated_blocks();
INFO(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be DEBUG instead of INFO. if we have large number for mempool

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


#define BLOCK_USAGE_RATIO 0.5
#define EXTEND_POOL_SIZE 10 << 30
#define EXTEND_BLOCK_SIZE 64 << 10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a problem if the preallocated block size with 32k and the extend block_size as 64k ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

64K is the default minimal-allocate-size, if we consider this kind of details, it will take a lot of time... e.g., add more verification for the input parameters

prealloc_size (int): The preallocation size. Defaults to 16.
minimal_allocate_size (int): The minimal allocation size. Defaults to 64.
num_stream (int): The number of streams. Defaults to 1.
autoincrease (bool): indicate if infinistore will be automatically increased. 10GB each time. Default False.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend to set a cap for the dynamically allocated RAM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this parameter is just a flag to enable auto increase or not,

Copy link
Collaborator

@thesues thesues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lyppg lyppg merged commit 82a8e1e into main Jan 29, 2025
1 check failed
@thesues thesues deleted the extend_mempool branch February 15, 2025 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants