ALT Linux sysadmins discussion
 help / color / mirror / Atom feed
From: Alex Moskalenko <mav@elserv.msk.su>
To: ALT Linux sysadmins' discussion <sysadmins@lists.altlinux.org>
Subject: [Sysadmins] OpenVZ: CPU idle и iowait в контейнере
Date: Tue, 26 Jun 2012 11:56:32 +0400
Message-ID: <4FE96B30.2000901@elserv.msk.su> (raw)

Здравствуйте!

После установки ядра 2.6.32-ovz-el-alt70 столкнулся с тем, что внутри 
контейнеров перестали учитываться iowait и idle CPU time в /proc/stat.
В результате имеем следующую картину в контейнере:
1) cat /proc/stat
cpu  265519 32541 83101 0 0 0 0 4758
cpu0 110591 6482 22605 0 0 0 0 1610
cpu1 66653 11526 26524 0 0 0 0 1498
cpu2 44562 5746 14750 0 0 0 0 812
cpu3 43711 8786 19221 0 0 0 0 836
intr 0
swap 0 0
Учитываются usr,sys,nice,sirq. Остальное всегда 0;

2) vmstat в контейнере падает:
vmstat 1 999
procs -----------memory---------- ---swap-- -----io---- --system-- 
-----cpu-----
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy 
id wa st
  0  0      0 1867204      0 391488    0    0  1063   748    0 1096 77 
22  0  0  1
Floating point exception
Похоже, что происходит это в не сильно загруженных контейнерах, когда за 
1 период измерений usr,sys,nice и sirq оказываются нулями, в результате 
чего при расчете процентов vmstat делит на 0;

3) top в контейнере показывает или полное отсутствие загрузки CPU (то 
есть по нулям все, включая idle), или неадекватные цифры sys,user и nice 
(причина похоже в том, что idle и iowait всегда 0, из-за чего 
неправильно считается процентное отношение загрузки);

4) Monit в контейнере также пказывает неадекватные цифры загрузки CPU, о 
чем постоянно жалуется.

На ядре 2.6.32-ovz-el-alt60 подобных проблем не замечалось. Среди 
изменений между alt60 и alt70 встречаются
[fairsched] accuracy of idle/iowait time stats reported through 
/proc/stat has been increased (PCLIN-30724) в 042stab056.8,
[scheduler] idle time stat reported by /proc/stat has been corrected 
(PCLIN-30773) в 042stab056.11.

Подскажите пожалуйста - это такая политика партии теперь - не считать 
idle в контейнерах и нужно отключать мониторинг загрузки CPU в них, или 
это все-таки баг?

-- 
WBR, Alex Moskalenko



             reply	other threads:[~2012-06-26  7:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  7:56 Alex Moskalenko [this message]
2012-06-26  9:42 ` Michael Shigorin
2012-06-26 10:37     ` Alex Moskalenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FE96B30.2000901@elserv.msk.su \
    --to=mav@elserv.msk.su \
    --cc=sysadmins@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux sysadmins discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
		sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
	public-inbox-index sysadmins

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sysadmins


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git