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

/proc/vz/vestat and /proc/stat (inside container) sometimes reports bad value for idle and wait

    Details

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

      Description

      I'm trying to write a perl collectd plugin to track resource usage for openvz containers. The host is Debian lenny running kernel 2.6.26-2-openvz-amd64 on an Atom 230 processor. The guest is also Debian lenny amd64. Every once in a while, when running 'vzctl <veid> exec cat /proc/stat', the value for idle on cpu0 will be 48485, wait will have a value somewhat lower than the previous (10 seconds prior) reading for cpu0 idle, and the remaining values in the line will all be 0. On the next reading, all values will be what I expect.

      example:

      veid: 101
        cpu-0: user: 34200 nice: 39258 system: 39269 idle: 33410749 wait: 5961 interrupt: 0 softirq: 0 steal: 0
        cpu-1: user: 23359 nice: 12880 system: 21009 idle: 129 wait: 0 interrupt: 0 softirq: 0 steal: 0
      veid: 101
        cpu-0: user: 34200 nice: 39259 system: 39270 idle: 48485 wait: 33369476 interrupt: 0 softirq: 0 steal: 0
        cpu-1: user: 23359 nice: 12880 system: 21012 idle: 129 wait: 0 interrupt: 0 softirq: 0 steal: 0
      veid: 101
        cpu-0: user: 34201 nice: 39260 system: 39274 idle: 33413248 wait: 5961 interrupt: 0 softirq: 0 steal: 0
        cpu-1: user: 23412 nice: 12881 system: 21022 idle: 129 wait: 0 interrupt: 0 softirq: 0 steal: 0

        Activity

        Hide
        jon@b0g.us Jon Kolb added a comment -

        Not sure if it's related, but often, cpu0 will log more idle ticks elapsed between two readings than possible (usually around 1.2x real time). If I ignore the 48485 readings, cpu0's idle will average 120-130%, and cpu1 doesn't increase as much as it should (though I haven't looked to see if it's the same amount).

        Show
        jon@b0g.us Jon Kolb added a comment - Not sure if it's related, but often, cpu0 will log more idle ticks elapsed between two readings than possible (usually around 1.2x real time). If I ignore the 48485 readings, cpu0's idle will average 120-130%, and cpu1 doesn't increase as much as it should (though I haven't looked to see if it's the same amount).
        Hide
        xemul Pavel Emelyanov added a comment -

        To Kostja

        Show
        xemul Pavel Emelyanov added a comment - To Kostja
        Hide
        acichocki@supermedia.pl Artur Cichocki added a comment -

        I can confirm it on CentOS 6, 2.6.32-042stab039.3, x86_64.

        host: /proc/vz/vestat (look at Idle)
        1104 1808967 0 526018 6863835 17489739484870 0 6863842667020 2459967310094 0
        1104 1808968 0 526024 6864674 17475201606990 0 6864682347610 2459975107106 0 0 0

        container: /proc/stat
        cpu 180869 0 52594 1745699 48685 0 0 0
        cpu 180869 0 52594 1742444 48685 0 0 0

        Dell R410, Dual Xeon E5645.

        Show
        acichocki@supermedia.pl Artur Cichocki added a comment - I can confirm it on CentOS 6, 2.6.32-042stab039.3, x86_64. host: /proc/vz/vestat (look at Idle) 1104 1808967 0 526018 6863835 17489739484870 0 6863842667020 2459967310094 0 1104 1808968 0 526024 6864674 17475201606990 0 6864682347610 2459975107106 0 0 0 container: /proc/stat cpu 180869 0 52594 1745699 48685 0 0 0 cpu 180869 0 52594 1742444 48685 0 0 0 Dell R410, Dual Xeon E5645.
        Hide
        openvz@yasukun.org Yasuyuki Nakamura added a comment -

        I think this bug is related with OVZ-5310 (or it seems same bug).
        sorry for reporting duplicated bug.

        Do you have any idea to fix this issue?

        Show
        openvz@yasukun.org Yasuyuki Nakamura added a comment - I think this bug is related with OVZ-5310 (or it seems same bug). sorry for reporting duplicated bug. Do you have any idea to fix this issue?
        Hide
        openvz@yasukun.org Yasuyuki Nakamura added a comment -

        any news?

        Show
        openvz@yasukun.org Yasuyuki Nakamura added a comment - any news?
        Hide
        khlebnikov@openvz.org Konstantin Khlebnikov added a comment -

        [Add vdavydov@parallels.com to CC]

        Show
        khlebnikov@openvz.org Konstantin Khlebnikov added a comment - [Add vdavydov@parallels.com to CC]
        Hide
        vdavydov Vladimir Davydov added a comment -

        Try 042stab056.11

        Show
        vdavydov Vladimir Davydov added a comment - Try 042stab056.11
        Hide
        khlebnikov@openvz.org Konstantin Khlebnikov added a comment -

        Try recent kernels and reopen if bug still here.

        Show
        khlebnikov@openvz.org Konstantin Khlebnikov added a comment - Try recent kernels and reopen if bug still here.
        Hide
        sergeyb Sergey Bronnikov added a comment -

        Bug was fixed more than one year ago and there were no complains from reporter after fix. We treat bug as fixed and close bug.

        Show
        sergeyb Sergey Bronnikov added a comment - Bug was fixed more than one year ago and there were no complains from reporter after fix. We treat bug as fixed and close bug.

          People

          • Assignee:
            vdavydov Vladimir Davydov
            Reporter:
            jon@b0g.us Jon Kolb
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: