Article ID: 116491, created on Jul 18, 2013, last review on May 3, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux


There is a difference in numfile counting. If we check it's value with /proc/user_beancounters, we will see the following results:
[root@mypvc]# grep -A 25 101 /proc/user_beancounters |grep numfile
            numfile                     10840                10840                17600                17600                16772

but if we check it with lsof, there will be different values:
[root@mypvc]# lsof 2>/dev/null |grep 101 |wc -l

It is expected behavior as files precharging mechanism was implemented. It helps to increase performance. Below is precharge algorithm:
  1. At the very beginning a process is created having already 16 files accounted
  2. When process opens new file, only an internal counted increased, till it reaches 16
  3. When it opens 17th file, then there will be UBC checking and updating and next 16 files are precharged for the process

0dd5b9380c7d4884d77587f3eb0fa8ef 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f

Email subscription for changes to this article
Save as PDF