Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-5310

/proc/stat cpu idle task time is reduced in VE.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Kernel
    • Security Level: Public
    • Environment:
      Operating System: RHEL/CentOS 5
      Platform: x86_64 (AMD64)

      Description

      I am using 2.6.32-042stab044.11.
      I found vmstat threw floating a floating point exception in VE and the reason.

      /proc/stat cpu idle task time is reduced in sometimes.

      I can reproduce following steps:
       1. vzctl enter <ctid>
       2. execute following python script
      root@ubuntu-64:/# cat proc_stat_problem.py
      import time
      while True:
         f = open('/proc/stat')
         for x in f:
            if x.startswith('cpu '):
               print x.strip()
         f.close()
         time.sleep(1)

      root@ubuntu-64:/# python proc_stat_problem.py
      cpu 13367 0 5512 494801 18113 0 0 0
      cpu 13367 0 5512 508076 18113 0 0 0
      cpu 13367 0 5512 508115 18113 0 0 0
      cpu 13367 0 5512 508154 18113 0 0 0
      cpu 13367 0 5512 495215 18113 0 0 0 <= D'oh!
      cpu 13367 0 5512 502007 18113 0 0 0
      ^CTraceback (most recent call last):
        File "proc_stat_problem.py", line 8, in <module>
          time.sleep(1)
      KeyboardInterrupt
      root@ubuntu-64:/#
       3. check above 5th field of the result. cpu idle time should be increased but it seems decrease.

      BTW, I cannot reproduce following command line.
      root@ubuntu-64:/# while :; do cat /proc/stat | egrep '^cpu '; sleep 1; done

        Attachments

          Activity

            People

            Assignee:
            vdavydov Vladimir Davydov
            Reporter:
            openvz@yasukun.org Yasuyuki Nakamura
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: