4 ms·
Hi, vardump, my true point here is clear: latency != 1/throughput. Can you accept this viewpoint? 1. our talking context is Java. There is nothing about assemb
by jinmingjian 11y ago
Hi, vardump, my true point here is clear: latency != 1/throughput. Can you accept this viewpoint?
1. our talking context is Java. There is nothing about assembler here. I assume you are the author of this library. If not, let me know.
2. I spend a little time to see your perf source[1]. Tell us what's ping-pongs you did?
3. Even your micro testing Thread busy waiting on cores. The OS still has the right to do thread scheduling. Who gurantees you have not a cache line missing for next time running? This is possible by a relative complex steps in Java. But it is obvoiusly not shown in all of your codes and notes.
4. The cache line is not sharing directly. They become coherent by MESI or its variants[2]. You busy waiting causes the coherence storm for RFO, which is expensive in theory. Although some relieve these pain, this is another topic. You need to show these latencies or at least why you do not consider them in the nanosec level?
5. if assumed "15 ns in any case without contention" is right, then 1ns for the latency of rest instructions? The cost of above cache coherence? The cost of a function call pro/epi in hotspot-JITed codes? The overhead by volatile of forbidding some JIT? OK, how about counting on GC?
6. Ping-pong is still not good enough for nanosec level latency measurement. Because, you have the "endpoint effect". At least, you need to copy? what's the memory copy throughput latency?(note again: latency != 1/throughput)
7. Finally, your codes just show the throughput of batch writing/reading into/from memory by Java's mmap kinds. It is not the "p2p" latency in common sense.
I just leave HN readers to make their own judgement: I plan to announce a pico-second message-passing library because I have done the TB level L1 cache throughput in my Haswell core.
[1] https://github.com/caplogic/MappedBus/blob/master/src/perf/io/mappedbus/perf/MessageReader.java https://github.com/caplogic/MappedBus/blob/master/src/perf/i...
[2] http://en.wikipedia.org/wiki/MESI_protocol http://en.wikipedia.org/wiki/MESI_protocol