-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop client-server IPC msg Performance exerciser for L3-LOC overheads #33
Conversation
353d076
to
594080e
Compare
This commit adds the initial version of client-server messaging program sources as downloaded from Michael Kerrisk's reference book "The Linux Programming Interface". Ref: https://man7.org/tlpi/code/online/all_files_by_chapter.html Ch. 46: System V Message Queues. Ref: [email protected]:bradfa/tlpi-dist.git Required header files, along with the two main source files, svmsg_file_client.c and svmsg_file_server.c, are checked-in. Makefile is updated to add the `client-server-perf-test` target which will build the client/server programs. Currently, as the server runs in an endless loop, we just build these programs but do not exercise these programs as part of CI. test.sh: Add test-build-client-server-perf-test to --list output. Follow-on commits will adapt these core programs to develop a L3-LOC performance test exerciser.
e0c5ef8
to
49b2bea
Compare
Tighten code-formatting in `.h` and `.c` sources for client-server program sources inherited in previous commit. - Consistently enclose single-line body of `if()`, `else()` conditionals in { }, to avoid any errors creeping-in due to future refactoring. - Re-indent end `*/` markers of multi-line comment blocks to start on a newline. - Enclose multiple `|`-separated status flags in `()` No code-logic change is introduced with this commit.
260c9af
to
2ebe892
Compare
…rheads This commit simplifies the simple client-server communication program to be usable as a performance test-bed to quantify the overheads of L3-logging. Basic single/multiple-clients exchanging n-messages with server that runs in serial manner (of processing messages) is working with this commit. The changes are as follows: svmsg_file.h: - Define enum req_resp_type_t{} with few message types. - Specifically of interest are: REQ_MT_INIT, REQ_MT_INCR, REQ_MT_EXIT svmsg_file_server.c - Simplified server. Receives messages inline from client in a forever loop. Currently, only implements "increment" counter. - Manages state of multiple client connections using simple array - L3-logging code is conditionally defined under L3_ENABLED. So, will need to build separately to invoke-and-test logging overheads. svmsg_file_client.c - Sits in forever loop, sending "increment" message to server - Do this for n-iterations. Makefile: Make changes to build the client/server programs with L3-logging OFF (baseline) and logging enabled. test.sh: Add test-build-and-run-client-server-perf-test and include that in CI's build.yml . We will build-and-run a small scale run of this new test, with 5 concurrent clients, L3 ON and OFF. build.yml: Add new test to run in CI in debug & release build modes.
2ebe892
to
d41593b
Compare
typedef enum { | ||
REQ_MT_UNKNOWN = 0 | ||
, REQ_MT_INIT = 1 // New client initialization | ||
, REQ_MT_INCR // Increment client's counter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently client only requests this op-type; i.e. increment.
Rest are added for possible future usages, but really serve no much purpose.
errExit("msgsnd"); | ||
} | ||
|
||
msgLen = msgrcv(clientId, &resp, RESP_MSG_SIZE, 0, 0); // <-- Recv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any L3-logging enabled on the server-side will be included in this elapsed-time region.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
This PR is a collection of multiple commits that incrementally build a client/server messaging program for use as a performance exerciser to measure overheads of L3/LOC diagnostic.
Initial version of client-server IPC msgs program sources.
This commit adds the initial version of client-server messaging program sources as downloaded from Michael Kerrisk's reference book "The Linux Programming Interface".
Ref: https://man7.org/tlpi/code/online/all_files_by_chapter.html
Ch. 46: System V Message Queues.
Ref: [email protected]:bradfa/tlpi-dist.git
Required header files, along with the two main source files, svmsg_file_client.c and svmsg_file_server.c, are checked-in.
Makefile is updated to add the
client-server-perf-test
target which will build the client/server programs. Currently, as the server runs in an endless loop, we just build these programs but do not exercise these programs as part of CI.Follow-on commits will adapt these core programs to develop a L3-LOC performance test exerciser.
Cleanup code-formatting in client-server IPC msgs program sources.
Tighten code-formatting in
.c
sources for client-server program sources inherited in previous commit.if()
,else()
conditionals in { }, to avoid any errors creeping-in due to future refactoring.*/
markers of multi-line comment blocks to start on a newline.|
-separated status flags in()
No code-logic change is introduced with this commit.
[Perf] Develop client-server comms. program to measure L3-logging overheads
This commit simplifies the simple client-server communication program to be usable as a performance test-bed to quantify the overheads of L3-logging. Basic single/multiple-clients exchanging n-messages with server
that runs in serial manner (of processing messages) is working with this [3rd] commit.
The changes are as follows:
svmsg_file.h
:svmsg_file_server.c
svmsg_file_client.c
Makefile
: Make changes to build the client/server programs with L3-logging OFF (baseline) and logging enabled.test.sh
: Add test-build-and-run-client-server-perf-test and include that in CI's build.yml . We will build-and-run a small scale run of this new test, with 5 concurrent clients, L3 ON and OFF.Manual testing output
Here is how things will look when running this client-server application with a build where L3-Logging is enabled:
Server:
Client: