I am using java nio socket for communication. When the speed of message publications is high, the write buffer is filled up and the process has to wait for the next writable time. The frequency of send buffer full is high. The unsent buffer is enqueued. I measure the end2end delay of my experiments, it takes ~900 ms. At the same time, I measure the difference between the dequeu time of a unsent buffer and the enqueue time of the same buffer. I find it takes hundreds miliseconds.
Then, how to reduce the waiting time for the next writable time? Windows XP is installed on my machines and the project is Java code.
I hope people who have a lot of nio and system experiments can help. Thanks.
以上就是Java nio socket waiting time when a buffer is full的详细内容，更多请关注web前端其它相关文章！