java - Fast and scalable IO passthrough -
original
i have batch job passes through contents downloads various urls s3 storage. using blocking io , have reached point job io bound blocking of time because of io. in order speed whole process thinking using non-blocking io.
unfortunately wasn't able find utility code passing through content set of channels set of channels. since read writing correct non-blocking code not easy, prefer use existing utility/framework write code myself.
the transfermanager seems possible option higher throughput when using aws sdk, offers usage of streams , seems use io threads in background. apparently there no out of box option non-blocking uploads s3.
what recommend? right can imagine following solutions.
- stay blocking io , use own io thread pool
- use non-blocking io download files local filesystem, upload transfermanager
- use non-blocking io pass through
option 1 not scale , 2 work while, keep ios on ebs low i'd rather use 3.
to implement option 3 guess have implement lot myself final question is, whether think it's worth , if so, tools use make work.
edit 1
clarifying io bound meant job waiting io. here can see bandwidth not saturated, if possible.
if job i/o bound you've finished. you're bound speed of network, not of code. using nio won't make faster.
clarifying io bound meant job waiting io.
yes, that's 'i/o bound' means. nothing has changed.
here can see bandwidth not saturated, if possible.
you try using larger buffers, said seems me you've finished.
Comments
Post a Comment