lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Dec 2010 15:30:46 +0100
From:	Andres Freund <andres@...razel.de>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc:	Ralf Hildebrandt <Ralf.Hildebrandt@...rite.de>,
	linux-kernel@...r.kernel.org
Subject: Re: Costly Context Switches

On Monday 13 December 2010 15:29:11 Arnaldo Carvalho de Melo wrote:
> Em Mon, Dec 13, 2010 at 03:25:54PM +0100, Andres Freund escreveu:
> > On Monday 13 December 2010 14:51:04 Arnaldo Carvalho de Melo wrote:
> > > Em Sun, Dec 12, 2010 at 08:07:07PM +0100, Andres Freund escreveu:
> > > > On Sunday 12 December 2010 16:11:12 Ralf Hildebrandt wrote:
> > > > > I recently made a parallel installation of dovecot-2.0 on my
> > > > > mailbox server, which is running dovecot-1.2 without any problems
> > > > > whatsoever.
> > > > > 
> > > > > Using dovecot-2.0 on the same hardware, same kernel, with the same
> > > > > users and same mailboxes and usage behaviour results in an immense
> > > > > increase in the load numbers.
> > > > > 
> > > > > Switching back to 1.2 results in a immediate decrease of the load
> > > > > back to "normal" numbers.
> > > > > 
> > > > > This is mainly due to a 10-20 fold increase of the number of
> > > > > context switches. The same problem has been reported independently
> > > > > by Cor Bosman of XS4All, on different hardware (64bit instead of
> > > > > 32bit, real hardware instead of virtual hardware).
> > > > > 
> > > > > So, now the kernel related question: How can I find out WHY the
> > > > > context switches are happening? Are there any "in kernel"
> > > > > statistics I could look at?
> > > > 
> > > > "strace" or "perf trace syscall-counts" would be a good start.
> > > 
> > > Better to record just "cs" (Context Switches) events and also to
> > > collect
> > 
> > > callchains when those events take place:
> > Hm. Its also a good starting point but it may be harder to see the
> > differences between dovecot-2.0 and dovecot-1.2 that way because its
> > harder to see if its
> 
> Well, for that he can try 'perf diff', i.e.:
> 
> 1. run perf record on dovecot-1.2
> 2. run perf record on dovecot-2.0
> 3. perf diff
Wow. That one I didnt know about yet.

Too bad that perf docs/examples are so spread out...

Greetings,

Andres
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