lkml.org 
[lkml]   [2003]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: ext3 performance inconsistencies, 2.4/2.6

On Tue, 4 Nov 2003, Ulrich Drepper wrote:
>
> I don't see any verison numbers mentioned. If you want to benchmark
> NPTL use the recent code, e.g., from Fedora Core 1 or RHEL3. Nothing
> else makes any sense since there have mean countless changes since the
> early releases.

This is actually _really_ trivial to see with a simple test program.

This is Fedora Core test3:

#include <stdlib.h>

/* Change this to match your CPU */
#define NR (10*1000*1000)
int main(int argc, char **argv)
{
int i;
for (i = 0; i < NR; i++)
putchar(0);
}
and then just time it.

I get:

torvalds@home:~> time ./a.out > /dev/null
real 0m1.305s
user 0m1.283s
sys 0m0.004s

and

torvalds@home:~> time LD_ASSUME_KERNEL=2.4.1 ./a.out > /dev/null
real 0m0.321s
user 0m0.318s
sys 0m0.003s

ie a factor of _four_ difference in the speed of "putchar()".

Interestingly, if I compile the program statically, I don't see this
effect, and it's noticeably faster still:

torvalds@home:~> gcc -O2 -static test.c
torvalds@home:~> time ./a.out > /dev/null
real 0m0.193s
user 0m0.191s
sys 0m0.002s

torvalds@home:~> time LD_ASSUME_KERNEL=2.4.1 ./a.out > /dev/null
real 0m0.194s
user 0m0.190s
sys 0m0.004s

Is the TLS stuff done through an extra dynamically loaded indirection or
something?

Linus

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [from the cache]
©2003-2011 Jasper Spaans