全部博文(140)
分类: LINUX
2014-09-12 00:19:39
原文地址:Linux IPC开发者性能测试 作者:timespace
Message size |
Bandwidth (MB/sec) |
|||||
Pipe |
POSIX message queue |
System V message queue |
TCP socket |
UNIX domain socket |
UDP socket |
|
1024 |
1,233 |
405 |
354 |
1,756 |
1,603 |
15 |
2048 |
2,048 |
869 |
655 |
2,625 |
2,132 |
30 |
4096 |
2,944 |
1,653 |
1,075 |
3,483 |
3,013 |
60 |
8192 |
3,211 |
4,250 |
1,599 |
4,175 |
4,779 |
119 |
16384 |
3,300 |
5,982 |
2,510 |
4,552 |
6,414 |
231 |
32768 |
2,876 |
6,929 |
2,888 |
4,450 |
7,508 |
435 |
65536 |
2,830 |
7,483 |
3,830 |
4,692 |
3,953 |
|
Latency (microseconds) |
|||||
Pipe |
POSIX message queue |
System V message queue |
TCP socket |
UDP socket |
UNIX domain socket |
53 |
53 |
57 |
67 |
63 |
54 |
# processes |
time to count 1M times (microseconds) |
|||||
atomic |
mutex |
read-write lock |
memory semaphore |
named semaphore |
fcntl record locking |
|
1 |
6,082 |
20,478 |
34,125 |
20,736 |
23,340 |
544,179 |
2 |
40,948 |
120,419 |
411,038 |
192,671 |
222,371 |
1,317,033 |
3 |
72,817 |
177,074 |
726,129 |
648,390 |
630,069 |
2,191,806 |
4 |
101,213 |
287,997 |
1,012,311 |
855,711 |
891,484 |
6,125,641 |
5 |
128,190 |
371,302 |
1,129,752 |
1,122,309 |
1,198,571 |
3,757,362 |
# threads |
time to count 1M times (microseconds) |
|||||
atomic |
mutex |
read-write lock |
memory semaphore |
named semaphore |
fcntl record locking |
|
1 |
6,011 |
20,161 |
36,107 |
20,472 |
21,136 |
581,972 |
2 |
40,732 |
197,068 |
322,856 |
177,390 |
196,268 |
|
3 |
60,447 |
266,436 |
364,316 |
281,590 |
536,500 |
|
4 |
81,705 |
383,399 |
468,483 |
459,140 |
742,603 |
|
5 |
102,755 |
476,966 |
565,017 |
517,602 |
1,116,406 |
|