Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Server Development (http://www.linux-archive.org/ubuntu-server-development/)
-   -   unexpected output vmstat -s (http://www.linux-archive.org/ubuntu-server-development/140295-unexpected-output-vmstat-s.html)

Sander van Vugt 08-09-2008 03:36 PM

unexpected output vmstat -s
 
Hi List,

I notices something I don't understand in the vmstat -s output. In other
Linux distributions I know, the amount of interrupts is always much
higher than the amount of context switches. As far as I know, that from
the operating system perspective is also what you would expect, as a
context switch needs a timer interrupt to do its work. Now when I do
vmstat -s on Ubuntu Server 8.04, the amount of context switches is about
5 times as high as the amount of interrupts, where I would expect the
exact opposite. Can anyone explain this? Is this a specific Ubuntu feature?

Thanks,
Sander


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Etienne Goyer 08-11-2008 12:38 PM

unexpected output vmstat -s
 
Sander van Vugt wrote:
> I notices something I don't understand in the vmstat -s output. In other
> Linux distributions I know, the amount of interrupts is always much
> higher than the amount of context switches. As far as I know, that from
> the operating system perspective is also what you would expect, as a
> context switch needs a timer interrupt to do its work. Now when I do
> vmstat -s on Ubuntu Server 8.04, the amount of context switches is about
> 5 times as high as the amount of interrupts, where I would expect the
> exact opposite. Can anyone explain this? Is this a specific Ubuntu feature?


I believe this is due to the new tickless kernel feature (CONFIG_NO_HZ).
There is no periodic timer interrupts at HZ interval anymore; timer
interrupts happen only if scheduled (with sleep(), for example). This
is supposed to reduce CPU power consumption.


--
Etienne Goyer, Senior Ubuntu System Support Analyst
Ubuntu Certified Instructor
Canonical, Ltd

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Mon Aug 11 16:30:01 2008
Return-path: <ubuntu-users-bounces@lists.ubuntu.com>
Envelope-to: tom@linux-archive.org
Delivery-date: Mon, 11 Aug 2008 15:40:29 +0300
Received: from chlorine.canonical.com ([91.189.94.204])
by s2.java-tips.org with esmtp (Exim 4.69)
(envelope-from <ubuntu-users-bounces@lists.ubuntu.com>)
id 1KSWhJ-0003Zc-E0
for tom@linux-archive.org; Mon, 11 Aug 2008 15:40:29 +0300
Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com)
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <ubuntu-users-bounces@lists.ubuntu.com>)
id 1KSWfp-0003y0-JP; Mon, 11 Aug 2008 13:38:57 +0100
Received: from py-out-1112.google.com ([64.233.166.178])
by chlorine.canonical.com with esmtp (Exim 4.60)
(envelope-from <qrczakmk@gmail.com>) id 1KSWfn-0003xq-C3
for ubuntu-users@lists.ubuntu.com; Mon, 11 Aug 2008 13:38:55 +0100
Received: by py-out-1112.google.com with SMTP id z57so863528pyg.22
for <ubuntu-users@lists.ubuntu.com>;
Mon, 11 Aug 2008 05:38:54 -0700 (PDT)
Received: by 10.115.79.1 with SMTP id g1mr3219382wal.61.1218458334145;
Mon, 11 Aug 2008 05:38:54 -0700 (PDT)
Received: by 10.115.94.9 with HTTP; Mon, 11 Aug 2008 05:38:54 -0700 (PDT)
Message-ID: <3f4107910808110538m475c47cdjca866acd682fd73e@mail .gmail.com>
Date: Mon, 11 Aug 2008 14:38:54 +0200
From: "=?UTF-8?Q?Marcin_=E2=80=98Qrczak=E2=80=99_Kowalczyk?="
<qrczak@knm.org.pl>
To: "Ubuntu user technical support,
not for general discussions" <ubuntu-users@lists.ubuntu.com>
Subject: Re: What backup software?
In-Reply-To: <48A029DC.6080800@zianet.com>
MIME-Version: 1.0
Content-Disposition: inline
References: <489F777C.6050209@runbox.com>
<acfad57e0808101741o2710d550oee1321e60ba09620@mail .gmail.com>
<1218417726.4689.53.camel@smoot.tic.com> <48A029DC.6080800@zianet.com>
X-Google-Sender-Auth: fd56da4048f255dc
X-BeenThere: ubuntu-users@lists.ubuntu.com
X-Mailman-Version: 2.1.8
Precedence: list
Reply-To: "Ubuntu user technical support,
not for general discussions" <ubuntu-users@lists.ubuntu.com>
List-Id: "Ubuntu user technical support,
not for general discussions" <ubuntu-users.lists.ubuntu.com>
List-Unsubscribe: <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>,
<mailto:ubuntu-users-request@lists.ubuntu.com?subject=unsubscribe>
List-Archive: <https://lists.ubuntu.com/archives/ubuntu-users>
List-Post: <mailto:ubuntu-users@lists.ubuntu.com>
List-Help: <mailto:ubuntu-users-request@lists.ubuntu.com?subject=help>
List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/ubuntu-users>,
<mailto:ubuntu-users-request@lists.ubuntu.com?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: ubuntu-users-bounces@lists.ubuntu.com
Errors-To: ubuntu-users-bounces@lists.ubuntu.com

