0

Currently Im implementing a shared buffer between user space processes. For that, I have a library which opens a client UNIX socket for the client processes to dump events into the server socket. My root process opens a server socket and waits for the events from client sockets. Once message is received, my root process will dump the events on to the shared buffer.

I guess i am messing with client processes performance for logging, since the client process has to wait till the events are written into the client socket. I would like to know, if there is a way, i could handover the events to the library and return immediately, so that the library can take care of writing the events into the client socket.

Really appreciate your help.

Thanks

  • 1
    Have you actually measured the performance impact of writing to the socket? If there is no problem, you most likely don't need a solution... In general, just writing to the socket should be fast, it's just a system call. – Hans-Martin Mosner Mar 1 '18 at 9:42
  • Thanks for your inputs, I'm a newbie and I have two questions to be clarrified, consider my server socket accepts 10 client connections 1. If the queue is full, does my client process waits on the connect system call. 2. After being connected, If my client process is fifth in the queue, does my client process waits on the write system call until the 4 connections are processed by server also please let me know how to check the performance Thanks in advance – Karthick Mar 1 '18 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.