title: Why does libcurl calculate "4 TIMES" the number of added easy handles?
body: <p>I have two questions.  </p>
  
  <p>(To downvoter: The second question is based on the recognization represented in the first question, so <strong>these are NOT too broad</strong>)</p>
  
  <h1>Q1. What's the difference among <code>CURLOPT_MAXCONNECTS</code> / <code>CURLMOPT_MAXCONNECTS</code> / <code>CURLMOPT_MAX_TOTAL_CONNECTIONS</code>?</h1>
  
  <p>I wrote the article:<br>
  <a href="http://qiita.com/mpyw/items/f011e28638c43c974e7a" rel="nofollow">CURLOPT_MAXCONNECTS / CURLMOPT_MAXCONNECTS / CURLMOPT_MAX_TOTAL_CONNECTIONS の違い - Qiita</a></p>
  
  <p>The summary in English is:</p>
  
  <ul>
  <li><code>CURLOPT_MAXCONNECTS</code> (PHP 5.5 or later)  
  
  <ul>
  <li>Limit of idle connections cached by <code>curl_exec</code></li>
  </ul></li>
  <li><code>CURLMOPT_MAXCONNECTS</code> (PHP 5.5 or later)  
  
  <ul>
  <li>Limit of idle connections cached by <code>curl_multi_exec</code></li>
  </ul></li>
  <li><code>CURLMOPT_MAX_TOTAL_CONNECTIONS</code> (PHP 7.0.7 or later)  
  
  <ul>
  <li>Limit of active connections fired by <code>curl_multi_exec</code></li>
  </ul></li>
  </ul>
  
  <p>Are they correct?</p>
  
  <h1>Q2. How does <code>CURLMOPT_MAXCONNECTS</code> work?</h1>
  
  <p>First, I believe that the description of <code>CURLMPOT_MAXCONNECTS</code> on current PHP Manual is wrong. I reported the issue here:<br>
  <a href="https://bugs.php.net/bug.php?id=72890" rel="nofollow">PHP :: Doc Bug #72890 :: The description of CURLOPT_MAXCONNECTS is wrong</a></p>
  
  <blockquote>
    <h2>Description:</h2>
    
    <p>The description of CURLOPT_MAXCONNECTS is wrong.</p>
    
    <p>PHP manual says: "Default is 10."<br>
    libcurl manual says: "By default libcurl will enlarge the size for each added easy handle to make it fit 4 times the number of added easy handles."</p>
  </blockquote>
  
  <p><strong>&lt;&lt; MAIN QUESTION >></strong></p>
  
  <p>On the presumption that my opinion is correct, why does libcurl calculate <strong>4 times</strong> the number of added easy handles? I wonder this operation has no meaning...</p>