2008/8/11 Karl Larsen <k5di@zianet.com>:

> rsync -vaH --exclude '/proc' --exclude 'sys' --exclude '/mnt' --exclude
> '/media' /. /media/disk
>
> A problem with rsync is every ' is critical.

They are not. For the shell '/proc' and /proc are the same, rsync sees
the same argument in either case. It is not able to distinguish them
even if it wanted to.

--
Marcin Kowalczyk
qrczak@knm.org.pl
http://qrnik.knm.org.pl/~qrczak/

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

Rick Clark 08-11-2008 01:40 PM

unexpected output vmstat -s
 
On Saturday 09 August 2008 10:36:41 Sander van Vugt wrote:
> Hi List,
>
> I notices something I don't understand in the vmstat -s output. In other
> Linux distributions I know, the amount of interrupts is always much
> higher than the amount of context switches. As far as I know, that from
> the operating system perspective is also what you would expect, as a
> context switch needs a timer interrupt to do its work. Now when I do
> vmstat -s on Ubuntu Server 8.04, the amount of context switches is about
> 5 times as high as the amount of interrupts, where I would expect the
> exact opposite. Can anyone explain this? Is this a specific Ubuntu feature?
>
> Thanks,
> Sander

Sander,

I also believe that this is the tickless kernel. Could you verify that you
are fewer interrupts and not more context switches then expected.

Rick Clark
Manager, Ubuntu Server Team
--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Sander van Vugt 08-11-2008 02:24 PM

unexpected output vmstat -s
 
Rick, Etienne,

Thanks for your feedback. From it (and my ignorance ;-) follows another
question. For performance measuring purposes, I think it is useful to
compare interrupts and CPU context switches in a non tickless kernel.
I.e., if the amount of Interrupts is much higher than the amount of
context switches, that is good. If the difference is not very big, a lot
of CPU time is wasted on context switches. Now that I don't have ticks
anymore, I can't see the relation between interrupts and context
switches anymore. Are you aware of any other way of seeing them? I used
to use vmstat -s to display this information.

Thanks,
Sander


On Mon, 2008-08-11 at 08:40 -0500, Rick Clark wrote:
> On Saturday 09 August 2008 10:36:41 Sander van Vugt wrote:
> > Hi List,
> >
> > I notices something I don't understand in the vmstat -s output. In other
> > Linux distributions I know, the amount of interrupts is always much
> > higher than the amount of context switches. As far as I know, that from
> > the operating system perspective is also what you would expect, as a
> > context switch needs a timer interrupt to do its work. Now when I do
> > vmstat -s on Ubuntu Server 8.04, the amount of context switches is about
> > 5 times as high as the amount of interrupts, where I would expect the
> > exact opposite. Can anyone explain this? Is this a specific Ubuntu feature?
> >
> > Thanks,
> > Sander
>
> Sander,
>
> I also believe that this is the tickless kernel. Could you verify that you
> are fewer interrupts and not more context switches then expected.
>
> Rick Clark
> Manager, Ubuntu Server Team


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Matt Zimmerman 08-11-2008 05:17 PM

unexpected output vmstat -s
 
On Mon, Aug 11, 2008 at 04:24:24PM +0200, Sander van Vugt wrote:
> Thanks for your feedback. From it (and my ignorance ;-) follows another
> question. For performance measuring purposes, I think it is useful to
> compare interrupts and CPU context switches in a non tickless kernel.

Why? Are you using the number of interrupts as a measure of uptime? Of
workload? There are better metrics for those.

--
- mdz

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam

Rick Clark 08-11-2008 06:15 PM

unexpected output vmstat -s
 
On Monday 11 August 2008 12:17:51 Matt Zimmerman wrote:
> On Mon, Aug 11, 2008 at 04:24:24PM +0200, Sander van Vugt wrote:
> > Thanks for your feedback. From it (and my ignorance ;-) follows another
> > question. For performance measuring purposes, I think it is useful to
> > compare interrupts and CPU context switches in a non tickless kernel.
>
> Why? Are you using the number of interrupts as a measure of uptime? Of
> workload? There are better metrics for those.
>
> --
> - mdz


Matt,
Looking at context switches is an old UNIX admin's way of pushing performance
issues back on application developers. I have never compared interrupts to
context switches before, they seem unrelated to me. My main concern now is
to determine whether the number interrupts have indeed been reduced and that
we don't have some issue increasing context switches somewhere.

Rick
--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam


All times are GMT. The time now is 10:16 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.