title: php cURL - Slow upload limit - how to optimize?
body: <p>I am using cURL to transfer data between my website and a partner's website.</p>
  
  <p>The request is very long (~ 18 seconds), yet the amount of information is quite small (~ 207 bytes).</p>
  
  <p>Here is my code to generate the request :</p>
  
  <pre><code>// Send the subscription           
  $resource = curl_init($url);
  curl_setopt($resource, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($resource, CURLOPT_POST, count($postFields));
  curl_setopt($resource, CURLOPT_POSTFIELDS, $postString);
  $result = curl_exec($resource);
  </code></pre>
  
  <p>Here is the result of the curlinfo debug :</p>
  
  <pre><code>17.418212 total_time : Total transaction time in seconds for last transfer
  0.064612 namelookup_time : Time in seconds until name resolving was complete
  0.437222 connect_time : Time in seconds it took to establish the connection
  0.946509 pretransfer_time : Time in seconds from start until just before file transfer begins
  17.418172 starttransfer_time : Time in seconds until the first byte is about to be transferred
  0 redirect_count : Number of redirects
  0 redirect_time : Time in seconds of all redirection steps before final transaction was started
  207 size_upload : Total number of bytes uploaded
  11 speed_upload : Average upload speed
  130 size_download : Total number of bytes downloaded
  7 speed_download : Average download speed 
  </code></pre>
  
  <p>On curlinfo documentation : <a href="http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html" rel="nofollow">http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html</a>, it is said that the size_upload and speed_upload are in bytes and bytes/second respectively.</p>
  
  <p><strong>10 bytes/s is not very fast, is it?
  Where can I find other debug infos, and what can I do to improve this speed?</strong></p>
  
  <p>Additional info : 
  both servers sending and receiving data have good bandwidth
  and both are in the same city</p>