title: PHP memory_get_usage compared to oom-killer logs
body: <p>On one of our servers, we get some PHP processes killed very often. I added some logs in the PHP scripts to try understand where all this memory goes, but the numbers I find on PHP side do not relate to the logs from oom-killer.</p>
  
  <p>PHP side reports : </p>
  
  <p><code>memory_get_usage(true)/1000/1000</code> = 74 MB</p>
  
  <p>In oom-killer log for the same process I get : </p>
  
  <pre><code>[ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
  [39130]    33 39130   557139   470405    1040        0             0 php
  </code></pre>
  
  <p>I'm no expert with oom-killer, but I understood I should take rss column * 4kb, so </p>
  
  <p><code>470405 * 4 / 1000</code> = 1881MB</p>
  
  <p>A very different number!!</p>
  
  <p>Which one of my calculation is wrong ??</p>
  
  <p>Thank you all.</p>