title: Read from /proc/$PID/smaps is slow
body: <p>We need to monitor memory usage of our high-loaded service every minute by cron.</p>
  
  <p>For this we are reading <code>/proc/PID/smaps</code> and somehow parse it.</p>
  
  <p>But we are encountering timing problems exactly every minute.
  When monitoring cron is turned off, there is no timing problems.</p>
  
  <p>Only expensive and suspicious operation in our code is that reading of <code>/proc/PID/smaps</code>.</p>
  
  <p>Is there in Linux kernel any lock/mutex/something else while reading <code>smaps</code>?</p>
  
  <p>And is there any other more transparent method to detect memory usage?</p>