I create a flamegraph for that and measure time of execution. It seems that is takes relatively much time. (I am not sure whether is it much or not). In test I send a 64-byte message in a loop.
send function takes 10-15 microseconds.
1. Is it much or not?
2. Have you any idea how to improve it? I tried to extend send buffer socket, doesn't help- I know that probably it couldn't help.
3. When it comes to a flamegraph: It looks like the kernel waits for a response- I mean the function ip_recv and so on. What does the kernel try to receive? AFAIK a send function doesn't wait for ACK from receiver.
The send doesn't wait, but the kernel has to serve both the send side and the receive side, and if they happen to run on the same CPU and possibly in the same thread, then you'll see them in the flame graph for that CPU or thread.
In this case the kernel decided to run the receive processing immediately, so that's what you get.
use unix domain sockets or (better) shared memory for IPC.
Don't use loopback, disable meltdown/spectre mitigation, ...
spectre_v2=off nopti
at kernel boot, but my testing showed this was somewhat slower than the same kernel with mitigations enabled, both of which were much slower than kernels with the mitigations not present (either an older kernel or backing out the patches - the latter option being very difficult on newer kernels with more cumulative changes built on those patches).
Don't use loopback, disable meltdown/spectre mitigation, ...
Out of curiosity, have you tried it and how did you do it?
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.