java - What are the factors affecting the speed in sending large amount of data in SocketChannel? -
can tell me specific factors affecting speed in sending large amount of data in socketchannel? example byte allocation affects speed?
the main limiting factors, in order, are:
- network bandwidth, mean bandwidth of slowest part of path between peers.
- size of socket receive buffer @ receiver. if less bandwidth-delay product of path, won't able utilize full available bandwidth.
- the speed @ send. contrary suggestion in comments, should send as possible @ time, , repeat rapidly can, assuming blocking mode. in non-blocking mode considerably more complex, if bandwidth utilization goal you're better off using blocking mode. you're better off using
java.net
rather nio too.
Comments
Post a Comment