Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Comparation of compiler flags, nptl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
epsilon
n00b
n00b


Joined: 28 Nov 2004
Posts: 5

PostPosted: Sun Nov 28, 2004 4:59 pm    Post subject: Comparation of compiler flags, nptl Reply with quote

Hello,

I've compared different compiler flags and nptl / no nptl on a p4 and I thought, may be it interests somebody. I've used mplayer and the kernel compilation as benchmark:

Mplayer: (The video is coded in divx.)
mplayer -vo null -nosound -benchmark testvideo.avi

Kernel 2.6.9:
make clean
time make

System information:
CPU: Pentium 4 Northwood 2,5 @ 3 GHz
MEM: 512 MB DDR @ 120 MHz
HDD: 250 GB Maxtor SATA
common compiler flags: -O3 -fomit-frame-pointer -pipe
no common USE flags

sda1 64 MB /boot
sda2 1GB swap
sda5 10 GB System with pentium optimisation
sda6 10 GB System with p4 optimisation
sda7 10 GB System with p4 optimisation and nptl

The results are average values from 5 measures.

Results:
Times in ms.
Bigger values from kernel compilation, smaller values from mplayer.
The small value is the result nomalized so 1 for sys p4, kernel p4.

System compiler flags: -mtune=pentium, Kernel: pentium
84839 1.0529
265621 1.0478

System compiler flags: -mtune=pentium, Kernel: p4
844806 1.0525
262873 1.0369

System compiler flags: -march=pentium4, Kernel: p4
80577 1.0000
253507 1.0000

System compiler flags: -march=pentium4, Kernel: p4, NPTL
79053 0.9811
251707 0.9929

The optimisation for p4 pays about 4-5 %, nptl 1.5 %.
Back to top
View user's profile Send private message
monkey89
Guru
Guru


Joined: 08 Mar 2004
Posts: 596

PostPosted: Sun Nov 28, 2004 5:11 pm    Post subject: Reply with quote

NPTL is meant for threading, it shouldn't affect much else.

Try benchmarking a java application. :)
Back to top
View user's profile Send private message
epsilon
n00b
n00b


Joined: 28 Nov 2004
Posts: 5

PostPosted: Sun Nov 28, 2004 5:20 pm    Post subject: Reply with quote

Yes, I will test with java. The sun-j2sdk ebuild filters the compiler flags. What's with the blackdown sdk? Does it use -march=pentium4? I'll test it.
Back to top
View user's profile Send private message
desertstalker
Apprentice
Apprentice


Joined: 18 Sep 2004
Posts: 209

PostPosted: Mon Nov 29, 2004 9:42 am    Post subject: Reply with quote

Um, i doon't see how compiler opimisation flags wil effect the compile time of the kernel. The flags effect the programs compiled by them.

There are many benchmarking programs, those will work better or at least try compile a program and timing its runtime.

I dont see the usefulness of these benchmarks.
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Mon Nov 29, 2004 10:17 am    Post subject: Reply with quote

"comparison" :wink:
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
epsilon
n00b
n00b


Joined: 28 Nov 2004
Posts: 5

PostPosted: Mon Nov 29, 2004 5:12 pm    Post subject: Reply with quote

The compiler optimisation flags of the system and the kernel should effect the compile time of the kernel. The gcc compiler and the system librarys were optimized with these flags too and kernel compilation produces much hard disk activity and the gcc compiler has to calculate with big data structures.

Which benchmark should be appropriate to test the system speed with different compiler optimisation flags? By my search I've found only benchmarks that tests one system component like bonnie and piozone for hard disks and cpuburn for CPUs.

I've tested nptl with blackdown-sdk and the difference ist very small, smaller than by kernel compilation and mplayer. Indeed the java program was very small but I have not expected this result because java uses multiple threads even if the java program has only one tread.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum