[tbench regression fixes]: digging out smelly deadmen.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Evgeniy Polyakov
Date: Thursday, October 9, 2008 - 4:17 pm

Hi.

It was reported recently that tbench has a long history of regressions,
starting at least from 2.6.23 kernel. I verified that in my test
environment tbench 'lost' more than 100 MB/s from 470 down to 355
between at least 2.6.24 and 2.6.27. 2.6.26-2.6.27 performance regression
in my machines is rougly corresponds to 375 down to 355 MB/s.

I spent several days in various tests and bisections (unfortunately
bisect can not always point to the 'right' commit), and found following
problems.

First, related to the network, as lots of people expected: TSO/GSO over
loopback with tbench workload eats about 5-10 MB/s, since TSO/GSO frame
creation overhead is not paid by the optimized super-frame processing
gains. Since it brings really impressive improvement in big-packet
workload, it was (likely) decided not to add a patch for this, but
instead one can disable TSO/GSO via ethtool. This patch was added in
2.6.27 window, so it has its part in its regression.

Second part in the 26-27 window regression (I remind, it is about 20
MB/s) is related to the scheduler changes, which was expected by another
group of people. I tracked it down to the
a7be37ac8e1565e00880531f4e2aff421a21c803 commit, which, if being
reverted, returns 2.6.27 tbench perfromance to the highest (for
2.6.26-2.6.27) 365 MB/s mark. I also tested tree, stopped at above
commit itself, i.e. not 2.6.27, and got 373 MB/s, so likely another
changes in that merge ate couple of megs. Attached patch against 2.6.27.

Curious reader can ask, where did we lost another 100 MB/s? This small
issue was not detected (or at least reported in netdev@ with provocative
enough subject), and it happend to live somehere in 2.6.24-2.6.25 changes.
I was so lucky to 'guess' (just after couple of hundreds of compilations),
that it corresponds to 8f4d37ec073c17e2d4aa8851df5837d798606d6f commit about
high-resolution timers, attached patch against 2.6.25 brings tbench
performance for the 2.6.25 kernel tree to 455 MB/s.

There are still somewhat missed 20 MB/s, but 2.6.24 has 475 MB/s, so
likely bug lives between 2.6.24 and above 8f4d37ec073 commit.

I can test your patches (the most interesting attached one does not
apply clearly to the current tree) for the 2.6.27 tree tomorrow
(it is more than 3 A.M. in Moscow).

P.S. I'm not currently subscribed to any of the mentioned lists (and write
from long-ago-unused email), so can not find appropriate subject and reply
into the thread.

-- 
	Evgeniy Polyakov
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Thu Oct 9, 4:17 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Peter Zijlstra, (Thu Oct 9, 10:40 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 10, 1:09 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 10, 3:13 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 10, 4:31 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 10, 4:55 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 10, 6:25 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Sat Oct 11, 6:13 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Peter Zijlstra, (Sat Oct 11, 7:39 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sat Oct 11, 11:13 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sat Oct 11, 11:02 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sat Oct 11, 11:33 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Rafael J. Wysocki, (Fri Oct 24, 3:25 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 24, 8:37 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 24, 9:05 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 24, 10:53 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 24, 10:58 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Fri Oct 24, 11:53 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sat Oct 25, 12:33 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sat Oct 25, 12:52 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Rafael J. Wysocki, (Sat Oct 25, 4:13 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sun Oct 26, 1:46 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Peter Zijlstra, (Sun Oct 26, 2:00 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sun Oct 26, 2:15 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Sun Oct 26, 2:27 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Sun Oct 26, 3:05 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Sun Oct 26, 3:23 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Sun Oct 26, 4:29 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Rafael J. Wysocki, (Sun Oct 26, 4:33 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Sun Oct 26, 5:23 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Mon Oct 27, 2:29 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Mon Oct 27, 5:06 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Mon Oct 27, 7:17 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Mon Oct 27, 12:11 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Mon Oct 27, 12:39 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Mon Oct 27, 12:44 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Tue Oct 28, 3:24 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Tue Oct 28, 3:57 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Tue Oct 28, 7:00 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Mike Galbraith, (Tue Oct 28, 8:22 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Wed Oct 29, 2:14 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Wed Oct 29, 2:50 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Stephen Hemminger, (Thu Oct 30, 11:15 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Thu Oct 30, 11:40 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Ilpo Järvinen, (Thu Oct 30, 12:01 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Ilpo Järvinen, (Fri Oct 31, 2:40 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Ilpo Järvinen, (Fri Oct 31, 3:42 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Ilpo Järvinen, (Fri Oct 31, 4:01 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Ilpo Järvinen, (Fri Oct 31, 4:15 am)
Re: [tbench regression fixes]: digging out smelly deadmen., Stephen Hemminger, (Fri Oct 31, 12:57 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 31, 1:10 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Evgeniy Polyakov, (Fri Oct 31, 2:18 pm)
Re: [tbench regression fixes]: digging out smelly deadmen., Stephen Hemminger, (Fri Oct 31, 4:56 pm)