Linux-Trace-Users Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Naruto Nguyen <narutonguyen2018@gmail.com>
Cc: linux-trace-users@vger.kernel.org
Subject: Re: How to find out which process cause a strange increasing cpu load on a certain core?
Date: Tue, 18 Jun 2019 09:02:35 -0400
Message-ID: <20190618090235.6a7b5a60@gandalf.local.home> (raw)
In-Reply-To: <CANpxKHEMjWRSbV8fq_iSR5XAzy7oMuht0xfRTeLtBxajxtW2eg@mail.gmail.com>

On Tue, 18 Jun 2019 18:40:13 +0700
Naruto Nguyen <narutonguyen2018@gmail.com> wrote:

> Hello everyone,
> 
> I have a kvm hypervisor and setup some VMs running OpenSUSE kernel
> 4.0. After some reboot, I saw that sometime there is a VM that a
> certain core has higher %usr and %sys than other cores. The system is
> in ide state. I have some applications running on this VM, but there
> is no issue in other VMs.

How much higher? And is it always an issue with the same core on the
same VM?

> 
> If I enable ftrace in kernel or load any debug jprobe, the load is

I'm assuming by "ftrace" you mean the full function tracer?

 # echo function > /sys/kernel/tracing/current_tracer

> back to normal. The pidstat command output does not show the high load
> on one core like the "top" command. Could you please let me know if it
> is the problem of "top' report higher usage? Any commands that can
> help to troubleshoot this issue? I tried "perf" but most of the time
> the perf output does not show any function that cause the increase as
> well? Not sure, if the malfunction of top or anything else can add
> more work load?

I would suggest just tracing sched switches and interrupts. That
shouldn't affect the load, as it is very low weight.

 # cd /sys/kernel/tracing
 # echo 1 > events/sched/sched_waking/enable
 # echo 1 > events/sched/sched_switch/enable
 # echo 1 > events/irq/enable

And then monitor that.

-- Steve

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 11:40 Naruto Nguyen
2019-06-18 13:02 ` Steven Rostedt [this message]
2019-06-18 16:28   ` Naruto Nguyen

Reply instructions:

You may reply publically 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=20190618090235.6a7b5a60@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-users@vger.kernel.org \
    --cc=narutonguyen2018@gmail.com \
    /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

Linux-Trace-Users Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-users/0 linux-trace-users/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 linux-trace-users linux-trace-users/ https://lore.kernel.org/linux-trace-users \
		linux-trace-users@vger.kernel.org
	public-inbox-index linux-trace-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-users


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