Skip to content

Add write-messages-to-file option. - #134

Open
apegushin wants to merge 1 commit into
Mellanox:sockperf_v2from
apegushin:anpegush_filewrite_full
Open

Add write-messages-to-file option.#134
apegushin wants to merge 1 commit into
Mellanox:sockperf_v2from
apegushin:anpegush_filewrite_full

Conversation

@apegushin

Copy link
Copy Markdown

This extends sockperf with ability to report RTT for a message that is being persisted on the server side with DSYNC and/or DIRECT flags. The purpose of this change is to have sockperf mimic a simple DB server.

@swx-jenkins2

Copy link
Copy Markdown

Can one of the admins verify this patch?

@igor-ivanov igor-ivanov self-assigned this Sep 8, 2020
Comment thread src/server.h
memcpy(write_msg_buf_aligned, msg, msg_len);
ssize_t wb = write(write_msg_fd, write_msg_buf_aligned, msg_len);

if (wb != msg_len) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For consistency, cast msg_len to size_t as done in if (write_msg_file){ ... } above.

Comment thread src/sockperf.cpp
const char *optarg = aopt_value(server_obj, OPT_WRITE_MSG_BUF_ALIGN);
long int alignment = strtol(optarg, NULL, 0);

if (alignment >= DEFAULT_BUF_ALIGNMENT && ((alignment & (alignment - 1)) == 0)) {

@ChrisCoe ChrisCoe Feb 13, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. Maybe add a small comment here that we are checking for powers of 2? Fine either way.

@ChrisCoe

Copy link
Copy Markdown
Contributor

Thanks for adding this write-messages-to-file option. This would be great to have.

@igor-ivanov can you follow up on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants