owncloud/core — pull request #6004 by brainstorm (2013-11-22 13:15:54+00:00)
Title: Increase chunk transfer size for iRODS

While testing the iRODS extension, I noticed that the transfer rates were suboptimal. Tracing with `strace` revealed a 8kb chunk size when transferring a `2.5GB` file filled with zeros:

```
# lsof /tmp/php86IZkm
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 3009 www-data 17r REG 253,1 2671771648 59 /tmp/php86IZkm
```

Actual data packets being sent by process id 3009 above (with a single apache thread), those messages appear every 0.5 seconds with a payload of 8192 bytes each:

```
sendto(16, "\0\0\0\210RODS_API"..., 222, MSG_DONTWAIT, NULL, 0) = 222
sendto(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192

sendto(16, "\0\0\0\210RODS_API"..., 222, MSG_DONTWAIT, NULL, 0) = 222
sendto(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192
```

Before the patch it took around 24h to upload. After this patch, the transfer takes less than an hour.

With native iRODS `iput` commands, the transfer takes around 1minute, so there's still room for improvement.

Thanks to @cansmith and @DeepDiver1975.