Test results of inter-process communication latency of IPC latency in Linux

Source: Internet
Author: User

For more information, see vloveiyhttp: // ffown.sinaapp.com /? P = 40

CPU name: Intel (r) Xeon (r) CPU e5405 @ 2.00 GHz
Processor: 4
CPU MHz: 1995.021

IPC latency:

IPC type: messagesize: average latency:
UNIX socket 10 k 9us
Localhost TCP 10 k 11us
Pipe 10 k 6us
Remote TCP 10 k 13us

IPC throughput:
IPC type: messagesize: average throughput/MSG: average throughput/m:
UNIX socket 10 k 183049 MSG/s 14643 MB/S
Localhost TCP 10 k 113901 MSG/s 9112 MB/S
Pipe 10 k 146724 MSG/s 11737 MB/S

TestCode:
Http://github.com/rigtorp/ipc-bench

In Linux, I want to select an IPC, which tends to be UNIX socket and tested by IPC-plugin.
It seems that the latency of 10 k Data Transmission 9us is acceptable in most applications,
In this way, some applications can use a multi-process mode similar to nginx, with a process at the network layer,
Multi-process in the logic layer, and can run scripts. It can utilize the synchronous writing logic to give full play to the advantages of multiple cores.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.